Skip to content

feat: add entity layer for cross-agent discovery (spec 13)#39

Merged
DarlingtonDeveloper merged 1 commit into
mainfrom
feat/entity-layer
Mar 15, 2026
Merged

feat: add entity layer for cross-agent discovery (spec 13)#39
DarlingtonDeveloper merged 1 commit into
mainfrom
feat/entity-layer

Conversation

@DarlingtonDeveloper
Copy link
Copy Markdown
Contributor

Summary

  • Entity extraction: normalised entity strings from node metadata (entities array) and tags (entity- prefix)
  • Auto-linker co-occurrence rule: creates shared_entity edges when nodes from different agents reference the same entity
  • Entity promotion: periodic pass creates first-class kind: "entity" hub nodes with references edges when 2+ agents mention the same entity
  • Briefing backward compat: find_agent_node() now finds both old kind: "agent" and new kind: "entity" nodes
  • New relations: authored_by, references, shared_entity added to defaults
  • Config: entity_promote_every_n_cycles (default 60) and entity_promote_min_agents (default 2)

Test plan

  • 396 tests pass (34 new entity tests)
  • cargo clippy -p cortex-core clean
  • cargo build -p cortex-memory (server) compiles
  • Verify entity promotion with multi-agent graph
  • Verify briefing engine finds migrated agent→entity nodes

🤖 Generated with Claude Code

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>
@DarlingtonDeveloper DarlingtonDeveloper merged commit e1b5775 into main Mar 15, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant