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

# Build an Agent Integration

> Use the external-agents agent skill to add support for another coding agent

You can build an agent integration when you want Entire to support a coding agent that is not natively supported in the Entire CLI yet. The [external-agents repository](https://github.com/entireio/external-agents) includes an agent skill that does most of the work. The skill researches the target agent. Next, it creates the starter code for the binary and writes tests. Then it writes the code that follows the protocol. You can write an integration in any language. This guide uses the Go version in that repository and its skill.

For the protocol itself, see [Architecture](/agents/agent-integration-protocol/architecture), [Commands](/agents/agent-integration-protocol/commands), [Lifecycle](/agents/agent-integration-protocol/lifecycle), and [Data Model](/agents/agent-integration-protocol/data-model).

<Note>
  **Building a private or internal integration?** This guide is the upstream contribution path, which ends in a pull request to `external-agents`. For an integration you won't contribute back, skip the issue and PR steps and follow the protocol reference above.
</Note>

## Before You Start

Open an issue in [`entireio/external-agents`](https://github.com/entireio/external-agents) before writing code. Adding support for a new agent creates an ongoing support commitment, so align with maintainers first.

You need:

* The target agent CLI installed and authenticated
* [The Entire CLI installed](/installation)
* [Go](https://go.dev/doc/install) and [mise](https://mise.jdx.dev/getting-started.html)
* A target agent with lifecycle hooks or another reliable event mechanism
* Readable session or transcript data
* A stable session ID

## Clone the Repo

```bash theme={null}
git clone https://github.com/entireio/external-agents.git
cd external-agents
mise trust
mise install
```

New integrations live under `agents/entire-agent-<slug>`. Each integration is a standalone binary named `entire-agent-<slug>`.

## Run the Agent Skill

The repo includes an agent skill named `entire-external-agent`, and supported tools discover it automatically with no additional configuration. See the [repo instructions](https://github.com/entireio/external-agents?tab=readme-ov-file#getting-started--zero-setup) for the current supported tools.

Run the skill:

```text theme={null}
/entire-external-agent
```

When prompted, provide the target agent name and slug.

## What the Skill Does

The skill runs three phases:

| Phase         | What happens                                                                                     |
| ------------- | ------------------------------------------------------------------------------------------------ |
| **Research**  | Finds the target agent's hooks, session IDs, transcript storage, CLI commands, and capabilities. |
| **Scaffold**  | Creates the integration structure, protocol stubs, and lifecycle test wiring.                    |
| **Implement** | Uses compliance and lifecycle failures to implement the integration and add tests.               |

You can also run a single phase when you need to restart or inspect part of the process.

```text theme={null}
/entire-external-agent research
/entire-external-agent write-tests
/entire-external-agent implement
```

## Reference Examples

The [external-agents repository](https://github.com/entireio/external-agents) contains working integrations you can inspect while building your own:

| Integration                                                                                             | Target agent | Notes                                                                                             |
| ------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------------------------------------------------------- |
| [`entire-agent-amp`](https://github.com/entireio/external-agents/tree/main/agents/entire-agent-amp)     | Amp          | Agent integration with transcript preparation, token calculation, and compact transcript support. |
| [`entire-agent-goose`](https://github.com/entireio/external-agents/tree/main/agents/entire-agent-goose) | Goose        | Agent integration that exports Goose sessions from SQLite-backed storage.                         |
| [`entire-agent-kiro`](https://github.com/entireio/external-agents/tree/main/agents/entire-agent-kiro)   | Kiro         | Lifecycle hooks and transcript analysis for Kiro sessions.                                        |

For a minimal reference implementation outside the main examples repo, see [`roger-roger`](https://github.com/entireio/roger-roger).

## Review the Output

When the skill finishes, review:

* `agents/entire-agent-<slug>/AGENT.md`
* `agents/entire-agent-<slug>/README.md`
* The declared capabilities
* Protocol compliance results
* Lifecycle test results
* Any remaining gaps or local dependencies

Treat captured hook payloads and transcript fixtures as ground truth. Documentation can drift.

## Verify Locally

Build the binary, put it on your `PATH`, and enable it in a test repository:

```bash theme={null}
cd agents/entire-agent-<slug>
mise run build
export PATH="$PWD:$PATH"

cd /path/to/test-repo
entire enable --agent SLUG
```

Run the target agent and make a small file change. Then check that Entire captured the session:

```bash theme={null}
entire status
entire checkpoint list
entire checkpoint explain CHECKPOINT_ID --short
```

Look for a checkpoint with the expected session, transcript, and modified files.

## Open the PR

Reference the approved issue and include:

* Agent name and binary name
* Declared capabilities
* Protocol compliance status
* Lifecycle test status
* Unit test coverage
* Any local dependencies you could not test
* Known limitations

CI will build the agent and run the shared checks.
