Directive
Clear instruction on what needs to be done
Moira is a workflow orchestration engine designed specifically for AI agents. It guides agents through multi-step processes using structured workflows with clear directives and success criteria.
AI agents are powerful but need structure. Without guidance, they can:
Moira provides a node-graph workflow system where each step has:
Directive
Clear instruction on what needs to be done
Completion Condition
Success criteria that must be met
Input Schema
Expected structure of the response (optional)
Connections
Links to next steps in the workflow
The agent executes each step, validates completion, and moves to the next node based on the workflow graph.
flowchart LR
A[Start Workflow] --> B[Execute Step]
B --> C{Validate Completion}
C -->|Success| D[Next Step]
D --> B
C -->|Workflow Complete| E[End]step() toolA workflow is a directed graph of nodes. Each node represents a step in the process. Nodes can branch conditionally, loop, or delegate to subgraphs.
{ "id": "my-workflow", "metadata": { "name": "My Workflow", "version": "1.0.0", "description": "Example workflow" }, "nodes": [ { "id": "start", "type": "start", "connections": { "default": "task-1" } }, { "id": "task-1", "type": "agent-directive", "directive": "...", "connections": { "success": "end" } }, { "id": "end", "type": "end" } ]}Moira supports 7 node types:
| Type | Purpose |
|---|---|
start | Entry point for workflow execution |
end | Terminal node marking completion |
agent-directive | Task for agent with directive and completion condition |
condition | Branch execution based on structured conditions |
expression | Compute values using arithmetic expressions |
subgraph | Delegate to another workflow |
telegram-notification | Send notifications via Telegram |
Templates allow dynamic content in directives and conditions using {{variable}} syntax:
{ "directive": "Analyze {{projectName}} and create {{reportType}} report"}Variables can reference:
An execution is a running instance of a workflow. It maintains:
Moira connects to AI agents via Model Context Protocol. The MCP server provides tools for:
| Tool | Purpose |
|---|---|
list | Browse available workflows |
start | Begin workflow execution |
step | Execute current step and advance |
manage | Create, edit, and retrieve workflows |
session | Get user info and active executions |