Documentation
Docs
Getting Started

Running Your First Goal

Shift from task-based scripts to autonomous, goal-driven orchestration.

Goals vs. Tasks

In traditional automation, you write a script that says "Do A, then B, then C." In Consonant, you submit a Goal: "Acknowledge this refund request and verify it against our policy."

The Consonant Planner then looks at all registered agents, identifies the best fits, and executes the necessary steps across the distributed cluster.

Executing via CLI

The cons run command is your primary interface for triggering complex agent interactions. The --goal flag sends your request directly to the Planner.

bash
cons run --goal "Analyze the last 5 transactions for user @paul and flag anything over $500 for secondary review." --stream

The Execution Lifecycle

When you run a goal, you are watching a distributed system in action. The --stream flag shows you the live routing decisions:

// SESSION: f8e9-22c1 (Goal-Driven)
00:01sPLANNERDecomposing goal into 2 steps
00:03sROUTINGSending Context to [Gatekeeper] agent...
00:07sROUTINGGatekeeper result: "Authorized". Sending to [TransactionAuditor]...
00:12sFINISHResult: 2 transactions flagged. View trace at /sessions/f8e9-22c1
The Power of Async

For long-running goals (e.g., "Research this 50-page PDF"), use the --async flag. Consonant will return a Run ID immediately, allowing you to check status or tail logs later.