Timeouts
Orchestrators time out at 60 seconds by default. Anything that fans out to sub-agents or MCP connectors should passtimeoutInSeconds: 180 (or higher) to run() or sendText(). The default 60-second timeout is fine for single-agent calls but will cut off orchestrators that delegate to multiple connectors.
Context IDs
You do not need to manage context IDs. Keep theAgentContext object in memory across turns. The SDK tracks the thread automatically. Only use handle.getContext(id) / agent.get_context(id) when resuming after a process restart.
ctx.id is undefined / None until the first turn completes. Do not persist it before then.
createContext() does not accept a context ID. Passing { contextId } will be silently ignored. Use handle.getContext(contextId) / agent.get_context(context_id) to resume an existing thread.
Workflow vs stateGraph
workflow is linear, stateGraph has cycles. Do not use workflow for branching that revisits earlier agents. If you need loops, conditional routing based on accumulated state, or a reviewer-approval cycle, use stateGraph instead.
Parallel failures
parallel swallows individual failures. Inspect rejected if you need fail-fast semantics. When used inside a workflow, if all parallel steps fail, the workflow throws.
Persistent agents
Persistent agents accumulate. The default isephemeral; only use persistent if you truly need the agent to survive restarts, and always delete what you no longer need.
ESM only (TypeScript)
The TypeScript package is ESM-only ("type": "module"). Import with import, not require. For CommonJS projects, use dynamic import() or set your project to ESM.
Self-sufficient prompts
Sub-agents that ask for clarification will stall an orchestrator. Prompt worker agents with instructions like “Never ask for clarification” so they always produce output. An orchestrator that delegates to a sub-agent which asks a question will hang waiting for user input that never comes.Credential keys must match connector names (Python only)
In the Python SDK (v1 architecture), the credential key in theCredentialStore must match the connector’s name:
Streaming field names
Useevent.message, not event.msg. The streaming event field for message updates is message. The field for artifact updates is artifactUpdate, not artifact.