Skip to main content
An agent is a named AI worker on Polpo’s team. Each agent gets a model, a role, an identity (who they are, how they communicate), a credential vault (what services they can access), and a place in the org chart (who they report to).
{
  "name": "alice",
  "role": "social media manager",
  "model": "anthropic:claude-sonnet-4-6",
  "reportsTo": "marco",
  "identity": {
    "displayName": "Alice Chen",
    "title": "Social Media Manager",
    "company": "Acme Corp",
    "email": "alice@acme.com",
    "responsibilities": [
      { "area": "Social Media", "description": "Manage all company social accounts", "priority": "high" },
      { "area": "Customer Relations", "description": "Respond to inquiries within 2 hours", "priority": "critical" }
    ],
    "tone": "Professional but warm. Uses first names. Keeps emails under 3 paragraphs.",
    "personality": "Empathetic and detail-oriented. Data-driven — always cites metrics."
  },
  "allowedTools": ["read", "write", "edit", "bash", "glob", "grep", "ls", "email_*"],
  "allowedPaths": ["./content", "./reports"]
}

Config Reference

See Configuration for the full field-by-field reference. Key fields:
FieldTypeDescription
namestringRequired. Unique agent identifier
rolestringRole description (included in system prompt)
modelstring"provider:model" or bare model ID
identityAgentIdentityPersona: name, title, responsibilities, tone, personality
reportsTostringOrg chart parent — used for automatic escalation
allowedToolsstring[]Which tools this agent can use
allowedPathsstring[]Filesystem sandbox
maxTurnsnumberMax tool-use turns (default: 150)

Identity

An agent’s identity defines who it is — not just what it does. Polpo injects identity fields into the agent’s system prompt:
  • Display name, title, company — used when the agent writes emails or external messages
  • Responsibilities — structured by area with priority levels, so the agent knows what to focus on and what to escalate. Supports both simple strings ("Manage social media") and structured objects ({ "area": "...", "description": "...", "priority": "high" })
  • Tone — communication style: HOW the agent communicates (register, format, length preferences)
  • Personality — character traits: WHO the agent IS (approach, values, working style)
  • Timezone — for time-aware decisions
Tone vs. Personality: Tone controls the form of communication — “Professional but warm. Keeps emails under 3 paragraphs. Uses bullet points.” Personality controls the substance — “Empathetic and detail-oriented. Anticipates concerns. Prefers data-backed decisions.” Together, they produce consistent, realistic agent behavior.

Onboarding

While you can write identity JSON by hand, the recommended approach is the onboarding wizard:
polpo agent onboard alice
This interactive CLI walks through 5 steps — identity, persona (responsibilities + tone + personality), hierarchy, email, and additional vault credentials. Agent config is written to .polpo/polpo.json; vault entries are stored in .polpo/vault.enc (AES-256-GCM encrypted). After onboarding, verify the result:
polpo agent show alice    # full profile with masked credentials
polpo agent list          # org chart tree

Onboarding walkthrough

Step-by-step guide with example output for each stage.

Credential Vault

Each agent can have its own set of credentials for different services (SMTP, IMAP, OAuth, API keys, logins). Vault entries are stored in .polpo/vault.enc, encrypted with AES-256-GCM — they are not part of polpo.json. Manage vault entries via:
  • CLI: polpo agent onboard <name> — the Email and Vault steps write to the encrypted store
  • TUI / Chat: Use the built-in tools — set_vault_entry, remove_vault_entry, list_vault
Credential values support ${ENV_VAR} references — Polpo resolves them at runtime from environment variables. Credential resolution order: tool parameters > vault > environment variables. See Configuration — Encrypted Vault for vault entry fields and key management.

Hierarchy (reportsTo)

The reportsTo field creates an org chart. When a task fails and the retry policy has no explicit fallbackAgent, Polpo automatically escalates to the agent’s manager:
marco (Team Lead)
├── alice (Social Media Manager)
└── bob (Backend Developer)
View the hierarchy with polpo agent list.

Built-in Engine

Polpo runs agents on its built-in engine — a multi-provider LLM runtime powered by pi-agent-core. It supports 18+ providers (OpenAI, Anthropic, Google, Groq, Mistral, Ollama, etc.) and runs in-process. The model format is provider:model-id. If you omit the provider prefix, Polpo resolves it from your configured providers.

How Agents Run

Each agent task runs as a detached Node.js subprocess (the “runner”). This is what makes Polpo crash-resilient:
  1. Polpo spawns a runner process per task
  2. Runner initializes the engine, creates the agent, and starts working
  3. Runner polls activity every 1.5s and writes it to the store
  4. If Polpo crashes, runners keep going — restart Polpo and it reconnects to live PIDs
  5. When the task is done, the runner writes the result and exits
Polpo’s 5-second tick loop monitors all active runners: checking heartbeats, enforcing timeouts, and collecting results.

Agent Activity

While an agent is working, Polpo tracks its activity in real time:
FieldDescription
lastToolLast tool the agent called
lastFileLast file the agent touched
filesCreatedList of files created during this task
filesEditedList of files edited during this task
toolCallsTotal number of tool calls so far
totalTokensTotal tokens consumed
summaryAgent’s current status summary
sessionIdSession ID for transcript access
This data is visible in the TUI, the web dashboard, and the HTTP API (via /api/state).