Skip to content

Workflow concepts

A workflow is a Python function run durably by Temporal. A worker executes its steps; the AgentWorkflows gateway decides whether each model or tool call is allowed, accounts for its cost, and writes a receipt. The console, CLI, and SDK share that same gateway API.

Concept What it means for your team
Team An authenticated sandbox ID with members, allowed providers, and a shared budget
Project A group of runs inside a team; a credential can be restricted to one project
Workflow A named, reviewed implementation with allowed models, tools, destinations, and per-run limits
Run One execution, identified by an exact UUID; retries create a new run and budget
Activity A model, tool, agent, or container step; completed activities are replayed from history after worker failure
Approval A durable pause with a reviewable draft; an admin or approver submits one authenticated decision
Receipt A redacted, hash-chained gateway event with run/step IDs, policy decision, provider, usage, and cost

Follow one run

  1. A builder starts an approved workflow in a project through the gateway.
  2. Temporal schedules it on the team's queue (TEAM-workflows). Its worker executes activities using a team-bound credential with workflows:execute.
  3. Every activity goes through the gateway's allowlists, data classification, secret checks, and team/run budgets. Provider credentials stay on the gateway.
  4. ApprovalWorkflow.approval(draft) exposes the draft in the console and CLI and waits up to seven days. An approver or admin approves or rejects it as their verified identity.
  5. Inspect the run's result, budget, and timeline. Export and verify the retained audit log when you need evidence beyond receipt IDs in the UI.

The local trial's admin key performs all human roles for convenience. Give members and workers separate credentials for team use; team setup describes the policy files. Keep Temporal and worker access with operators; end users work through the gateway.

Durability and accounting

Temporal saves completed activity results. A worker restart resumes waiting approvals and completed steps from history. An activity interrupted during an external action runs again, so approved tools honor the supplied idempotency key. Container steps run once. Cancellation applies to steps that have not yet run.

The tighter of the workflow's requested budget and the team's workflow policy applies. All runs also consume the shared team budget. Accounting uses configured token prices and conservative reservations; reconcile it against provider billing.

Receipts cover activity that passes through the gateway. They detect changes and internal gaps in retained chains, and external anchors detect complete rewrites or truncation. The fake produces synthetic answers, tool results, and prices to demonstrate the governed path; connect a real provider to evaluate research quality.

Continue with templates, architecture, security boundaries, and the workflow guide.