GUIDE
Orchestration Engine
How Consonant decomposes high-level goals into executable plans using LangGraph and dynamic routing.
At the heart of Consonant is a reasoning engine powered by LangGraph. Unlike traditional workflow engines (Airflow, Temporal) that execute static DAGs, Consonant builds the DAG at runtime based on the goal.
How Planning Works
- Intent Analysis: The Planner (LLM) analyzes the user's goal string.
- Capability Matching: It searches the registry for agents with semantic relevance.
- Plan Generation: It constructs a step-by-step plan, identifying dependencies.
- Execution & refinement: Steps are executed. If a step fails, the planner observes the error and re-plans.
Running a Workflow
You can trigger workflows via the CLI or the REST API.
bash
consonant run --goal "Analyze Q3 sales data and generate a forecast chart"Behind the scenes, Consonant might generate a plan like this:
text
[PLAN]
1. data-analyzer: extract_sales_data(quarter="Q3")
2. data-analyzer: generate_forecast(data=$1)
3. chart-renderer: create_line_chart(data=$2)Handling Failures
Consonant automatically handles agent failures. You can configure retry policies at the global or agent level.
Self-Correction
Because the orchestration is LLM-driven, Consonant can often "reason" its way out of errors. For example, if an agent returns "Invalid Date Format", the planner might try again with a corrected format without human intervention.Parallel Execution
Independent steps are automatically executed in parallel. The planner identifies which tasks do not depend on each other and schedules them concurrently to minimize latency.