Skip to main content

Module workflows

Module workflows 

Source
Expand description

Dynamic workflows: many child agents orchestrated by a script the model writes.

A workflow is built on the same child sessions spawn_agent uses, so it is available only when subagents are on. The difference is where the plan lives: with spawn_agent the model decides what to start next on every turn, and every result lands in its context. With a workflow the plan is a script, and only the final answer comes back.

Structs§

AgentSnapshot
One agent as shown in the progress view.
Journal
Results kept from an earlier run of the same script, so that a stopped run resumes instead of starting over.
PhaseSnapshot
One phase, with its agents.
RunRecord
One run, with the script that produced it.
RunSnapshot
The whole run as shown in the progress view.
RunSummary
A run as listed in /workflows.
SavedWorkflow
A workflow found on disk.
Script
A parsed workflow script.
WorkflowPlan
What the user is shown before a run starts.
WorkflowRuntime
The workflow runs belonging to one session.

Enums§

AgentOutcome
How one child agent ended.
AgentStatus
ApprovalDecision
What the user decided when asked to approve a run.
RunStatus
SaveLocation
Where a saved workflow can be written.

Functions§

authoring_prompt
Build the instructions, including the size advice the user chose.
discover
Find every saved workflow, with the project’s copy winning on a name clash.
save
Write a workflow script, refusing to follow a symbolic link.
workflow_trigger
Find the complete word or phrase that asks for a dynamic workflow.

Type Aliases§

AgentId
Identifies one agent() call site by its position in the run.
RunId
Identifies one run within a session.
WorkflowApprover
Asks the user to approve a run. Interactive mode installs one. Other modes leave it unset and runs start without asking, since nothing can answer.