Documentation
Agents and personas
Choosing an agent, a model and a persona per stage.
On this page
TDE does not talk to models
This is the single most important thing to understand about agents in TDE: there is no in-process model client. TDE does not hold your API keys and call Anthropic or OpenAI itself. Every agent run shells out to a coding CLI you have installed, and that CLI owns the conversation, the tool loop and the billing.
Four CLIs back agent execution:
| Runtime | Binary | Label in the LLM panel |
|---|---|---|
| Claude Code | claude | Claude Code |
| OpenAI Codex | codex | OpenAI Codex |
| Cursor | cursor-agent | Cursor |
| OpenCode | opencode | OpenCode |
Two more selectable runtimes reuse the Claude Code binary and only change the
model and endpoint environment: TDE Pass and Ollama (Local), the latter
pointed at a local daemon on 127.0.0.1:11434.
Connecting a runtime
Control → AI & Automation → LLM lists the four CLIs plus a local runtime card. Its intro is literal about the scope: AI Chat & My Loop run these four official agent CLIs — nothing else.
Each card shows a status pill and one action button:
| Pill | Meaning | Button |
|---|---|---|
logged in | An OAuth session exists for that CLI. | Manage |
API key | A key is set for the CLI's env var. | Manage |
installed | On PATH, credential state unknown. | Connect |
login needed | On PATH, no credential found. | Connect |
not installed | Not on PATH. | Store |
Auth is whatever the CLI itself uses. Connect runs the CLI's own login command
in a terminal window — claude auth login, codex login --device-auth,
cursor-agent login, opencode auth login — or lets you paste an API key.
Login state is detected by looking for the CLI's own credential file, without spawning anything:
| CLI | Credential file |
|---|---|
| Claude Code | ~/.claude/.credentials.json |
| OpenAI Codex | ~/.codex/auth.json |
| OpenCode | ~/.local/share/opencode/auth.json |
| Cursor | ~/.cursor/cli-config.json, and only when it carries a user id |
An injected API key is read from the process environment first, then from the
encrypted vault at ~/.tde/secrets.db, and
handed to the CLI as ANTHROPIC_API_KEY, OPENAI_API_KEY, CURSOR_API_KEY or
OPENCODE_GO_API_KEY. A blank vault value means cleared — TDE will never send
an empty key.
Statuses are probed automatically when you open the panel, which also checks each installed binary's version against its registry for updates.
Personas
A persona is a named, reusable agent identity: a base CLI, a model, a reasoning
effort, a system prompt, a set of skills and an appearance. Personas live in
~/.tde/personas.db and are edited in Control → AI & Automation → Agents.
| Field | Meaning |
|---|---|
Name | How the persona is referenced everywhere else. |
LLM | The base CLI it drives. |
Model | Empty falls back to the pipeline or stage default for that CLI. |
Effort | Low, Medium, High, Max. Empty falls back to smart effort or the CLI default. |
Web search | default, on, or off. Controls whether this persona may use web search / fetch. |
Prompt | A custom system prompt injected for this persona. |
Skills | Which skills apply. |
Council | Whether this persona chairs a council. |
Mascot / Color | Appearance. Empty is derived from the name. |
Web search is a per-persona policy, not a per-conversation toggle. It applies
everywhere that persona runs — pipeline stages, Bot, squads and AI Chat
when that persona is selected:
| Value | Effect |
|---|---|
default | Leave the CLI's own default alone. |
on | Opt the CLI into web search when it has an explicit switch (Codex). |
off | Block web search and web fetch. On Claude / TDE Pass that also disables the gateway's native Exa search, because the gateway only searches when the CLI declares the tool. OpenCode write mode keeps edit/shell available while denying web tools; Cursor has no tool-deny flag, so the policy is enforced as a hard prompt constraint. |
Two personas are bootstrapped and cannot be renamed or deleted:
Default— created from your existing configuration on first run. Existing configuration always wins; TDE never resets a runtime or model you chose.Bot— the reserved name for the agent assigned to scheduled automations. It is an ordinary, fully editable persona; the name is kept stable so persisted bots point at an agent identity rather than at a raw model.
Picking a model
The model list a persona offers depends on its base runtime:
| Base | Catalog source |
|---|---|
| Claude Code | A curated static list. |
| OpenAI Codex, Cursor, OpenCode | The installed CLI's own live catalog, with a static offline fallback. |
| TDE Pass | Curated gateway models plus live gateway aliases. |
| Ollama | 100% live — whatever the local daemon reports. Empty when the daemon is down. |
Two rules protect you from silent substitution. A model id you typed with an
explicit local/ or cloud/ prefix is preserved verbatim, because falling back
to another provider would change who pays for the run. And a raw id from a live
catalog is kept while that catalog is empty, so a transient probe failure never
rewrites your persona.
At run time the model is resolved in this order: the persona's model, then the pipeline's per-category routing, then the stage default. Near the task budget the model is dropped entirely so the CLI's cheaper default carries the run.
How a persona becomes a run
Each pipeline stage may name a persona. When a task enters that stage, TDE builds a spec from the persona — base CLI, name, system prompt, skills, API key, model, effort, web-search policy — and invokes the CLI:
claude -p "<prompt>" --model claude-sonnet-5 --effort high --no-session-persistence
codex exec --json "<prompt>" -m gpt-5.5 -c model_reasoning_effort="high"
cursor-agent --print --trust --output-format stream-json "<prompt>"
opencode run --format json "<prompt>"Read-only stages add each CLI's own restriction flags — plan mode and a
Read,Glob,Grep,WebFetch,WebSearch tool allowlist for Claude, --sandbox read-only for Codex, --mode ask --sandbox enabled for Cursor, a pure read-only
agent profile for OpenCode.
Attachments before the agent starts
When a run is started with image or document attachments — from AI Chat or from a My Loop task — TDE resolves them before the CLI tool loop begins. That matters most on TDE Pass:
- Images (PNG, JPEG, WebP, GIF, up to 20 MiB) are sent as real multimodal
content to the Pass gateway. The model id you selected stays unchanged; if that
model has no vision, the gateway applies its configured vision fallback. The
verified description is then handed to the agent as context, so the agent does
not need to
Readthe image file. - Documents (PDF, DOCX, XLSX, XLS, ODS) are extracted natively. Small extractions are inlined into the prompt (bounded); large ones are truncated in the prompt and chunked into the task's Recall overlay so later stages can retrieve narrower excerpts.
- Other binaries stay path references for the agent's normal file tools.
Identical tool calls with the same input are circuit-broken after a few repeats, on both AI Chat and My Loop agents, so a stuck loop cannot burn through a Pass budget unnoticed.
Where personas show up
- Pipeline stages — the agent that runs that stage.
- Task detail — the
Agent:field, which overrides the stage default for that task. - Bots — every bot names the persona that carries its action.
- AI Chat — the persona you are talking to. Conversations are independent:
one chat can keep streaming while you send in another,
Stopcancels only the open conversation, and closing the AI Chat window does not cancel in-flight runs. - Council — the chairing persona and its counselor bench.
From a shell, tde agent list prints your configured agents with provider and
model and marks the default with *. It is a catalog read, unrelated to the
desktop Agent API.