agent.json stores its structured definition, and instructions.md stores its standing instructions:
AgentDefinition
The authoredagent.json format contains the portable configuration fields. It does not duplicate filesystem-derived or runtime-managed values:
namecomes from.polpo/agents/<name>/.systemPromptcomes from the adjacentinstructions.mdfile.createdAtis runtime metadata and is not authored in the project.teamis omitted for agents in the default team.
AgentConfig at runtime and through the Agent API.
AgentConfig
ProjectLoopConfig
Agentic Loops are reusable project-level graphs stored as canonicalProjectLoopConfig 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.
Legacy Inline Loop Config
Older agents may still carry inlineloops and pipeline. New config should use project-level loops instead.
AgentIdentity
AgentResponsibility
Example
A complete project-level loop file:.polpo/loops/coding-flow.json
permissionsare readable allow, deny, or approval gates for resources such astool,step,model,human, andloop.policiesare expression-based compliance gates over runtime context and payload.hooksrun deterministic tool actions at lifecycle points such asloop:start,tool:before,tool:after, andloop:end.- Every referenced step tool, hook tool, and
toolChoice.toolmust 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.
.polpo/agents/backend-dev/agent.json assigning that loop:
.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.
.polpo/teams/engineering.json contains:
Database access
Selectdatabase_* or exact database tool names in allowedTools, then grant the
agent access through Databases. The tool allowlist does not
grant database access by itself. Database grants are trusted host state; there is
no data field or data/ directory in .polpo/agents/<name>/. Deploying or pulling
an agent does not synchronize databases, records, migration history or grants.