index

A system for delegating parts of a coding task to separate AI sessions. Each session works with its own tools and returns its result to the main session.

In plain words
What is it for?
Use it to split a large task into independent subtasks, run specialist work in parallel, or hand a problem to another model or working directory.
Why use it?
It keeps difficult or unrelated work isolated, so the main session has less context to manage. You can also check or guide delegated work while it runs.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/dsswift/ion/index
Clone the repo
git clone --depth 1 https://github.com/dsswift/ion
Per session 12 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 715 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00012 $0.00715
Opus 5 $0.00006 $0.00358
Sonnet 5 $0.00002 $0.00143
Haiku 4.5 $0.00001 $0.00072

Measured 2d ago against content hash aed983831aae, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

index scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/agents/index.md · 59 lines

How it starts

The opening of the file, as written. The whole thing — 59 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Agents

Agents are delegated tasks that run their own tool loops. When the primary session encounters a problem that benefits from isolated context or a different model, it spawns a child agent via the Agent tool. The child runs to completion and returns its text output to the parent.

How agents work

  1. The LLM calls the Agent tool with a prompt and working directory.
  2. The engine creates a child ApiBackend with its own run loop.
  3. The child streams LLM calls, executes tools, and iterates until done.
  4. The Agent call returns a dispatch ID immediately; parent continues work or ends turn.
  5. The parent uses AgentStatus with that dispatch ID for a read-only live-state check. Calling Agent again always creates a new dispatch.
  6. Engine delivers terminal child result back to parent as machine-authored completion input.
  7. Parent may steer running child by dispatch ID; wait_for_completion: true is explicit blocking escape hatch.

Parent and child share the same event bus. Events from child agents are forwarded to connected clients so UIs can show agent activity in real time.

Agent types

Inline agents (Agent tool)

The Agent tool spawns a child session on the fly. No agent definition file needed. The parent provides the prompt and working directory directly in the tool call. This is the most common pattern.

Disk agents (definition files)

Agents defined as markdown files with YAML frontmatter. These are discovered at startup and available by name. Disk agents let you define reusable specialists with specific models, tool allowlists, and system prompts.

Extension-dispatched agents

Extensions can dispatch agents programmatically via DispatchAgent on the extension context. This supports the same options as disk agents but is triggered from extension code rather than the LLM.

Agent state tracking

The engine tracks agent lifecycle through engine_agent_state events. Each agent gets a name, status (running, done, error, cancelled, idle), and metadata including elapsed time and a summary of its output. Clients use these events to render agent panels.

Read the full file on GitHub · 59 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 59 lines · 12 tokens per session scan A aed983831aae

Subscribe to this mod's changes

index is an agent published in the GitHub repository dsswift/ion (4 stars, last pushed 2d ago), licensed MIT. It adds 12 tokens to every session and 715 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.