# Architecture Source: https://docs.entire.io/agents/agent-integration-protocol/architecture How the Entire CLI discovers and communicates with agent integrations Entire discovers agent integrations through executable naming and `$PATH` lookup: 1. You create an executable named `entire-agent-` 2. Place it anywhere on your `$PATH` 3. The CLI discovers it at startup and registers it as a new agent The integration communicates with the CLI through **subcommands** that read and write JSON over stdin and stdout. Each invocation is stateless. Every subcommand invocation receives these environment variables: | Variable | Description | | ------------------------- | ---------------------------------------- | | `ENTIRE_REPO_ROOT` | Absolute path to the git repository root | | `ENTIRE_PROTOCOL_VERSION` | Protocol version (currently `1`) | Entire runs every subcommand from the repository root. The integration follows these conventions: * **Output:** JSON on stdout (unless noted otherwise) * **Errors:** Nonzero exit code and message on stderr * **Stateless:** Each invocation is independent, no persistent connection # Build an Agent Integration Source: https://docs.entire.io/agents/agent-integration-protocol/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). **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. ## 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-`. Each integration is a standalone binary named `entire-agent-`. ## 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-/AGENT.md` * `agents/entire-agent-/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- 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. # Commands Source: https://docs.entire.io/agents/agent-integration-protocol/commands Required commands and optional capabilities for agent integrations Every agent integration must implement these subcommands. ## Required Commands ### `info` Returns metadata and declares which optional capabilities your integration supports. ```bash theme={null} entire-agent-myagent info ``` ```json theme={null} { "protocol_version": 1, "name": "myagent", "type": "MyAgent", "description": "MyAgent - AI-powered code editor", "is_preview": true, "protected_dirs": [".myagent"], "hook_names": ["session-start", "session-end", "stop"], "capabilities": { "hooks": true, "transcript_analyzer": true, "transcript_preparer": false, "token_calculator": false, "text_generator": false, "hook_response_writer": false, "subagent_aware_extractor": false } } ``` | Field | Description | | ------------------ | --------------------------------------------------------------------------- | | `protocol_version` | Must match the CLI's expected version (currently `1`) | | `name` | Registry name (must match the `` in the binary name) | | `type` | Display name / type identifier | | `description` | Description for readers | | `is_preview` | Whether the agent is in preview | | `protected_dirs` | Directories the CLI should not modify (excluded from checkpoints and diffs) | | `hook_names` | Agent lifecycle hooks this integration handles | | `capabilities` | Object declaring which optional capabilities are supported | ### `detect` Returns whether the agent is available in the current environment. Return `{"present": false}` if the agent's dependencies are not met. The CLI will skip enabling the agent. ```bash theme={null} entire-agent-myagent detect ``` ```json theme={null} {"present": true} ``` ### `get-session-id` Extracts a session ID from a hook input event. **stdin:** [HookInput](/agents/agent-integration-protocol/data-model#hookinput) JSON ```json theme={null} {"session_id": "abc123"} ``` ### `get-session-dir --repo-path ` Returns where agent sessions are stored. ```json theme={null} {"session_dir": "/path/to/sessions"} ``` ### `resolve-session-file --session-dir --session-id ` Resolves the session file path from a session directory and ID. ```json theme={null} {"session_file": "/path/to/session/file.jsonl"} ``` ### `read-session` Reads session data from a hook input event. **stdin:** [HookInput](/agents/agent-integration-protocol/data-model#hookinput) JSON **stdout:** [AgentSession](/agents/agent-integration-protocol/data-model#agentsession) JSON ### `write-session` Persists session data to disk. The integration chooses the storage location and format. **stdin:** [AgentSession](/agents/agent-integration-protocol/data-model#agentsession) JSON Exit `0` on success. ### `read-transcript --session-ref ` Reads a transcript file and returns its raw bytes on stdout. ### `chunk-transcript --max-size ` Splits a transcript (raw bytes on stdin) into chunks. ```json theme={null} {"chunks": ["", "..."]} ``` ### `reassemble-transcript` Reassembles chunks into a transcript when `entire session resume` restores stored session data. **stdin:** ```json theme={null} {"chunks": ["", "..."]} ``` **stdout:** Raw transcript bytes. ### `format-resume-command --session-id ` Returns the command a user would run to resume a session. ```json theme={null} {"command": "myagent --resume abc123"} ``` ## Optional Capabilities Set capabilities to `true` in your `info` response to enable these. The CLI will never call subcommands for capabilities you don't declare. ### `hooks` Manage agent lifecycle hooks for Entire integration. | Subcommand | Description | | --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `parse-hook --hook ` | Parse a raw hook payload (stdin) into an [Event](/agents/agent-integration-protocol/data-model#event). Return `null` if not relevant. | | `install-hooks [--local-dev] [--force]` | Install hooks. `--local-dev` installs hooks pointing to a local development build. `--force` overwrites existing hook files. Returns `{"hooks_installed": 3}`. | | `uninstall-hooks` | Remove installed hooks. Exit `0` on success. | | `are-hooks-installed` | Check hook status. Returns `{"installed": true}`. | ### `transcript_analyzer` Extract data from agent transcripts. | Subcommand | Description | | --------------------------------------------------- | ------------------------------------------------------ | | `get-transcript-position --path ` | Returns `{"position": 12345}` (byte offset). | | `extract-modified-files --path --offset ` | Returns `{"files": [...], "current_position": 12345}`. | | `extract-prompts --session-ref --offset ` | Returns `{"prompts": ["prompt text", ...]}`. | | `extract-summary --session-ref ` | Returns `{"summary": "...", "has_summary": true}`. | ### `transcript_preparer` | Subcommand | Description | | ----------------------------------------- | ----------------------------------------------- | | `prepare-transcript --session-ref ` | Prepare a transcript file. Exit `0` on success. | ### `token_calculator` | Subcommand | Description | | ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | | `calculate-tokens --offset ` | Calculate token usage from transcript bytes (stdin). `--offset` is the byte offset into the transcript to start counting from. | Output: ```json theme={null} { "input_tokens": 1500, "output_tokens": 500, "cache_creation_tokens": 0, "cache_read_tokens": 200, "api_call_count": 3 } ``` You must return `input_tokens` and `output_tokens`. The CLI uses `0` for fields you omit. ### `text_generator` | Subcommand | Description | | ------------------------------- | --------------------------------------------------------------- | | `generate-text --model ` | Generate text from a prompt (stdin). Returns `{"text": "..."}`. | ### `hook_response_writer` | Subcommand | Description | | ------------------------------------- | ----------------------------------------------------------- | | `write-hook-response --message ` | Write a message in the agent's native hook format (stdout). | ### `subagent_aware_extractor` For agents that spawn subagents. | Subcommand | Description | | --------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `extract-all-modified-files --offset --subagents-dir ` | Extract modified files from main + subagent transcripts (stdin: main transcript). Returns `{"files": [...]}`. | | `calculate-total-tokens --offset --subagents-dir ` | Calculate total tokens across main + subagent transcripts (stdin: main transcript). Same format as `calculate-tokens`, with optional `subagent_tokens` nested object. | # Data Model Source: https://docs.entire.io/agents/agent-integration-protocol/data-model Data types exchanged between the Entire CLI and agent integrations ## HookInput Entire passes `HookInput` via stdin to `get-session-id` and `read-session`. ```json theme={null} { "hook_type": "stop", "session_id": "abc123", "session_ref": "/path/to/transcript.jsonl", "timestamp": "2026-01-13T12:00:00Z", "user_prompt": "Fix the login bug", "tool_name": "Write", "tool_use_id": "toolu_abc123", "tool_input": {"path": "/src/main.go"}, "raw_data": {} } ``` | Field | Type | Required | Description | | ------------- | ------ | -------- | --------------------------------------------------------------------------------------------- | | `hook_type` | string | Yes | `session_start`, `session_end`, `user_prompt_submit`, `stop`, `pre_tool_use`, `post_tool_use` | | `session_id` | string | Yes | Agent session identifier | | `session_ref` | string | Yes | Session reference specific to the agent, typically a file path | | `timestamp` | string | Yes | RFC 3339 timestamp | | `user_prompt` | string | No | User's prompt text | | `tool_name` | string | No | Tool name (from tool use hooks) | | `tool_use_id` | string | No | Tool invocation ID | | `tool_input` | object | No | Raw tool input JSON | | `raw_data` | object | No | Extension data specific to the agent | ## AgentSession Entire passes `AgentSession` to `write-session` and receives it from `read-session`. ```json theme={null} { "session_id": "abc123", "agent_name": "myagent", "repo_path": "/path/to/repo", "session_ref": "/path/to/transcript.jsonl", "start_time": "2026-01-13T12:00:00Z", "native_data": null, "modified_files": ["src/main.go"], "new_files": [], "deleted_files": [] } ``` | Field | Type | Description | | ---------------- | ---------- | ----------------------------------------------- | | `session_id` | string | Agent session identifier | | `agent_name` | string | Agent registry name | | `repo_path` | string | Absolute path to the repository | | `session_ref` | string | Path to session in agent's storage | | `start_time` | string | RFC 3339 timestamp | | `native_data` | bytes/null | Opaque session content in agent's native format | | `modified_files` | string\[] | Files modified during the session | | `new_files` | string\[] | Files created during the session | | `deleted_files` | string\[] | Files deleted during the session | ## Event The `parse-hook` subcommand returns this normalized lifecycle event. ```json theme={null} { "type": 3, "session_id": "abc123", "session_ref": "/path/to/transcript.jsonl", "prompt": "Fix the login bug", "model": "claude-sonnet-4-20250514", "timestamp": "2026-01-13T12:00:00Z" } ``` **Event types:** | Value | Name | Description | | ----- | ------------- | --------------------------------------------------------------------------- | | 1 | SessionStart | Agent began a session | | 2 | TurnStart | User submitted a prompt | | 3 | TurnEnd | Agent finished responding | | 4 | Compaction | Agent compressed its context window, which triggers a save and offset reset | | 5 | SessionEnd | Session ended | | 6 | SubagentStart | Agent spawned a subagent | | 7 | SubagentEnd | Subagent completed its task | **Optional event fields:** `previous_session_id`, `session_ref`, `prompt`, `model`, `timestamp`, `tool_use_id`, `subagent_id`, `tool_input`, `subagent_type`, `task_description`, `response_message`, `metadata`. You must provide `type` and `session_id`. # Lifecycle Source: https://docs.entire.io/agents/agent-integration-protocol/lifecycle When the Entire CLI calls each agent integration command The CLI calls integration subcommands in five phases. ## Phase 1: Discovery (CLI Startup) Every time the CLI starts, it scans `$PATH` for binaries matching `entire-agent-`. 1. **`info`**: The CLI calls this command once per discovered binary. It reads your metadata, validates the protocol version, and registers the agent. If this fails, the CLI skips the agent. ## Phase 2: Enable (`entire enable`) When a user enables your agent for a repository: 1. **`detect`**: The CLI calls this command to check whether your agent is available in the current environment. 2. **`install-hooks [--local-dev] [--force]`**: The CLI calls this command to install your hooks into the agent, such as by writing hook configuration files. It calls this command only when you declare the `hooks` capability. ## Phase 3: Agent Session (Hooks Firing) After you enable the agent, its hooks fire during normal usage and the CLI processes them. This phase requires the `hooks` capability. Agents that don't declare it won't participate in the hook lifecycle. Every hook invocation follows this flow: ``` Hook fires → parse-hook normalizes → CLI dispatches Event by type ``` 1. **`parse-hook --hook `**: The CLI calls this command on every hook invocation with the raw payload on stdin. Return a normalized [Event](/agents/agent-integration-protocol/data-model#event), or `null` if the hook has no lifecycle significance and the CLI should take no action. The CLI then routes the event by type: ### SessionStart (Type 1) The agent fires this event when it begins a new session. 1. **`get-session-id`**: Extract the session ID from the hook input (stdin). 2. **`get-session-dir --repo-path `**: Return where sessions are stored. 3. **`resolve-session-file --session-dir --session-id `**: Resolve the session file path. 4. **`read-session`**: Read existing session data (stdin: [HookInput](/agents/agent-integration-protocol/data-model#hookinput)). 5. **`write-session`**: Persist updated session data. 6. **`write-hook-response --message `**: *(optional, if `hook_response_writer` capability)* Write a startup message in your agent's native format. ### TurnStart (Type 2) The agent fires this event when the user submits a new prompt. 1. **`extract-modified-files --path --offset `**: *(if `transcript_analyzer` capability)* Extract files changed since last checkpoint. 2. The CLI creates a git checkpoint of the current state. ### TurnEnd (Type 3) The agent fires this event when it finishes responding. 1. **`prepare-transcript --session-ref `**: *(if `transcript_preparer` capability)* Prepare the transcript. 2. **`read-transcript --session-ref `**: Read the raw transcript bytes. 3. **`chunk-transcript --max-size `**: Split large transcripts into storable chunks. 4. **`get-transcript-position --path `**: *(if `transcript_analyzer` capability)* Get the current byte offset. 5. **`extract-modified-files --path --offset `**: *(if `transcript_analyzer` capability)* Extract newly modified files. 6. **`calculate-tokens --offset `**: *(if `token_calculator` capability)* Calculate token usage. 7. The CLI stores a checkpoint in git history. ### Compaction (Type 4) The agent fires this event when it compresses its context window. The CLI follows the same flow as **TurnEnd** and saves the checkpoint before resetting the offset. ### SessionEnd (Type 5) The agent fires this event when the session ends. The CLI creates a final checkpoint and cleans up session state. ### SubagentStart / SubagentEnd (Types 6 and 7) The agent fires these events when it spawns or completes a subagent. If you declare the `subagent_aware_extractor` capability, the CLI calls: * **`extract-all-modified-files --offset --subagents-dir `** * **`calculate-total-tokens --offset --subagents-dir `** ## Phase 4: User Commands Some CLI commands invoke your integration outside the hook flow: | Command | Subcommands called | | ----------------------- | --------------------------------------------------------------------------------------------- | | `entire session resume` | `read-transcript`, `reassemble-transcript`, `extract-modified-files`, `format-resume-command` | | `entire status` | `get-transcript-position` | ## Phase 5: Disable (`entire disable --uninstall`) 1. **`uninstall-hooks`**: The CLI calls this command to remove your installed hooks when you declare the `hooks` capability. ## Error Handling * **Timeout:** Each subcommand has a default timeout of 30 seconds. * **Output limits:** The CLI caps stdout and stderr at 10 MB each. Account for this limit when you implement `read-transcript` for large sessions. * **No retries:** The CLI does not retry failed subcommand calls. It treats a nonzero exit code with a message on stderr as a failure. * **Graceful degradation:** If `parse-hook` returns `null`, the CLI takes no action. If the repo has Entire disabled, hooks exit silently. # Agent Integration Protocol Source: https://docs.entire.io/agents/agent-integration-protocol/overview Add support for an AI coding agent that Entire does not ship with If your agent is not listed in our [native agent integrations](/agents/overview), you can still integrate it with Entire. This can be done with the Agent Integration Protocol by building an `entire-agent-` executable and putting it on your `$PATH`. Entire discovers it there and registers it as an agent. ## 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. 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. 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. ## Protocol Reference Scaffold an executable and implement the protocol with working examples. See how the CLI discovers an integration and invokes it. Follow the CLI calls through discovery, setup, sessions, and shutdown. Implement each subcommand, input, and output. Use the JSON shapes that the protocol exchanges. # Claude Code Source: https://docs.entire.io/agents/claude-code Capture Claude Code transcripts, file changes, tool calls, tokens, and subagent sessions with Entire Claude Code is Entire's default integration and the only built-in integration marked stable. It captures the main session and nested subagent sessions. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Claude Code ```bash theme={null} entire agent add claude-code claude ``` Entire adds lifecycle hooks to `.claude/settings.json` and preserves unrelated Claude Code settings. The hooks capture session boundaries, prompts, completed turns, and task events. Entire reads the full conversation, file changes, tool calls, and token usage from Claude Code's JSONL transcripts. ## Subagent Capture Claude Code exposes task lifecycle events and separate subagent transcripts. Entire records each task against the parent session, attributes its files and tokens to that session, and materializes its transcript into the parent's next checkpoint. The checkpoint then carries the subagent's work on its own, without reading back into Claude Code's transcript directory. Entire records any subagent that changed files. It also keeps read-only subagents, such as reviewers and search agents, when you launch them with `run_in_background`. A background launch defers capture to subagent stop, which is where Entire materializes a transcript even though the subagent wrote nothing. Foreground subagents complete at launch time, so a read-only one there leaves no record. Among the built-in integrations, Claude Code is the one that reaches read-only subagents. ## Resume and Import `entire session resume BRANCH` restores the recorded session data when needed and prints a command in this form: ```bash theme={null} claude -r SESSION_ID ``` Entire can also import existing Claude Code transcripts from the previous 30 days as read-only checkpoints. See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # Codex Source: https://docs.entire.io/agents/codex Capture Codex transcripts, file changes, tokens, and subagent sessions with Entire The Codex integration uses Codex's project-level hook system and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Codex ```bash theme={null} entire agent add codex codex ``` Entire writes `.codex/hooks.json`. Codex enables hooks by default beginning with version 0.124.0, so Entire does not create `.codex/config.toml` or set `codex_hooks = true`. The hooks capture session boundaries, prompts, completed turns, file-changing tool calls, and subagent events. Entire reads the full conversation and token usage from Codex rollout files under `~/.codex/` or `CODEX_HOME`. ## Limitations Ephemeral Codex runs may not provide a transcript path. Entire can process their hook events, but it cannot attach a full transcript without the rollout file. Entire records the subagents that changed files, materializes their transcripts into the parent's next checkpoint, and attributes their files to the parent session. It skips a subagent that wrote nothing, and it does not yet roll subagent tokens up into the parent session's totals. ## Resume and Import `entire session resume BRANCH` restores the recorded session data when needed and prints: ```bash theme={null} codex resume SESSION_ID ``` Entire can import existing Codex transcripts from the previous 30 days as read-only checkpoints. See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # Copilot CLI Source: https://docs.entire.io/agents/copilot-cli Capture Copilot CLI transcripts, file changes, tool calls, and token usage with Entire The Copilot CLI integration uses GitHub Copilot CLI's project-level hooks and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Copilot CLI ```bash theme={null} entire agent add copilot-cli copilot ``` Entire writes its hook configuration to `.github/hooks/entire.json`. The hooks capture session boundaries, prompts, completed turns, tool activity, errors, and subagent completion. Entire reads the full conversation, file changes, and tool calls from Copilot CLI's JSONL transcript. ## Limitations Copilot CLI reports aggregate token usage when the session ends. Token totals may remain incomplete during an active session. Copilot CLI provides a subagent stop hook without a corresponding start hook. Entire records the completed subagent operation and uses the parent session's pre-prompt state instead of a subagent-specific pre-task snapshot. ## Resume and Import `entire session resume BRANCH` restores the recorded session data when needed and prints: ```bash theme={null} copilot --resume SESSION_ID ``` Entire can import existing Copilot CLI transcripts from the previous 30 days as read-only checkpoints. See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # Cursor Source: https://docs.entire.io/agents/cursor Capture Cursor IDE and CLI transcripts, file changes, tool calls, and subagent sessions with Entire The Cursor integration supports Cursor IDE and Cursor CLI through project-level hooks. It is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Cursor ```bash theme={null} entire agent add cursor cursor ``` Use `agent` instead of `cursor` to start Cursor CLI. Entire writes `.cursor/hooks.json`. The hooks capture session boundaries, prompts, completed turns, compaction, and subagent events. Entire reads the conversation and tool calls from Cursor's JSONL transcript. It identifies changed files from `Write` and `StrReplace` calls, hook payloads, and Git status. ## Limitations Cursor transcripts do not provide token usage. Cursor also does not expose a command that resumes the recorded native session, so `entire session resume` opens the project without restoring the prior Cursor conversation. Cursor CLI hook payloads may omit the transcript path. Entire resolves the transcript from Cursor's project session directory when this happens. Entire records the subagents that changed files, materializes their transcripts into the parent's next checkpoint, and attributes their files to the parent session. It skips a subagent that wrote nothing. ## Import Entire can import existing Cursor transcripts from the previous 30 days as read-only checkpoints. # Factory Source: https://docs.entire.io/agents/factory-droid Capture Factory Droid transcripts, file changes, tool calls, tokens, and subagent sessions with Entire The Factory integration uses Factory Droid's project-level hooks and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Factory ```bash theme={null} entire agent add factoryai-droid droid ``` Entire adds lifecycle hooks to `.factory/settings.json` and preserves unrelated Factory settings. The hooks capture session boundaries, prompts, completed turns, compaction, and task tool calls. Entire reads the full conversation, file changes, tool calls, and token usage from Factory's JSONL transcripts. ## Subagent Capture Factory exposes task tool events, and its Workers run as sessions of their own. Entire attributes a Worker's turn to the parent task invocation instead of minting a separate top-level session, rolls its files and tokens onto the parent session, and materializes its transcript into the parent's next checkpoint. Entire records a Worker that changed files, along with its transcript and its tokens. Capture keys on those file changes, so a read-only Worker leaves no record. ## Resume and Import `entire session resume BRANCH` restores the recorded session data when needed and prints: ```bash theme={null} droid --session-id SESSION_ID ``` Entire can import existing Factory transcripts from the previous 30 days as read-only checkpoints. See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # Gemini CLI Source: https://docs.entire.io/agents/gemini-cli Capture Gemini CLI transcripts, file changes, tool calls, and available token usage with Entire The Gemini CLI integration uses Gemini's project-level hook system and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Gemini CLI ```bash theme={null} entire agent add gemini gemini ``` Entire adds hooks to `.gemini/settings.json` and preserves unrelated Gemini settings. The hooks capture session boundaries, prompts, completed turns, model changes, tool activity, and compaction. Entire reads the full conversation, file changes, and tool calls from Gemini's JSON transcript. ## Limitations Gemini CLI does not expose subagent lifecycle events. Entire captures the main session. Entire records input, output, and cached tokens when Gemini writes token counts into the transcript. Sessions without those fields do not have token totals. ## Resume and Import `entire session resume BRANCH` restores the recorded session data when needed and prints: ```bash theme={null} gemini --resume SESSION_ID ``` Entire can import existing Gemini CLI transcripts from the previous 30 days as read-only checkpoints. See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # OpenCode Source: https://docs.entire.io/agents/opencode Capture OpenCode transcripts, file changes, tool calls, and token usage with Entire The OpenCode integration uses a project-level TypeScript plugin and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add OpenCode ```bash theme={null} entire agent add opencode opencode ``` Entire writes `.opencode/plugins/entire.ts`. The plugin captures session and turn events, then uses `opencode export` to materialize the full conversation, file changes, tool calls, and token usage. OpenCode supports commits before a turn ends. Entire refreshes the exported transcript so a checkpoint created mid-turn includes the agent activity available at that point. ## Limitations OpenCode does not expose subagent lifecycle events. Entire captures the main session. `entire import` cannot import existing OpenCode sessions. ## Resume `entire session resume BRANCH` restores the recorded session data when needed and prints: ```bash theme={null} opencode -s SESSION_ID ``` See the [`session resume` command reference](/cli-reference/session#session-resume) for flags and additional behavior. # Agent Integrations Source: https://docs.entire.io/agents/overview Compare Entire's built-in AI coding agent integrations and their capabilities Entire uses agent hooks to capture AI coding sessions and connect them to Git commits. Claude Code is the default integration. Choose another integration with its agent name. ## Compare Built-In Integrations
Agent and CLI Name Hooks Transcript Tokens Subagents Resume Import Maturity
Claude Code
claude-code
NativeFullYesAllYesYesStable
Codex
codex
NativeFullYesFile changesYesYesPreview
Copilot CLI
copilot-cli
NativeFullAfter sessionPartialYesYesPreview
Cursor
cursor
NativeFullNoFile changesNoYesPreview
Factory
factoryai-droid
NativeFullYesFile changesYesYesPreview
Gemini CLI
gemini
NativeFullWhen presentNoYesYesPreview
OpenCode
opencode
PluginFullYesNoYesNoPreview
Pi
pi
ExtensionFullYesNoYesYesPreview
The Subagents column describes which subagents reach a checkpoint. "All" means Entire records every subagent that changed files, plus read-only subagents such as reviewers and search agents when you launch them with `run_in_background`. "File changes" means Entire records the subagents that changed files and skips a subagent that wrote nothing. "Partial" means Copilot CLI provides a subagent stop event without a corresponding start event. Entire notes that the subagent completed, but it cannot take a subagent-specific pre-task snapshot or attach the subagent's transcript. Claude Code and Factory roll subagent tokens up into the parent session's totals. Codex and Cursor store the transcripts without aggregating their tokens yet. Gemini CLI transcripts include token counts when the agent writes them. Whichever agent records the subagent, the parent's next checkpoint materializes the subagent's transcript alongside its own, so the checkpoint carries that work without reading back into the agent's transcript directory. entire.io does not browse these records yet. Install hooks, add CLI-managed skills, verify capture, and troubleshoot shared setup. Add an agent Entire does not ship with by writing an `entire-agent-` executable. CLI plugins use `entire-` instead and add commands rather than agent support. See working integrations at [github.com/entireio/external-agents](https://github.com/entireio/external-agents). ## Agent Integrations Entire can discover agent integrations from executables named `entire-agent-` on your `$PATH`. Enable external agent discovery with the `external_agents` setting, then use the discovered name with commands such as `entire enable --agent `. Agent integrations declare their own hooks and capabilities, so their support varies by implementation. See the [Agent Integration Protocol](/agents/agent-integration-protocol/overview) for the protocol, setup, and security model. ## MCP Hosts `entire mcp` runs a stdio MCP server that exposes Entire's `agent_help` and `status` tools. It gives an MCP host current CLI usage and repository status. It does not replace lifecycle hooks for session capture. # Pi Source: https://docs.entire.io/agents/pi Capture Pi transcripts, file changes, tool calls, and token usage with Entire The Pi integration uses a project-level TypeScript extension and is in preview. Follow [Set Up an Agent](/agents/setup) for shared installation, verification, and troubleshooting steps. ## Add Pi ```bash theme={null} entire agent add pi pi ``` Entire writes `.pi/extensions/entire/index.ts`. The extension captures session boundaries, prompts, and completed turns. Entire reads the full conversation, file changes, tool calls, and token usage from Pi's JSONL transcript.