Orchestrator

Turning a natural-language request into an executable workflow graph.

The Orchestrator is how MeghaOS handles requests that require doing multiple things β€” "search for AI news, summarize it, and email me the result." It uses AI to decompose the request into a graph (a DAG) of steps, then hands that graph to the Workflow Engine to execute.

The flow

Decompose

AI breaks the request into a list of steps.

Fill gaps

For any capability that doesn't exist yet, a creation step is scheduled first (see auto-creation).

Execute

Run the graph β€” independent steps in parallel.

Report

Return a task-tracker summarizing each step's status.

Decomposition

The planner doesn't consider every capability at once. It first finds the most relevant tools for your request, then asks the AI to produce a plan. Each step describes:

json
{
 "id": "s1",
 "agent": "web_search",
 "action": "SEARCH_WEB",
 "args": { "query": "latest AI news" },
 "depends_on": [],
 "outputs": ["results"],
 "needs_human": false,
 "persona": "researcher"
}
FieldMeaning
idUnique step identifier
agentThe capability group that owns the tool
actionThe tool to invoke
argsInputs; may reference prior outputs with $key
depends_onStep IDs that must finish first (empty β‡’ runs in parallel)
outputsNames of values this step produces
needs_humanIf true, the step pauses for review before executing
personaOptional specialized role (see below)
Tip

Steps with no depends_on run in parallel. Use $key in an argument to consume an output from an earlier step β€” that's how data flows through the graph.

Personas (role-based steps)

MeghaOS supports personas. The planner assigns a role per step:

Step kindPersona
Researchresearcher
Writingwriter
Codecoder
Analysisanalyst
Coordinationcoordinator

At execution time the role's expertise is injected into the prompt for that step, producing more domain-specialized output. A step can also delegate work to another role mid-flight. See Personas.

Auto-creating missing capabilities

If the plan references a capability that doesn't exist, the orchestrator doesn't fail β€” it creates it. A creation step is scheduled before the step that needs it (planning-time), and a runtime safety net covers anything still missing at execution time. See Self-Extension.

Two execution paths

MeghaOS prefers the Orchestrator (parallel graph). If that path errors, it falls back to a simpler sequential executor that runs the steps one after another.