Skip to main content
Agents are stored in .polpo/agents.json as an array of AgentEntry objects. Each entry wraps an AgentConfig with a teamName.

AgentEntry

The file format — each element in the agents.json array:

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 agents.json file assigning that loop:

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 separately in .polpo/teams.json. Each agent references its team via teamName in the AgentEntry wrapper.