API Parity
Complete mapping between TypeScript and Python APIs.
All TypeScript camelCase names map to Python snake_case:
| TypeScript | Python |
|---|
defineAgent() | define_agent() |
defineTool() | define_tool() |
createLLM() | create_llm() |
createMockLLM() | create_mock_llm() |
createTestHarness() | create_test_harness() |
systemPrompt | system_prompt |
maxSteps | max_steps |
maxTokens | max_tokens |
toolCalls | tool_calls |
runId | run_id |
| TypeScript | Python |
|---|
Zod (z.object({...})) | Pydantic (BaseModel) |
z.string() | str |
z.number() | float / int |
z.boolean() | bool |
z.array(z.string()) | list[str] |
z.optional() | Optional[T] |
.describe('...') | Field(description='...') |
| TypeScript | Python |
|---|
Agent | Agent |
defineAgent() | define_agent() |
defineTool() | define_tool() |
createLLM() | create_llm() |
| TypeScript | Python |
|---|
InMemoryStateStore | InMemoryStateStore |
RedisStateStore | RedisStateStore |
| TypeScript | Python |
|---|
InMemoryMemoryStore | InMemoryMemoryStore |
PgVectorMemoryStore | PgVectorMemoryStore |
retrieveMemories() | retrieve_memories() |
consolidateMemories() | consolidate_memories() |
| TypeScript | Python |
|---|
BudgetGovernor | BudgetGovernor |
COST_MODELS | COST_MODELS |
AutonomyPolicy | AutonomyPolicy |
| TypeScript | Python |
|---|
Coordinator | Coordinator |
pipeline() | pipeline() |
parallel() | parallel() |
supervisor() | supervisor() |
debate() | debate() |
| TypeScript | Python |
|---|
createMockLLM() | create_mock_llm() |
createTestHarness() | create_test_harness() |
| TypeScript | Python |
|---|
getInstrumentation() | get_instrumentation() |
resetInstrumentation() | reset_instrumentation() |