AgentWorkflow CRD lets you describe a multi-step AI pipeline entirely in YAML. When you apply an AgentWorkflow, the Flokoa operator compiles it into an Argo WorkflowTemplate — a reusable, versioned pipeline definition managed by Argo Workflows. Your pipeline can call deployed Agent CRs via the A2A protocol, run Marvin-powered tasks in ephemeral containers, execute arbitrary container workloads, make HTTP requests, and branch conditionally — all wired together as a directed acyclic graph (DAG) through dependsOn declarations.
AgentWorkflow requires Argo Workflows to be installed in your cluster. The operator compiles each AgentWorkflow into an Argo WorkflowTemplate. Individual pipeline runs are triggered by creating Argo Workflow resources that reference the generated template.API reference
Spec fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
description | string | — | — | Human-readable description of the workflow’s purpose |
params | object[] | — | — | Workflow-level input parameters (see below) |
tasks | object[] | ✅ | — | The pipeline tasks to execute; at least one is required |
timeout | duration | — | — | Maximum wall-clock duration for the entire workflow (e.g. "1h") |
retryStrategy | object | — | — | Default retry policy applied to all tasks unless a task overrides it |
serviceAccountName | string | — | flokoa-workflow | Kubernetes ServiceAccount used by workflow pods |
automountServiceAccountToken | bool | — | true | Whether to mount the service account token into workflow pods (required by Argo executor plugins) |
params
Each parameter inspec.params has:
| Field | Required | Description |
|---|---|---|
name | ✅ | Parameter name, referenceable in task expressions as {{params.<name>}} |
description | — | Human-readable explanation of the parameter |
value | — | Default value; if omitted, the parameter must be supplied at submission time |
tasks
Each task inspec.tasks must have a name and exactly one task type:
| Task type | Description |
|---|---|
agent | Call a deployed Agent CR via the A2A protocol |
agentTask | Run a Marvin-powered task in an ephemeral container |
container | Run an arbitrary container workload |
http | Make an HTTP request to an external service |
switch | Route to different tasks based on a previous task’s output |
| Field | Description |
|---|---|
dependsOn | List of task names that must complete before this task starts (DAG edges) |
timeout | Maximum duration for this individual task |
retryStrategy | Override the workflow-level retry policy for this task |
condition | Expression that must evaluate to true for the task to run; skipped otherwise |
Basic example
The following workflow takes a topic as input, calls a research agent to gather information, and then passes that output to a summarisation agent:Multi-task pipeline with conditional branching
Retry strategy
You can define a default retry strategy at the workflow level and override it per task:Status fields
After the operator compiles theAgentWorkflow into an Argo WorkflowTemplate, it updates the following status fields:
| Field | Description |
|---|---|
ready | true when the Argo WorkflowTemplate has been successfully compiled and applied |
workflowTemplateName | Name of the generated Argo WorkflowTemplate CR |
specHash | Hash of the current spec — the operator skips recompilation if this has not changed |
observedGeneration | Last spec generation reconciled by the operator |
conditions | Standard condition array; the Ready condition carries error details |
kubectl operations
Best practices
- Install Argo Workflows before creating AgentWorkflows — the operator depends on Argo CRDs being present. Verify with
kubectl get crd workflowtemplates.argoproj.io. - Name tasks clearly — task names appear in Argo’s UI and logs; descriptive names like
classify-intentmake pipelines much easier to debug thantask-1. - Use
paramsfor runtime inputs — avoid hard-coding values that change between runs directly in tasktextfields; parameterise them instead. - Set workflow and task timeouts — unbounded workflows can consume cluster resources indefinitely; always define a maximum duration.
- Define
retryStrategyat the workflow level and override only for tasks with special requirements — this keeps retry logic consistent and reduces verbosity. - Use
dependsOnto express ordering explicitly — do not rely on list order; the DAG is the source of truth for execution order. - Keep
serviceAccountNamein a dedicated ServiceAccount with the minimum RBAC permissions needed by workflow pods. - Version-control your
AgentWorkflowmanifests alongside theAgentCRs they call — changing an agent’s API without updating the workflow that calls it will cause runtime failures.
