Skip to main content

Encapsulated agent task

Run an agent loop as one bounded activity with explicit limits and validation.

Encapsulated agent task

Activity responsibilities

ActivityResponsibility
prepare-objectiveExecute the prepare objective stage and publish its declared outputs for downstream activities.
run-agent-loopExecute the run agent loop stage and publish its declared outputs for downstream activities.
validate-outputExecute the validate output stage and publish its declared outputs for downstream activities.
publish-resultExecute the publish result stage and publish its declared outputs for downstream activities.
store-traceExecute 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.

Encapsulated agent task workflow execution evidence
Workflow evidence
Encapsulated agent task execution evidence
Execution evidence
Encapsulated agent task output evidence
Output evidence
Open verified output manifest ↓

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.