Skip to main content
Agents are project resources. Each local agent has its own directory:
The directory name is the agent ID. agent.json contains structured configuration:
Standing instructions live in .polpo/agents/backend-dev/instructions.md:
The authored file does not contain name, systemPrompt, or createdAt. Polpo derives the name from the directory, reads the prompt from instructions.md, and adds runtime metadata when it materializes the agent. role and model are optional. A model identifier uses provider/model. Available identifiers depend on the configured LLM gateway, so query the model catalog instead of assuming an identifier is enabled.

Common fields

Media and provider-specific selection can be configured with image_model, video_model, vision_model, transcribe_model, tts_model, and search_provider.

Tool access by execution mode

allowedTools is the agent-wide ceiling. Optional mode policies can narrow that ceiling without creating separate agents:
Omitting a mode policy inherits the agent-wide set. An explicit empty array denies all tools in that mode. Policies only restrict: they can never grant a tool outside agent.allowedTools or a trusted runtime grant. When a direct chat or Channel turn starts a Project Loop, Polpo recalculates access for Loop mode. The preceding chat.allowedTools, channels.allowedTools, and Channel Route policy do not leak into the Loop; the same Session, canonical history, trusted identity, metadata, and grants are preserved. See Tools, Identity, and Skills for their complete behavior.

Prompt assembly

For each run, Polpo builds the system context from:
  1. the base agent prompt, including name and role;
  2. identity, responsibilities, communication style, and reportsTo;
  3. the contents of instructions.md;
  4. shared and private memory;
  5. assigned skill context (progressive skill tools in Cloud, full assigned bodies in the OSS prompt builder);
  6. runtime context such as workspace, caller instructions, task, or loop context.
Chat mode adjusts the base instructions for interactive conversation. instructions.md extends the base prompt; it does not replace it.

Complete example

.polpo/agents/backend-dev/instructions.md:

Agentic Loops

Loop definitions are project resources under .polpo/loops/; agents only store loop names in assignedLoops. A chat request can select an assigned loop with its loop field. Legacy inline loops and pipeline fields are accepted for compatibility but should not be used for new configurations. See the Loops API for the current graph, permissions, policies, hooks, and execution contracts.

API shape

The Agent API uses a flat runtime object. POST /v1/agents?team=engineering accepts AgentConfig, including name and optional systemPrompt, while GET /v1/agents returns materialized agent configurations. The filesystem layout separates those fields so each agent definition remains readable and independently editable. For a field-by-field reference, see Agents reference.