feat(arcan): wire lago-knowledge into agent lifecycle (BRO-604)#657
feat(arcan): wire lago-knowledge into agent lifecycle (BRO-604)#657
Conversation
…t, events (BRO-604)
Three-layer knowledge integration for Arcan agents:
Layer 1 — Knowledge Tools:
- WikiSearchTool: hybrid BM25 + graph proximity search as an agent tool
- WikiLintTool: knowledge graph health check as an agent tool
Layer 2 — Context Compiler Block:
- build_knowledge_block(): assembles L0+L1 from entity pages as
ContextBlock::Retrieval (~600 tokens), injected into every LLM call
- build_index_from_dir(): builds KnowledgeIndex from local .md files
Layer 3 — Lifecycle Events:
- knowledge.indexed: emitted when index is built, carries note count + health
- knowledge.searched: emitted on searches, carries query + result count
Every Life/Arcan agent is now knowledge-aware natively — no hooks, no Python,
pure Rust in the agent loop.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (5)
📝 WalkthroughWalkthroughThis PR introduces knowledge management integration into the arcan-lago crate by adding the Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related issues
Possibly related PRs
Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary
Three-layer integration of lago-knowledge into Arcan's agent loop. Every Life/Arcan agent becomes knowledge-aware natively — no hooks, no Python, pure Rust.
Layer 1 — Knowledge Tools (agent self-directs)
WikiSearchTool: hybrid BM25 + graph proximity search exposed as an agent toolWikiLintTool: knowledge graph health check exposed as an agent toolLayer 2 — Context Compiler Block (automatic injection)
build_knowledge_block(): assembles L0+L1 from entity pages asContextBlock::Retrieval(~600 tokens)build_index_from_dir(): buildsKnowledgeIndexfrom local.mdfiles with backingBlobStoreLayer 3 — Lifecycle Events (observability)
knowledge.indexed: emitted when index is built (note count + health score)knowledge.searched: emitted on searches (query + result count + top score)Files changed
arcan-lago/Cargo.toml— addlago-knowledgedependencyarcan-lago/src/knowledge_tools.rs(new) — WikiSearchTool, WikiLintToolarcan-lago/src/knowledge_context.rs(new) — context block builder + index helperarcan-lago/src/knowledge_events.rs(new) — lifecycle event constructorsarcan-lago/src/lib.rs— module registration + exportsTest plan
cargo check -p arcan-lagopassescargo clippy -p arcan-lago— zero warnings🤖 Generated with Claude Code
Summary by CodeRabbit