agent.json contains structured configuration:
.polpo/agents/backend-dev/instructions.md:
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:
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:- the base agent prompt, including
nameandrole; - identity, responsibilities, communication style, and
reportsTo; - the contents of
instructions.md; - shared and private memory;
- assigned skill context (progressive skill tools in Cloud, full assigned bodies in the OSS prompt builder);
- runtime context such as workspace, caller instructions, task, or loop context.
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.