Intent System
The Intent System provides declarative, LLM-based decomposition of high-level goals into executable sub-task DAGs, with a Reconciler that continuously drives toward the desired state.
Overview
Instead of manually defining each agent step, declare what you want and let Rnix figure out how:
$ rnix intent apply "Refactor the authentication module to use JWT tokens"
[intent] decomposing...
[intent] created intent tree with 5 nodes:
analyze → design → implement → test → review
[intent] executing...Core Concepts
Intent Tree
An Intent Tree is a DAG of sub-tasks generated by LLM decomposition:
Intent: "Refactor auth to JWT"
├── analyze: "Analyze current auth implementation" [completed]
├── design: "Design JWT architecture" [executing]
│ depends_on: [analyze]
├── implement: "Implement JWT flow" [pending]
│ depends_on: [design]
├── test: "Write tests for JWT auth" [pending]
│ depends_on: [implement]
└── review: "Review and validate" [pending]
depends_on: [test]Intent States
pending → decomposing → await_confirm → executing → completed
│
└→ failed → retrying → executing| State | Description |
|---|---|
pending | Waiting for dependencies |
decomposing | LLM generating sub-tasks |
await_confirm | Waiting for user confirmation (if enabled) |
executing | Agent process running |
completed | Successfully finished |
failed | Execution failed |
retrying | Retry in progress |
Reconciler
The Reconciler is the event-driven engine that continuously drives the intent tree toward completion:
loop:
1. Compute runnable nodes (all dependencies satisfied)
2. Spawn agent for each runnable node
3. Monitor execution
4. Handle results (mark completed or failed)
5. Detect drift (desired vs current state)
6. Retry failed nodes (up to max_retries)
7. Cascade failure (mark downstream dependents as failed)
8. Check termination (all nodes in terminal state?)Drift Detection
The Reconciler compares desired state (all nodes completed) with current state. Drift types:
| Drift | Description |
|---|---|
node_failed | A node has failed |
node_timeout | A node exceeded timeout |
new_requirement | New sub-task identified |
node_modified | Node intent was changed |
Incremental Updates
Update the desired state while execution is in progress — only the delta is executed:
$ rnix intent apply "Also add refresh token support"
[intent] computing incremental diff...
[intent] adding 2 new nodes: implement-refresh, test-refresh
[intent] existing completed work preservedAlready-completed nodes are not re-executed. The Reconciler computes only the changes needed.
Status Query
$ rnix intent status
Intent: "Refactor auth to JWT"
Nodes: 5 total (3 completed, 1 executing, 1 pending)
✓ analyze PID 10 completed (1,200 tokens, 3.2s)
✓ design PID 11 completed (1,800 tokens, 5.1s)
✓ implement PID 12 completed (3,400 tokens, 12.3s)
● test PID 13 executing step 3/10
○ review — pending (blocked by: test)
Budget: 12,400 / 20,000 tokens (62%)
Drift: noneFailure Handling
Retry
Each node can specify max_retries. On failure: if retries remain → re-execute; if exhausted → cascade failure.
Failure Cascade
When a node fails permanently, all downstream dependents also fail:
A (failed) → B (failed: upstream) → C (failed: upstream)Node Reset
Reset a failed node to retry from scratch:
$ rnix intent reset <node-id>
# Clears state, error, PID, result, retry count
# Preserves timeout and max_retries configurationIntent + Autonomous Agents
The Intent System works naturally with autonomous agents — each decomposed node can be executed by an agent that independently decides its approach through the unified reasoning loop. The Reconciler handles coordination while agents handle execution autonomously.
Related Documentation
- Compose Orchestration — Static DAG workflows
- Autonomous Agents — Unified reasoning loop
- AgentShell — Scripting-based orchestration
- Token Economy — Budget management