Skip to content

Introduce structured entity and relationship memory (knowledge graph) #68

Description

@neooriginal

This issue is AI generated.

Problem

NeoAgent's memory system stores flat text entries indexed by embedding similarity. There is no concept of entities (people, organizations, projects, tools) or the relationships between them. When the agent accumulates many memories about the same person or project, there is no deduplication, no entity resolution, and no way to query "what do I know about entity X and everyone connected to it?"

OpenClaw implements a layered memory architecture with knowledge graphs and entity linkage that enables structured retrieval. NeoAgent's flat retrieval model means redundant facts accumulate and related context must be recovered through keyword or embedding search, which misses non-obvious connections.

Required change

  • Extract named entities from new memories at ingestion time (people, organizations, places, projects, tools).
  • Store entity nodes and typed relationship edges in the database.
  • Enrich memory retrieval to also walk the entity graph from matched entries and pull related entities into context.
  • Deduplicate entities across memories (canonical entity keys already exist in server/services/memory/intelligence.js:canonicalEntityKey).

Acceptance criteria

  • New memories trigger entity extraction and graph updates.
  • Memory retrieval for a task that mentions a known entity also returns directly related entity facts.
  • Duplicate entity references across memories resolve to the same canonical node.
  • The retrieval reasoning layer can query by entity, not just by embedding distance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    autonomousGenerated by AIenhancementNew feature or requestpriority: lowNice to have — refactoring, minor UX, or future featuresreliabilityReliability, resilience, or concurrency concern

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions