Higher-order workflow orchestration for autonomous agents. Compose multi-step plans from any tool, pass flows as parameters to other flows, and save validated workflows as reusable skills with cryptographic trust certificates.
A single tool call is an atom of work. Real tasks are molecules — multi-step sequences with branching, parallelism, approvals, and data flowing between steps. Most agent frameworks handle this with imperative code. Flow treats workflows as first-class values: define a plan, validate it against Prolog invariants, execute it, and optionally save it as a reusable skill that other flows can invoke. Flows are higher-order — a named skill or an inline plan array can be passed as a parameter to another tool call, enabling functional composition at the orchestration layer.
Validation
Prolog Invariants
No cycles, type-safe variable refs, policy-compliant
Semantic Lint
Warnings for unused outputs, missing inputs, type mismatches
Execution
Steps execute sequentially, with parallel branches and conditional routing. Variable references ($varname) pass data between steps. Format modifiers (:json, :csv, :markdown) transform outputs inline.
Every validated plan receives a Cognitive Trust Certificate — a cryptographically signed attestation of what the plan does, what it accesses, and its determinism profile. Saved skills are exposed as standard MCP tools, callable by any agent or flow.
Flows are values. A named skill or an inline plan array can be passed as a parameter to any tool call — enabling functional composition where workflows orchestrate other workflows.
flow.route evaluates an ordered list of branches against a payload. First match wins. Supports full predicate arrays, path shorthand, and catch-all patterns.
flow.request-approval pauses execution for user confirmation. flow.request-feedback requests missing data before proceeding. Both integrate with the approvals API.
Validated plans save as skills with versioning, input/output schemas, and CTCs. Skills are exposed as MCP tools — other agents can discover and invoke them like any tool.
Plans are validated against symbolic invariants: no cycles, type-safe variable references, policy compliance. Catches errors before execution, not during.
Plans can be scheduled via Governor — "daily at 9am", "every 5 minutes", or event-driven triggers like "whenever 10 new leads arrive".
// A multi-step workflow: fetch lead, transform, create invoice { "name": "flow.into", "arguments": { "name": "lead_to_invoice", "plan": [ { "tool": "salesforce@v1/get-lead@v1", "args": { "id": "$input.lead_id" }, "output": "lead" }, { "type": "focus", "source_type": "crm.lead@1", "target_type": "billing.customer@1", "input": "$lead", "output": "customer" }, { "tool": "quickbooks@v1/create-invoice@v1", "args": { "customer": "$customer" }, "output": "invoice" } ], "save_as_skill": true } } // Higher-order: pass a saved skill as a parameter to another tool // The skill "lead_to_invoice" is now callable like any other tool // Other flows can invoke it, schedule it, or route into it
The plan is validated, executed, and saved as a reusable skill in one call. The skill gets a CTC, appears in tool discovery, and can be invoked by any agent — including from inside other flows. This is higher-order composition: workflows that orchestrate other workflows.
Chain tools across Salesforce, QuickBooks, Slack, and any MCP server. Variable references pass data between steps. Focus operations transform data types at boundaries.
Schedule workflows via Governor — time-based cron, event-driven triggers, or conditional preconditions. Combine with approval gates for human-in-the-loop control over destructive operations.
Build a catalog of validated, CTC-signed skills that agents discover and compose. Each skill is versioned, schema-typed, and carries a cryptographic attestation of its behavior.