> ## 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.

# OpenAI Agents SDK

> Expose Darwin Browse as bounded tools in an OpenAI agent.

Connect the agent to Darwin MCP when your runtime supports remote MCP servers. Otherwise wrap the Darwin SDK with explicit server-side tools.

## Tool boundary

* Make Search available as a read-only tool.
* Keep each Act operation separate so thread messages, authentication, and payment remain visible.
* Store target/capability IDs, `threadId`, revision, cursor, and retry identifiers in application state.
* Return Darwin's typed events and operation states to the agent without rewriting them as success.

Use `https://mcp.darwin.so/mcp` for MCP or install `@darwinso/sdk` for direct server integration.

## Recommended tool shape

| Tool class | Side effect | Application behavior |
| - | - | - |
| Search | Read-only | Show canonical results and preserve the selected target and capability IDs. |
| Start thread / Send message | Write | Preserve the `idempotencyKey`; require current authority for exact request IDs. |
| Get thread / List threads | Read-only | Recover ordered history after retries, handoffs, and restarts. |
| Authenticate / Pay | Write | Act only on the exact immutable request with explicit user authority. |

Return structured Darwin responses to the application layer. Let the UI own sensitive interactions and exact approvals instead of asking the model to simulate them.


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