Documentation Index
Fetch the complete documentation index at: https://docs.taskforceai.chat/llms.txt
Use this file to discover all available pages before exploring further.
The TaskForceAI Python SDK is designed for high-performance async applications with full type hinting and Pydantic support.
Installation
pip install taskforceai-python
Quick Start (Async)
import asyncio
from taskforceai import AsyncTaskForceAIClient
async def main():
async with AsyncTaskForceAIClient(api_key="your-api-key") as client:
result = await client.run_task("Summarize the latest updates")
print(result["result"])
asyncio.run(main())
Synchronous Usage
from taskforceai import TaskForceAIClient
client = TaskForceAIClient(api_key="your-api-key")
result = client.run_task("What is the capital of France?")
print(result["result"])
Streaming
stream = client.run_task_stream("Analyze this codebase")
for status in stream:
print(f"{status['status']}: {status.get('result')}")
Mock Mode
Build and test without an API key:
client = TaskForceAIClient(mock_mode=True)
result = client.run_task("Test task")