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

# Agent Integration Protocol

> Add support for an AI coding agent that Entire does not ship with

Use the Agent Integration Protocol to capture sessions from an AI coding agent that Entire does not ship with. An agent integration is an `entire-agent-<name>` executable. A [CLI plugin](/cli-reference/plugin) is an `entire-<name>` executable that adds a command such as `entire graph`.

| You want to                                | Build                | Executable name       |
| ------------------------------------------ | -------------------- | --------------------- |
| Capture sessions from another coding agent | An agent integration | `entire-agent-<name>` |
| Add an `entire` CLI command                | A CLI plugin         | `entire-<name>`       |

Entire discovers both systems on your `$PATH`. The `agent-` segment determines whether Entire registers the executable as an agent or a command.

## Add an Agent Integration

After you put the executable on your `$PATH`, install its hooks in an existing Entire repository:

```bash theme={null}
entire agent add NAME
```

During initial setup, select it with:

```bash theme={null}
entire enable --agent NAME
```

See [`entire agent add`](/cli-reference/agent#agent-add) and [`entire enable --agent`](/cli-reference/enable) for their flags and setup behavior.

<Note>
  Selecting a discovered agent with `entire agent add` or `entire enable --agent` sets `external_agents` to `true`. If you install an integration executable after setup, run `entire agent add NAME` or add `"external_agents": true` to `.entire/settings.json`. The setting key keeps its original name.
</Note>

<Warning>
  Agent integrations receive repository paths and session data, and they run with the same filesystem access as the Entire CLI. Only install integrations you trust.
</Warning>

## Protocol Reference

<CardGroup cols={2}>
  <Card title="Build an Agent Integration" icon="hammer" href="/agents/agent-integration-protocol/build-an-agent-integration">
    Scaffold an executable and implement the protocol with working examples.
  </Card>

  <Card title="Architecture" icon="sitemap" href="/agents/agent-integration-protocol/architecture">
    See how the CLI discovers an integration and invokes it.
  </Card>

  <Card title="Lifecycle" icon="timeline" href="/agents/agent-integration-protocol/lifecycle">
    Follow the CLI calls through discovery, setup, sessions, and shutdown.
  </Card>

  <Card title="Commands" icon="terminal" href="/agents/agent-integration-protocol/commands">
    Implement each subcommand, input, and output.
  </Card>

  <Card title="Data Model" icon="brackets-curly" href="/agents/agent-integration-protocol/data-model">
    Use the JSON shapes that the protocol exchanges.
  </Card>
</CardGroup>
