Preview — Cortex Workflows is available on all plans. The API and workflow schema may change during the preview period.
YAML-driven intelligent automation built on the Cortex runtime. Define multi-step workflows that combine LLM reasoning, integration actions, Guard scanning, and Vault audit logging into repeatable pipelines.
Plan limits:
| Plan | Active Workflows | Daily Executions |
|---|---|---|
| Free | 1 | 5 |
| Pro | 10 | 100 |
| Max | Unlimited | Unlimited |
| Enterprise | Unlimited | Unlimited |
Workflows are defined in YAML and stored as JSON in the database. Each workflow consists of metadata, an optional trigger, and a list of steps.
name: content-review-pipeline
description: Review and classify incoming content
trigger:
type: event
event_type: agent.event.ingested
steps:
- id: classify
type: llm
config:
prompt: "Classify this content: {{ trigger.payload.text }}"
model: auto
- id: check-pii
type: guard_scan
config:
text: "{{ trigger.payload.text }}"
- id: route
type: condition
config:
expression: "{{ steps.classify.output.category == 'sensitive' }}"
if_true: escalate
if_false: approve
- id: escalate
type: human_review
config:
message: "Content flagged as sensitive"
- id: approve
type: vault_log
config:
event_type: content.approved
| Type | Description |
|---|---|
llm |
Send a prompt to an LLM via Cortex routing. Supports model: auto for complexity-based routing. |
adapter |
Call an external integration (Google Calendar, Slack, HubSpot, etc.) via the integration registry. |
condition |
Branch execution based on a Jinja2 expression. |
transform |
Transform data using Jinja2 templates. |
wait |
Pause execution for a duration or until an external event. |
human_review |
Pause for human approval. Resumes via the API or dashboard. |
webhook_out |
Send an HTTP request to an external URL. |
guard_scan |
Run Guard PII/injection/content scanning on text. |
score |
Compute or retrieve a trust score for an agent. |
knowledge |
Query the agent's knowledge base using RAG retrieval. |
vault_log |
Record a custom event to the Vault ledger. |
platform_query |
Query VeriSwarm platform data (agents, scores, events). |
send_email |
Send an email via the platform email service. |
web_search |
Perform a web search and return results. |
| Type | Description |
|---|---|
cron |
Execute on a schedule (standard cron syntax). Polled every 10 seconds. |
webhook |
Execute when an HTTP request hits the workflow's webhook URL. HMAC signature verification. |
event |
Execute when a specific VeriSwarm event type occurs (e.g., agent.scored). |
manual |
Execute on demand via API call or dashboard button. |
Steps can reference outputs from previous steps, trigger payloads, and environment variables using {{ }} template syntax.
| Variable | Description |
|---|---|
{{ trigger.payload }} |
The trigger event or webhook body |
{{ steps.<step_id>.output }} |
Output from a previous step |
{{ env.<VAR_NAME> }} |
Environment variable |
Each workflow execution tracks LLM token usage and cost. Per-step budget limits can be set in the workflow definition. If a step exceeds its budget, execution halts and the step is marked as budget_exceeded.
| Status | Description |
|---|---|
pending |
Queued for execution |
running |
Currently executing |
waiting |
Paused (wait step or human review) |
completed |
All steps finished |
failed |
A step encountered an error |
budget_exceeded |
Token/cost budget exhausted |
When Vault is enabled, every step execution is recorded in the ledger with the step type, input/output sizes, duration, and status. This provides a complete audit trail for workflow automation.
| Method | Path | Description |
|---|---|---|
POST |
/v1/workflows |
Create a workflow |
GET |
/v1/workflows |
List workflows |
GET |
/v1/workflows/{id} |
Get workflow details |
PUT |
/v1/workflows/{id} |
Update a workflow |
DELETE |
/v1/workflows/{id} |
Delete a workflow |
POST |
/v1/workflows/{id}/execute |
Trigger manual execution |
GET |
/v1/workflows/{id}/executions |
List executions |
POST |
/v1/workflows/{id}/executions/{exec_id}/approve |
Approve a human review step |
All endpoints require authentication via x-account-access-token.
For full endpoint details and rate limits, see the API reference.