Storage model
A persistedMission has id, name, data, status, and timestamps. data is a JSON string containing the mission document. Optional top-level persisted fields are prompt, deadline, schedule, endDate, qualityThreshold, notifications, executionCount, and user.
The mission document inside data has this shape:
dependsOn, gate, checkpoint, and delay references use those titles. Dependencies must exist and cannot contain cycles.
Create and execute
The SDK and REST API requiredata to be serialized:
POST /v1/missions/{missionId}/execute. Cloud also exposes its run alias where supported.
Local .polpo/missions/*.json files may keep data as an object; polpo deploy serializes it before sending the API request. Put tasks, team, and gates inside data, not beside it.
Lifecycle
Mission status is one ofdraft, scheduled, recurring, active, paused, completed, failed, or cancelled.
- Direct execution starts from
draft,scheduled,recurring,failed, orcancelled. - A checkpoint pauses execution until explicitly resumed.
- A recurring run returns to
recurringafter success or failure. - A scheduled one-shot returns to
scheduledafter failure so the scheduler can retry it; after success it remains completed.
Temporary team
data.team is an array of agent configs. At mission start, Polpo registers each member as a volatile agent tied to that mission run. With the default volatileCleanup: "on_complete", those agents are removed after the group reaches a terminal state. Set project enableVolatileTeams to false to disable registration, or volatileCleanup: "manual" to retain them.
Temporary agents receive volatile and missionGroup internally. Do not put a { name, volatile, agents } wrapper around data.team.
Gates, checkpoints, and delays
All three constructs require a uniquename, non-empty afterTasks, and non-empty blocksTasks.
Use durations such as
PT30M, PT2H, or P1D.
Report
A completedMissionReport contains missionId, execution group, allPassed, totalDuration, a tasks array, aggregated filesCreated, filesEdited, and optional outcomes and avgScore. Each task report contains title, done or failed status, duration, optional score, file lists, and outcomes.
See the Missions API for editing mission tasks, gates, checkpoints, delays, team members, and notifications.