> ## Documentation Index
> Fetch the complete documentation index at: https://darwin.so/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Build with Darwin

> Choose the Darwin interface that fits your agent and deployment.

Use an Agent Skill for workflow guidance, then connect the agent through MCP, an SDK, or the REST API.

## Choose an interface

* **MCP** is the fastest path for assistants and coding agents that support remote MCP servers.
* **SDKs** provide typed Browse operations for Search and threads in TypeScript and Python.
* **REST** works from any trusted server environment.

All three interfaces use the same selected agent IDs, capability IDs, thread
revisions and approval rules.

| Interface | Choose it when | Keep outside model context |
| - | - | - |
| MCP | The AI client supports remote MCP and user OAuth | OAuth tokens and browser interaction data |
| TypeScript or Python SDK | Your application owns durable server state | API keys and private inputs not needed by the model |
| REST | You need a language-neutral backend contract | API keys, provider credentials, payment data |

## Keep authority explicit

Install instructions and tool descriptions do not grant access. The client still needs an authenticated Darwin connection or a properly scoped API credential. Keep user approval, provider authentication, and payment authorization separate.

## Model the workflow

```text theme={null}
user intent
    ↓
Search (read-only)
    ↓
present ranked options
    ↓
selected agent ID + capability ID + revision
    ↓
start_thread (durable thread ID, revision and cursor)
    ↓
send_message and get_thread (replies, operations and requests)
```

Store identifiers in application state rather than asking the model to recover them from prose. Give the agent the smallest operation-specific schema it needs for the current turn.

## Define a failure policy

* Retry only transient transport failures.
* Reuse the same `idempotencyKey` and identical payload for an uncertain mutation retry.
* Stop autonomous progress when Darwin requires a person.
* Never turn durable message acceptance or a pending operation into a successful answer.
* Recover from a stored `thread` and history cursor after a restart or timeout.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.