Agent Mode¶
Autonomous code generation with SRBN.
What is Agent Mode?¶
Agent Mode uses the Stabilized Recursive Barrier Network (SRBN) to autonomously:
Decompose tasks into subtasks
Generate code for each subtask
Verify with LSP and tests
Commit stable changes to the Merkle ledger
Quick Start¶
perspt agent "Create a Python calculator"
How It Works¶
![digraph srbn {
rankdir=LR;
node [shape=box, style="rounded,filled", fontname="Helvetica", fontsize=10];
task [label="Task", shape=ellipse, fillcolor="#E3F2FD"];
sheaf [label="Sheafify", fillcolor="#E8F5E9"];
spec [label="Speculate", fillcolor="#FFF3E0"];
verify [label="Verify", fillcolor="#F3E5F5"];
commit [label="Commit", fillcolor="#C8E6C9"];
task -> sheaf -> spec -> verify;
verify -> spec [label="retry", style=dashed];
verify -> commit [label="stable"];
}](../_images/graphviz-d2d5a574c06aecbb4cf53aa5e82c7052aad97d2c.png)
Model Tiers¶
Tier |
Purpose |
Example |
|---|---|---|
Architect |
Task decomposition |
|
Actuator |
Code generation |
|
Verifier |
Stability check |
|
Speculator |
Fast lookahead |
|
Common Commands¶
# Basic
perspt agent "Create module"
# With workspace
perspt agent -w ./project "Add tests"
# Auto-approve
perspt agent -y "Refactor"
# Production-grade
perspt agent \
--architect-model gpt-5.2 \
--stability-threshold 0.05 \
--max-cost 10.0 \
"Implement auth"
Review Process¶
When changes need approval:
╭─────────────────────────────╮
│ Review Changes │
╞═════════════════════════════╡
│ + main.py (new) │
│ + tests/test_main.py (new)│
│ │
│ [y] Approve [n] Reject │
╰─────────────────────────────╯
Session Control¶
perspt status # Check progress
perspt abort # Cancel
perspt resume # Resume
See Also¶
Agent Mode Tutorial - Full tutorial
SRBN Architecture - Technical details
Agent Options - CLI reference