ollie/agents
Ollie Agent 4b6562b6f2 add t/route: unified dispatch with tier selection
- route --tier=worker (default): cheap model for scoped subtasks
- route --tier=expert: strong model for complex reasoning
- Orchestrator now uses route instead of cascade
- Unified prompt and callback contract for both tiers
- cascade/escalate remain available for other agents
2026-05-20 09:26:05 +02:00
..
README.md JIT subagent generation via subagent_generate | xargs subagent_spawn 2026-05-02 13:50:52 +02:00
coding.json agents: slim down configs, remove unused tools 2026-05-20 09:14:46 +02:00
copilot.json u/complete: strip markdown fences, insert at cursor, info to stderr 2026-05-03 14:59:05 +02:00
default.json agents: slim down configs, remove unused tools 2026-05-20 09:14:46 +02:00
orchestrator.json add t/route: unified dispatch with tier selection 2026-05-20 09:26:05 +02:00
taskmanager.json Add taskmanager agent prompt and config 2026-05-18 13:27:38 +02:00
worker.json update agent/cascade models 2026-05-18 11:57:50 +02:00

README.md

Agents

Each .json file defines an agent configuration. Agent configs are installed to ~/.config/ollie/agents/ and selected at runtime via /agent <name>.

default

Base agent with no specializations. Provides the standard ollie toolset and prompt assembly. Also serves as the base for JIT-generated subagents — subagent_generate copies default.json and replaces the prompt with SYSTEM_PROMPT + the identity text.

coding

Coding-focused agent. Extends default with agent instructions covering code modification discipline, security practices, and exploratory reading habits. Also enables the execute_elevated_bash trusted tool for operations requiring elevated privileges, and configures an MCP server for elevated operations.

System prompt

The system prompt is assembled from the prompt array in the agent config. Each entry is a shell command whose stdout is appended to the prompt. Commands run in the session's working directory with access to $OLLIE (mount path) and $PWD.

{
  "prompt": [
    "$OLLIE/x/prime SYSTEM_PROMPT",
    "$OLLIE/x/prime tools-file",
    "$OLLIE/x/prime tools-reasoning"
  ]
}

$OLLIE/x/prime <name> reads a file from p/ (prompts directory) and writes it to stdout with environment variable substitution. The base system prompt (SYSTEM_PROMPT.md) is typically the first entry.

The fully assembled system prompt is visible at s/<id>/systemprompt.

Hooks

Hooks are lifecycle callbacks executed at specific points:

Hook When Use case
agentSpawn Session creation Start elevation adapter, initialize state
postTurn After each turn Task list display, logging
preCompact Before context compaction Save state
postCompact After context compaction Notify user
turnError On turn error (rate limit, transient failure) Fallback handling, model switching

Hook commands run with OLLIE_SESSION_ID set to the current session ID.

MCP Servers

Agent configs can specify MCP (Model Context Protocol) servers for external tool providers:

{
  "mcpServers": {
    "server-name": {
      "command": "server-binary",
      "args": [],
      "env": {"KEY": "value"}
    }
  }
}

Tools from MCP servers are registered alongside built-in tools and can be invoked by the agent.

Adding a new agent

Copy default.json, rename it, and adjust the prompt array to include the prompts you want. Add hooks, trusted tools, MCP servers, and generation parameters as needed.