kubeswarm Agent Teams and Pipelines
A kubeswarm SwarmTeam composes multiple AI agents into a workflow on Kubernetes. Three execution modes let you choose the right orchestration pattern for your use case.
Pipeline Mode
A DAG of steps executed in dependency order. Each step targets an agent.
spec:
pipeline:
- role: researcher
inputs:
prompt: "Research {{ .input.topic }}"
- role: writer
dependsOn: [researcher]
inputs:
prompt: "Write about:\n{{ .steps.researcher.output }}"
output: "{{ .steps.writer.output }}"
Steps pass data via Go template expressions. dependsOn controls ordering.
Dynamic Mode
Agents delegate to each other at runtime using the built-in delegate() tool.
spec:
entry: coordinator
roles:
- name: coordinator
canDelegate: [researcher, writer]
- name: researcher
- name: writer
The coordinator's LLM decides when to delegate. No fixed DAG.
Routed Mode
An LLM router picks the best agent from the SwarmRegistry based on the request.
spec:
routing:
registryRef:
name: default
model: claude-haiku-4-5-20251001
fallback: general-agent
No pipeline, no roles - the team adapts to what each request needs.
Execution Records
Every run creates a SwarmRun - an immutable execution record with inputs, outputs, token counts and phase transitions. SwarmRun is to SwarmTeam what Job is to CronJob.
kubectl get swrun -w
kubectl describe swrun my-run-20260403