Summary
brane loop — autonomous research cycle. Give brane a goal, it reflects on gaps, searches the web, digests findings, and repeats until convergent.
Why
This is the capstone. An agent with digest, ask, and storm can consume, query, and explore — but a human has to drive it. Loop makes brane self-directed: "learn everything about X" becomes a single command. Bunny's loop does this with web search + digest in a cycle. We do the same but write into the structured graph.
What
CLI
brane loop "understand JWT refresh token rotation patterns"
brane loop "map the competitive landscape for vector databases" --rounds 5
brane loop --resume <id> # resume a paused loop
brane loop list # show all loops with status
Flags
--rounds <n> — max rounds (default: 5)
--resume <id> — resume a previous loop
--dry-run / -n — show what would happen without writing
--json / -j — JSON output
Loop Cycle (per round)
- Reflect — LLM examines current knowledge vs goal, identifies gaps
{ gaps: string[], queries: string[], assessment: string, converging: boolean }
- Search — execute web searches for identified queries
- Fetch — load top URLs from search results
- Digest — feed fetched content through
digest pipeline
- Journal — record what was searched, fetched, digested this round
State Persistence
Loop state is stored so loops can be resumed:
{
id: string,
goal: string,
status: "running" | "converged" | "paused" | "max_rounds",
rounds_completed: number,
search_history: string[], // avoid re-searching
created_at: string,
updated_at: string
}
Convergence
Loop stops when:
- LLM signals
converging: true for 2 consecutive rounds
- Max rounds reached
- No new search results found
Web Search
Uses existing LLM tool-use infrastructure (Claude with WebSearch tool). Search history prevents duplicate fetches across rounds.
MCP Tool
loop: { goal: string, rounds?: number, dry_run?: boolean }
loop_resume: { id: string }
loop_list: {}
Depends On
Acceptance
Summary
brane loop— autonomous research cycle. Give brane a goal, it reflects on gaps, searches the web, digests findings, and repeats until convergent.Why
This is the capstone. An agent with digest, ask, and storm can consume, query, and explore — but a human has to drive it. Loop makes brane self-directed: "learn everything about X" becomes a single command. Bunny's loop does this with web search + digest in a cycle. We do the same but write into the structured graph.
What
CLI
Flags
--rounds <n>— max rounds (default: 5)--resume <id>— resume a previous loop--dry-run / -n— show what would happen without writing--json / -j— JSON outputLoop Cycle (per round)
digestpipelineState Persistence
Loop state is stored so loops can be resumed:
Convergence
Loop stops when:
converging: truefor 2 consecutive roundsWeb Search
Uses existing LLM tool-use infrastructure (Claude with WebSearch tool). Search history prevents duplicate fetches across rounds.
MCP Tool
Depends On
Acceptance