Encapsulated agent task
Run an agent loop as one bounded activity with explicit limits and validation.
prepare objectiverun agent loopvalidate outputpublish resultstore trace
Activity responsibilities
| Activity | Responsibility |
|---|---|
prepare-objective | Execute the prepare objective stage and publish its declared outputs for downstream activities. |
run-agent-loop | Execute the run agent loop stage and publish its declared outputs for downstream activities. |
validate-output | Execute the validate output stage and publish its declared outputs for downstream activities. |
publish-result | Execute the publish result stage and publish its declared outputs for downstream activities. |
store-trace | Execute the store trace stage and publish its declared outputs for downstream activities. |
Inputs
- Objective and context
- Tool allowlist
- Iteration limits
Outputs
- Validated result
- Tool outputs
- Agent trace
Provenance to preserve
- Prompt and model
- Tool calls
- Cost and validation
Runnable example
This is the complete checked-in bundle for this pattern. Download the environment, scope, topology, workflow, input, container recipe, runner, and validation contract from this page before executing it.
Verified local execution
These captures and the output manifest were produced by the fixture's local Docker run and validator. They are published with the same bundle as the runnable files.



Execution considerations
Apply timeout, cancellation, restricted credentials, and idempotency to any external side effect.
AkôFlow boundary: the engine schedules, deploys, executes, transfers data, and records evidence. The ML or agent framework remains an implementation choice inside each activity.