Overview
A workflow defines the shape of an agent session — what the agent should do, with which prompt, using which plugins, under which isolation level, and whether to loop.
What a Workflow Bundles
| Component | Purpose |
|---|---|
promptTemplate | Initial prompt injected into the session |
systemPromptFile | Markdown file used as the system prompt |
plugins[] | Plugin references auto-loaded on activation |
loop | Iterative execution config (completion markers, max iterations) |
isolation | Permission preset for the session |
model | Model override |
env | Environment variables for the agent process |
Activating a Workflow
Install first (see Marketplace), then activate:
athena-flow --workflow=e2e-test-builderOr set it in your project config:
{
"workflow": "e2e-test-builder"
}When a workflow activates, it:
- Auto-loads its declared
plugins[] - Applies its
isolationpreset (upgrading from yours if needed, with a warning) - Injects
promptTemplateandsystemPromptFile - Runs loop logic if
loop.enabled
Plugin Bundles
Workflows declare plugin dependencies in plugins[]:
{
"plugins": [
"e2e-test-builder@lespaceman/athena-workflow-marketplace",
"site-knowledge@lespaceman/athena-workflow-marketplace"
]
}These are resolved exactly like --plugin flags. Duplicates with config/CLI plugins are deduplicated.
Plugin Load Order
- Workflow
plugins[] - Global config
plugins[] - Project config
plugins[] --pluginCLI flags
Later entries win on name conflicts.
Workflow Discovery
If a loaded plugin directory contains a workflow.json at its root, Athena auto-discovers it. If exactly one workflow is discovered and no --workflow flag is set, it activates automatically. Multiple discovered workflows require an explicit --workflow selection.