TaskForceAI SDK
Official SDK for integrating TaskForceAI's multi-agent orchestration capabilities into your TypeScript and JavaScript applications.
Installation
Package Manager
npm install taskforceai-sdk
Requires Node.js 18+ for native fetch support.
Node.js / TypeScript
import { TaskForceAI } from 'taskforceai-sdk';
const client = new TaskForceAI({
apiKey: 'your-api-key',
});
Browser / Web
// Using ES modules in browser
import { TaskForceAI } from 'https://unpkg.com/taskforceai-sdk@latest/dist/index.js';
const client = new TaskForceAI({
apiKey: 'your-api-key',
});
Python
python -m pip install taskforceai
Official Python client with full async support and type hints.
🚀
Multi-Agent Orchestration
Automatic task decomposition, parallel agent execution, and intelligent synthesis for complex problems.
🛠️
Production Ready
Built-in error handling, rate limiting, authentication, and monitoring for production applications.
⚡
High Performance
Optimized for speed with intelligent caching, streaming responses, and efficient resource usage.
🔧
Easy Integration
Simple API design with comprehensive TypeScript support and extensive documentation.
SDK Examples
Basic Usage
import pino from 'pino';
import { TaskForceAI } from 'taskforceai-sdk';
const logger = pino();
const client = new TaskForceAI({
apiKey: 'your-api-key',
});
const result = await client.runTask('Explain quantum computing');
logger.info({ result: result.result }, 'Task completed successfully');Advanced Usage
const taskId = await client.submitTask('Complex analysis', {
silent: true, // Suppress server-side logs
mock: false, // Use real AI
});
const status = await client.getTaskStatus(taskId);
if (status.status === 'completed') {
const result = await client.getTaskResult(taskId);
logger.info({ result: result.result }, 'Task completed successfully');
}Error Handling
import pino from 'pino';
import { TaskForceAIError } from 'taskforceai-sdk';
const logger = pino();
try {
const result = await client.runTask('Your prompt');
// ...
} catch (error) {
if (error instanceof TaskForceAIError) {
logger.error({ error }, 'Task execution failed');
}
}Ready to Get Started?
Start building with TaskForceAI's multi-agent orchestration SDK today.