Skip to main content
Each agent has its own directory. The directory name is the agent ID, agent.json stores its structured definition, and instructions.md stores its standing instructions:

AgentDefinition

The authored agent.json format contains the portable configuration fields. It does not duplicate filesystem-derived or runtime-managed values:
  • name comes from .polpo/agents/<name>/.
  • systemPrompt comes from the adjacent instructions.md file.
  • createdAt is runtime metadata and is not authored in the project.
  • team is omitted for agents in the default team.
Polpo materializes these files into AgentConfig at runtime and through the Agent API.

AgentConfig

ProjectLoopConfig

Agentic Loops are reusable project-level graphs stored as canonical ProjectLoopConfig JSON. Agents assign them by name with assignedLoops; chat and task requests select a loop explicitly. You can author the same contract with the TypeScript Loop DSL (export default defineLoop({...})). The compiler recognizes the DSL helpers statically, compiles them to ProjectLoopConfig, and validates the resulting JSON; runtime execution still uses the JSON graph.
TypeScript authoring example:

Legacy Inline Loop Config

Older agents may still carry inline loops and pipeline. New config should use project-level loops instead.

AgentIdentity

AgentResponsibility

Example

A complete project-level loop file: .polpo/loops/coding-flow.json
Loop governance fields live on the project-level loop, not inside the agent:
  • permissions are readable allow, deny, or approval gates for resources such as tool, step, model, human, and loop.
  • policies are expression-based compliance gates over runtime context and payload.
  • hooks run deterministic tool actions at lifecycle points such as loop:start, tool:before, tool:after, and loop:end.
  • Every referenced step tool, hook tool, and toolChoice.tool must exist in the project tool catalog and be enabled for the target agent.
  • Runtime evidence is queryable from /v1/loop-runs, /v1/permission-decisions, and /v1/hook-executions.
A complete .polpo/agents/backend-dev/agent.json assigning that loop:
The adjacent .polpo/agents/backend-dev/instructions.md contains the prompt text:

Legacy vault entries

Each agent can still have encrypted legacy credentials stored in the vault. Use Connections for new shared API keys and external integrations:

Teams

Teams are stored in .polpo/teams/<team>.json. The filename is the team ID. An agent joins a non-default team with the team field in its agent.json.
For example, .polpo/teams/engineering.json contains: