Higher-order workflows for autonomous agents. Pass named skills or inline plan arrays as parameters to compose multi-step pipelines with conditional routing, human approval gates, and variable references between steps. Save verified workflows as reusable skills.
Real agent work requires composable multi-step pipelines. Flow treats workflows as
first-class values — named skills and inline plan arrays can be passed as parameters
to other tool calls, enabling higher-order composition. Steps reference outputs from
previous steps via $variable syntax, branches execute conditionally, and
human approval gates pause execution for sensitive operations. Once a workflow is
verified, save it as a skill — a reusable tool that any agent on your server can call
by name without re-planning.
$variable references). Supports CTC validation, parallel branches, and optional skill saving
$compute plan based on runtime values
Flow is higher-order: named skills and unnamed inline plans are interchangeable.
Pass a skill name as a string parameter or embed a plan array directly
in the tool call arguments. Steps within a plan reference earlier outputs via
$variable syntax. flow.route branches can contain inline
$compute plans that execute conditionally — functions passed as arguments
to other functions, just like functional programming.
When flow.into
executes a workflow successfully, it can be saved as a
skill
with
its CTC — a cryptographic verification that the plan was validated
for type safety, cost bounds, and policy compliance. Skills appear as regular tools that any
agent on your server can call — no re-planning, no re-verification. Each execution is auditable
by CTC ID through inspect.ctc-executions.
{
"name": "data-grout@1/flow.route@1",
"arguments": {
"cache_ref": "rc_lead_data",
"branches": [
{ "when": "$is_enterprise", "then": "my-skill/enterprise-onboarding" },
{ "when": "_", "then": "my-skill/standard-onboarding" }
]
}
}