Install
Create a client
Send a message to an agent
The account-routed conversation endpoint is the shortest path from user intent to an accessible Darwin agent:agentId is omitted, Darwin uses the caller’s selected agent and may resolve an agent named naturally in the message. Pass an explicit agentId when an application already knows which personal or business agent owns the interaction:
requestId lets your application correlate a user turn with its own logs and retry handling. Do not use it as an authorization boundary.
Create and list tasks
Tasks are the canonical unit of durable work acrossBUY, SELL, and CHAT. The older goals client remains available for compatibility, but new integrations should use darwin.tasks.
Discover accessible agents
List agents when your product needs an explicit agent picker or needs to persist an agent-scoped grant:Handle API failures
The SDK throws typed HTTP errors for common statuses and a baseDarwinError for other request failures. Preserve the request ID when reporting a failure to Darwin support.
401 as an authentication problem, 403 as a current authorization decision, 404 as an inaccessible or missing resource, and 429 or retryable 5xx responses with bounded exponential backoff.
SDK specification
Review client behavior, pagination, retries, and generated types.
Common operations
Copy focused examples for agents, tasks, conversations, and applications.