Schema
AgentRunStepDefinition
Agent-run step β runs the FULL agentic loop (``WorkstreamV4Executor``) as one node in the declarative WDL step-DAG ("Autopilot"). Distinct from ``archie_query`` (a single orchestrator query that bypasses the verifier): an ``agent_run`` step works MULTI-TURN with a tool allowlist + declared deliverables until it is done or a budget cap is hit. Runs ``RunMode.AUTO_RUN`` by default (no per-step approval); interruptible via the cycle's pause/resume/cancel signals BETWEEN steps + the budget caps WITHIN the step (the workflow cannot pause mid-activity). The DB ``step_kind`` enum already carries ``agent_run`` (migration 20260601_0220).
| Field | Type | Description |
|---|---|---|
idrequired | string | β |
namerequired | string | β |
type | string | β |
description | string | null | β |
depends_on | string | object[] | β |
stage | string | null | β |
timeout | string | null | β |
retry_policy | RetryPolicy | null | β |
error_handler | StepErrorHandler | null | β |
emit_artifact | EmitArtifactSpec | null | β |
optional | boolean | β |
continue_on_error | boolean | β |
halt_conditions | HaltCondition[] | βitem shape |
parameters | StepParameter[] | βitem shape |
guards | StepGuard[] | βitem shape |
impact_level | "low" | "medium" | "high" | "critical" | Impact classification for steps.lowmediumhighcritical |
run_mode | "propose" | "auto_run" | Execution mode for steps.proposeauto_run |
requires_approval | boolean | β |
metadata | object | null | β |
examples | StepExample[] | null | Attached example files for this step. Each entry pairs a platform.file_uploads.file_id with a role + tags + notes so the runtime can shape its instruction. Bounded at 20 to keep a reasonable upper limit on the prompt preamble. |
applies_when | string | null | CEL predicate evaluated at MATERIALIZATION (not at step execution): the step is marked skipped when it evaluates False. Stored verbatim β the expression is parsed by celpy at launch, so any coercion here would change its meaning. |
tags | string[] | null | Categorical labels on the step itself (e.g. 'pdf-read', 'coutts', 'fy25'). Free-form; recommended tag set is documented per workstream surface. |
firm_question_codes | string[] | null | Blocker codes this step may raise that are questions the run asks the firm later, not reasons to stop. A code listed here is carried past the blocker barrier (and recorded on the run's carried_blockers) unless the resolution form refuses it. Matched exactly against the blocker codes this step itself raises; a code not listed here still stops the run. |
decides | any | treatment | classification | difference, when the step decides one |
domain_question | any | {domain, issue}: the domain question asked |
no_domain_reason | any | {reason, card_link}: no domain covers it |
goalrequired | string | Natural-language objective for the agentic loop (Jinja2-templated). |
domain | string | Accounting/domain knowledge key carried into the agent executor. |
client_id | string | null | Client identifier; may be a Jinja2 binding such as {{ inputs.client_id }}. |
context | object | Typed WorkPlan/client context, recursively Jinja2-rendered at execution.show nestedEmpty object. |
model_role | string | null | Logical runtime-model role (for example accounting_review), never a provider or concrete model id. Resolved by the central routing policy. |
tools | string[] | null | Tool allowlist for the agent, passed to build_tool_router(allowed_tools=β¦). None = all cycle tools. |
deliverables | object[] | null | Declared deliverables (name + type [+ description/schema]) the agent must produce. |
max_turns | integer | Tool-loop turn cap β the in-step interruptibility bound. |
max_cost_usd | number | Cost budget cap in USD. |
max_duration_minutes | integer | Wall-clock cap in minutes. |
source_tracing | boolean | Require the agent loop's outputs to retain source tracing. |
human_checkpoints | string[] | Named checkpoints enforced by the agent guardrail contract. |
inputs | object | null | Optional Jinja2 input bindings ({{ inputs.* }} / {{ outputs.* }}). |
expected_outputs | object[] | null | Output schema hints for DAG threading (name + type per entry). |