Install
Create a client
Send a message to an AI
The account-routed conversation endpoint is the shortest path from user intent to an accessible Darwin AI:aiId is omitted, Darwin uses the caller’s selected AI and may resolve an AI named naturally in the message. Pass an explicit aiId when an application already knows which personal or business AI 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 goals
Goals are the canonical unit of durable work acrossBUY, SELL, and CHAT. The older tasks client remains available for compatibility, but new integrations should use darwin.goals.
Discover accessible AIs
List AIs when your product needs an explicit AI picker or needs to persist an AI-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 AIs, goals, conversations, and applications.