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

# Overview

> One Rust interface to the coding agents installed on a machine.

<div className="hero-lead">
  <p>Users already have Claude Code, Codex, Cursor, opencode, Kiro, and friends
  installed and logged in. Each one has its own CLI, protocol, and quirks, so an
  app built on top of them ends up with a driver per agent.</p>

  <p><b className="wordmark">anyagent</b> is that layer, written once. It finds the
  agents, speaks each one's protocol (native or
  <a href="https://agentclientprotocol.com">ACP</a>), and gives you one typed API.</p>
</div>

<div className="hero-cta">
  <a className="btn btn-primary" href="/quickstart">Quickstart</a>
  <a className="btn btn-secondary" href="https://crates.io/crates/anyagent">crates.io</a>
</div>

## Three objects

```text theme={"theme":"vesper"}
Runtime::discover()  ->  Runtime::open()  ->  (Session, Events)

  your app ── prompt / answer / configure ──►  Session
                                                  │
                                                  ▼
                                            agent process
                                                  │
  your UI  ◄── text / tools / requests / usage ── Events
```

| Object    | Role                                     | You call it for                                                |
| --------- | ---------------------------------------- | -------------------------------------------------------------- |
| `Runtime` | Finds agents, opens sessions             | `discover`, `probe`, `open`, `generate`, `plan_usage`          |
| `Session` | Command handle for one live conversation | `prompt`, `answer`, `configure`, `cancel`, `rollback`, `close` |
| `Events`  | The stream everything comes back on      | one `match` on `EventKind`                                     |

## Who owns what

| anyagent owns                                                           | Your app owns                        |
| ----------------------------------------------------------------------- | ------------------------------------ |
| Finding and launching agent processes                                   | The transcript store                 |
| Speaking each wire                                                      | Titles, threads, worktrees           |
| Turn rules: one `TurnEnded` per turn, steer or queue, request lifetimes | The UI and the policy behind it      |
| Normalizing events and tool calls                                       | What to do with a permission request |

## Design rules

1. **Same types for every agent.** Provider-specific data rides in
   `extensions` instead of leaking into the API.
2. **Capabilities are reported, not assumed.** After `open`, the session tells
   you what this agent can do on this connection. Gate features on that, not
   on the agent's name.
3. **A turn ends exactly once.** Whether the wire said so or anyagent inferred
   it, you get one `TurnEnded`.

## Where to go

<CardGroup cols={2}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Install, discover, open, prompt, stream, answer one permission.
  </Card>

  <Card title="Core API" icon="code" href="/core-api">
    Runtime, Session, SessionOptions, every EventKind, requests, errors.
  </Card>

  <Card title="Features" icon="sparkles" href="/features">
    Each thing anyagent does, in a few sentences and one snippet.
  </Card>

  <Card title="Agents" icon="plug" href="/agents">
    The catalog, the capability matrix, per-agent quirks, custom ACP agents.
  </Card>

  <Card title="Building an app" icon="window" href="/building-an-app">
    How the pieces fit in a real chat app: threads, streaming, permissions, persistence.
  </Card>

  <Card title="Architecture" icon="sitemap" href="/architecture">
    The codebase map and how an event travels from wire to your UI.
  </Card>
</CardGroup>

## License

MIT or Apache-2.0.
