Agents & Tools

Built-in agents, tools reference, and customization.

Agents

otto ships with four built-in agents. Each has a system prompt and curated toolset.

build

Code generation, bug fixes, feature implementation. Most capable agent with full filesystem and shell access.

Tools: read, write, ls, tree, bash, update_todos, glob, ripgrep, git_status, terminal, apply_patch, websearch

otto ask "create an auth component" --agent build
otto ask "fix the failing test" --agent build

plan

Architecture planning and code analysis. Read-only — cannot modify files or run commands.

Tools: read, ls, tree, ripgrep, update_todos, websearch

otto ask "design the API architecture" --agent plan
otto ask "review the dependency graph" --agent plan

general

General-purpose assistant for mixed tasks.

Tools: read, write, ls, tree, bash, ripgrep, glob, websearch, update_todos

otto ask "explain how this module works" --agent general

research

Deep research across sessions and the web. Can query past sessions for context.

Tools: read, ls, tree, ripgrep, websearch, update_todos, query_sessions, query_messages, search_history

otto ask "research how auth is implemented" --agent research

All agents also receive: progress_update, finish, skill.

Tools

File System

ToolDescription
readRead file contents. Supports line ranges.
writeWrite content to a file. Creates if it doesn't exist.
lsList directory contents (non-recursive).
treeRender directory tree with configurable depth.
globFind files matching glob patterns.

Search

ToolDescription
grepSearch file contents with regex.
ripgrepFast regex search using rg.
websearchSearch the web or fetch URL content.

Editing

ToolDescription
editStructured file editing: replace, insert, delete.
apply_patchApply unified diff patches with fuzzy matching.

Shell

ToolDescription
bashExecute shell commands. Returns stdout, stderr, exit code.
terminalPersistent terminal sessions via bun-pty.

Git

ToolDescription
git_statusGit working tree status.
git_diffGit diff (staged or all changes).
git_commitCreate a git commit.

Agent Configuration

Per-Project

Create .otto/agents.json in your project root:

{
  "build": {
    "tools": ["read", "write", "bash", "git_status", "ripgrep"],
    "prompt": ".otto/agents/build/agent.md"
  },
  "custom-agent": {
    "tools": ["read", "ls", "tree", "ripgrep"],
    "prompt": ".otto/agents/custom-agent/agent.md"
  }
}

Options

FieldDescription
toolsOverride the default tool list.
appendToolsAdd tools to the default list.
promptPath to a custom system prompt file.
providerOverride provider for this agent.
modelOverride model for this agent.

Custom Tools

Add project-specific tools in .otto/tools/:

// .otto/tools/deploy.ts
import { tool } from "@ottocode/sdk";
import { z } from "zod";

export default tool({
  name: "deploy",
  description: "Deploy the application",
  parameters: z.object({
    environment: z.enum(["staging", "production"]),
  }),
  execute: async ({ environment }) => {
    return { success: true, environment };
  },
});

Skills

Skills are markdown files that provide specialized instructions to agents, loaded via the skill tool.

Defined at three levels:

  • Project: .otto/skills/
  • Global: ~/.config/otto/skills/
  • Built-in: bundled with otto
otto skills                    # list available skills