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

# Agent setup

> Connect Claude Code, Codex, or OpenCode to Termyte.

# Connect your coding agents

Run setup once and select every agent you want Termyte to capture.

```bash theme={null}
termyte init
```

| Agent       | Capture | Automatic hook context |    Can form memories during setup |
| ----------- | ------: | ---------------------: | --------------------------------: |
| Claude Code |     Yes |                    Yes | Yes, after an authenticated check |
| Codex       |     Yes |                    Yes | Yes, after an authenticated check |
| OpenCode    |     Yes |                     No | Yes, after an authenticated check |

Claude Code and Codex use `SessionStart`, `UserPromptSubmit`, `PostToolUse`, and `Stop` hooks. OpenCode uses a generated plugin for chat messages, completed tools, compaction, and session lifecycle events.

## Agent synthesis

When you choose an authenticated agent during setup, `termyte-worker` uses that agent's non-interactive CLI in separate background invocations:

* Claude Code: `claude -p`
* Codex: `codex exec`
* OpenCode: `opencode run --format json`

Termyte sends redacted trace-derived prompts to the selected provider. It validates the structured response before storing observations, then consolidates those observations into memories with links back to the source traces. This processing does not run inside the foreground capture hook or continue your active coding session.

## Capture-only setup

Choose **Capture only for now** if you do not want Termyte to call a memory-processing provider. Events and task state are still stored locally. Searchable memories will not be formed until a provider is configured.

## Verify

After setup, restart each selected agent and complete a small tool-using task. Then run:

```bash theme={null}
termyte doctor
termyte viewer
```

`doctor` currently checks Claude Code and Codex hook coverage. For OpenCode, confirm that `~/.config/opencode/plugins/termyte.js` exists and inspect captured sessions in the Viewer.
