Skip to content

Agents

PanCode ships with a 7-agent default fleet. Each agent is a named configuration that defines tools, system prompt, model preferences, and operational parameters. Agents are dispatched as subprocess workers with their own context windows.

Agent definitions live in ~/.pancode/panagents.yaml. PanCode seeds this file on first run with seven agents:

AgentRoleReadonlyTierSpeedMax Turns
scoutFast codebase reconnaissanceYesanyfast10
plannerArchitecture and implementation planningYesfrontierthorough15
builderCode implementation and generationNomidbalanced20
reviewerCode review and quality analysisNo (tools are readonly)midthorough10
plan-reviewerPlan critic and feasibility validatorYesmidthorough10
documenterDocumentation generationNoanybalanced15
red-teamSecurity and adversarial testingYesmidthorough10

Fast, cheap codebase exploration. Tools limited to read, grep, find, and ls. No opinions, only facts. Use for reconnaissance before planning.

Produces step-by-step implementation plans. Reads the codebase to identify files, dependencies, and risks. Does not modify files. Requires a frontier-tier model for best results.

The primary implementation agent. Has full tool access including write, edit, and bash. Runs with supervised autonomy and retries on failure.

Analyzes code for bugs, security issues, and improvements. Runs tests if available. Readonly tools only. Reports findings without modifying files.

Challenges assumptions in proposed plans. Evaluates feasibility against the actual codebase. Flags risks and gaps. Readonly.

Writes and updates documentation, READMEs, and code comments. Has write access to match the existing documentation style.

Security testing and adversarial analysis. Readonly. Probes for vulnerabilities, injection points, and security misconfigurations.

Each agent in panagents.yaml supports these fields:

FieldTypeDefaultDescription
descriptionstringrequiredHuman-readable purpose
modelstringnoneModel override. Supports ${ENV_VAR} expansion.
toolsstring[]variesTool allowlist for this agent
samplingstring"general"Sampling preset (general, coding)
readonlybooleanfalseIf true, no file mutations allowed
runtimestring"pi"Runtime: pi, cli:claude-code, cli:codex, etc.
runtime_argsstring[][]Extra CLI arguments for the runtime
tierstring"any"Recommended model tier: frontier, mid, any
promptstring"default"Prompt source. default uses PanPrompt engine.
speedstring"balanced"fast, balanced, or thorough
token_budgetnumber4000Max output tokens
autonomystring"supervised"autonomous, supervised, confirmatory
isolationstring"none"none, worktree, container (future)
max_turnsnumber10Max conversation turns before timeout
retry_on_failurebooleanfalseAuto-retry on non-zero exit
tagsstring[][]Tags for routing and filtering
system_promptstringrequiredInstructions for the agent
agents:
my-custom-agent:
description: "Specialized TypeScript refactoring agent"
model: ${PANCODE_WORKER_MODEL}
tools: [read, write, edit, bash, grep, find, ls]
sampling: coding
readonly: false
runtime: pi
tier: mid
prompt: default
speed: balanced
token_budget: 8000
autonomy: supervised
isolation: none
max_turns: 20
retry_on_failure: true
tags: [refactoring, typescript]
system_prompt: "You are a TypeScript refactoring specialist. Analyze code for opportunities to simplify, deduplicate, and improve type safety. Apply changes incrementally."

PanCode defines three agent classes with distinct operational envelopes:

ClassContext WindowTemperatureReasoningMax Tool Calls
Orchestrator262,144 tokens0.6EnabledUnlimited
Worker200,000 tokens0.3DisabledUnlimited
Scout100,000 tokens0.1Disabled15

These profiles apply regardless of which model is used. A scout running a large model and a scout running a small model both use the same temperature and tool call limits.

/agents

Displays a table with agent name, model, speed, autonomy, tags, and readonly status.

/agents set <name> <field> <value>

Supported fields: runtime, model, tier.

Examples:

/agents set builder runtime cli:claude-code
/agents set reviewer model localhost-ollama/llama3.2
/agents set scout tier any

Changes are persisted to ~/.pancode/panagents.yaml.

PanCode supports multiple runtime backends. Each agent specifies which runtime to use.

Runtime IDTypeDescription
pinativeBuilt-in Pi SDK runtime. Full control over tools, model, and safety.
cli:claude-codecliClaude Code headless subprocess
cli:codexcliOpenAI Codex CLI
cli:geminicliGemini CLI
cli:opencodecliopencode CLI
cli:copilot-clicliGitHub Copilot CLI

Discovery at boot scans PATH for known binaries and registers them automatically.

/runtimes

Shows each runtime with type, tier, version, status, and binary path.

The worker pool materializes from the cross-product of agent specs, available runtimes, and discovered models. Each worker gets a composite score based on availability, capacity, load, capability, and cost.

/workers

Shows all materialized workers with their scoring breakdown.

Skills are markdown-defined capabilities discovered from the project directory. PanCode scans .pancode/skills/, .claude/, .codex/, and .gemini/ for SKILL.md and *.skill.md files.

/skills List discovered skills
/skills show <name> Show skill details
/skills validate Check skill tool requirements