feat: add entity layer for cross-agent discovery (spec 13)#39
Merged
Conversation
Entities are hub nodes (kind: "entity") that unify knowledge about the same real-world thing across multiple agents. When "Company X pivoting to AI" (strategy agent) and "Evaluated Company X SDK" (engineering agent) both tag entity-company-x, the auto-linker detects the co-occurrence and eventually promotes it to a first-class entity node with references edges. - Add authored_by, references, shared_entity relations - Entity extraction from node metadata (entities array) and tags (entity- prefix) - Auto-linker: entity co-occurrence rule creates shared_entity edges across agents - Auto-linker: periodic entity promotion creates entity hub nodes (configurable) - Briefing engine: find_agent_node supports both kind:agent and kind:entity - Agent-to-entity migration helper - 34 new tests (22 unit + 3 storage integration + 9 edge cases) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
entitiesarray) and tags (entity-prefix)shared_entityedges when nodes from different agents reference the same entitykind: "entity"hub nodes withreferencesedges when 2+ agents mention the same entityfind_agent_node()now finds both oldkind: "agent"and newkind: "entity"nodesauthored_by,references,shared_entityadded to defaultsentity_promote_every_n_cycles(default 60) andentity_promote_min_agents(default 2)Test plan
cargo clippy -p cortex-corecleancargo build -p cortex-memory(server) compiles🤖 Generated with Claude Code