You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bug(company-os): heartbeat RAG queries an agent:<id> KB collection that no code path creates, so the agent scope is always empty #19579
LLCRAGAssembler.assemble() (autobot-backend/llc/kb/rag_assembler.py, _collections_for) queries an agent-scoped collection, now named by agent_collection(agent_id) = agent:<id> (the KbCollectionManager.AGENT_PREFIX format). No code path creates or writes that collection: KbCollectionManager.ensure_collection is never called with AGENT_PREFIX, and agent capability documents go to company:<company_id>:agents (llc/kb/capability_indexer.py). So the agent leg of every heartbeat query returns nothing.
Evidence (grep on the #19519 branch): grep -rn "AGENT_PREFIX\|agent_collection" autobot-backend/llc --include=*.py | grep -v /tests/ returns only the definition in llc/kb/collections.py and the reader in rag_assembler.py.
Decision needed: either write agent knowledge (diary, wiki) to agent:<id>, or point the agent leg at the collection that does hold agent knowledge. Under #19512 this naming is replaced by buckets in the main store, which may make the first option moot.
The agent leg of the heartbeat query reads a collection some code path writes; tested create-then-query.
Owner decision, 2026-10-25: agent and role knowledge goes into the #19512 buckets design: the heartbeat will read the agent's role/agent bucket once #19513 and its siblings land. No interim per-agent collection is built. Meanwhile the heartbeat should stop querying the never-created agent:<id> collection, so that leg isn't a silent no-op; it can ride with the next #19512-tree PR. Parent stays #19512.
changed the title [-]bug(llc): heartbeat RAG queries an agent:<id> KB collection that no code path creates, so the agent scope is always empty[/-][+]bug(company-os): heartbeat RAG queries an agent:<id> KB collection that no code path creates, so the agent scope is always empty[/+]on Oct 30, 2026
Decision needed: what should the agent leg of the heartbeat query read?
Nothing writes agent:<id>, so that leg always returns nothing. Capability documents go to company:<id>:agents, and the diary and wiki aren't in any collection this query reads.
Option
Effect
Cost
A. Remove the agent leg until #19512's buckets land
No query for an empty collection; the code says what's true
Agents get no personal knowledge in heartbeats until then
Landed on main in 58cbf98 (PR #20613). _collections_for in llc/kb/rag_assembler.py no longer has an agent leg, per the maintainer's choice of option A, and test_assemble_never_queries_the_unwritten_agent_collection_19579 pins it.
AC
Evidence
The agent leg reads a collection some code path writes; tested create-then-query
Not met as written: there is no agent leg now, so nothing was tested create-then-query.
The criterion describes the option that wasn't chosen, so I've left it unticked and the issue open. It needs rewording to match option A, or closing by a maintainer. Not checked on a live host.
Activity
mrveiss commentedon Oct 25, 2026
Owner decision, 2026-10-25: agent and role knowledge goes into the #19512 buckets design: the heartbeat will read the agent's role/agent bucket once #19513 and its siblings land. No interim per-agent collection is built. Meanwhile the heartbeat should stop querying the never-created
agent:<id>collection, so that leg isn't a silent no-op; it can ride with the next #19512-tree PR. Parent stays #19512.[-]bug(llc): heartbeat RAG queries an agent:<id> KB collection that no code path creates, so the agent scope is always empty[/-][+]bug(company-os): heartbeat RAG queries an agent:<id> KB collection that no code path creates, so the agent scope is always empty[/+]mrveiss commentedon Nov 1, 2026
Decision needed: what should the agent leg of the heartbeat query read?
Nothing writes
agent:<id>, so that leg always returns nothing. Capability documents go tocompany:<id>:agents, and the diary and wiki aren't in any collection this query reads.agent:<id>company:<id>:agentsRecommendation: A, with the agent's own knowledge delivered through #19512. It avoids building something due to be replaced.
mrveiss commentedon Nov 2, 2026
Landed on main in 58cbf98 (PR #20613).
_collections_forinllc/kb/rag_assembler.pyno longer has an agent leg, per the maintainer's choice of option A, andtest_assemble_never_queries_the_unwritten_agent_collection_19579pins it.The criterion describes the option that wasn't chosen, so I've left it unticked and the issue open. It needs rewording to match option A, or closing by a maintainer. Not checked on a live host.
fix(company-os): heartbeat knowledge query stops asking for an unwrit…