feat: add entity-linked agent harness and docs#39
Merged
Conversation
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (9)
📒 Files selected for processing (94)
📝 WalkthroughWalkthroughThis PR migrates the gRPC API from JSON-encoded bytes to typed protobuf messages, introduces an entity-aware graph retrieval system, adds two-pass interpretation with candidate resolution during capture, implements entity linking and lookup infrastructure, and provides new documentation and agent harness example. Changes
Sequence Diagram(s)sequenceDiagram
participant Client
participant Service
participant Interpreter
participant CandidateResolver
participant Storage as Storage/<br/>EntityLookup
participant Consolidator
Client->>Service: CaptureMemory(content, context, reason_to_remember)
Service->>Interpreter: Interpret(content, context)
Interpreter-->>Service: Interpretation (mentions, relations, entities)
alt CandidateResolver Available
Service->>CandidateResolver: Resolve(interpretation, candidates)
CandidateResolver-->>Service: Resolved interpretation with target IDs
end
Service->>Storage: WithTransaction
Service->>Storage: Create primary_record
Service->>Storage: FindEntitiesByTerm(subject, scope)
Storage-->>Service: entity_record_ids
Service->>Storage: AddRelation(subject_entity, object_entity, etc.)
alt Entity Resolution Success
Service->>Consolidator: Entity linking (mentioned entities)
Consolidator->>Storage: Create entity_record
Consolidator->>Storage: AddRelation(linked edges)
Consolidator-->>Service: edges
end
Service-->>Client: CaptureMemoryResponse(primary_record, created_records, edges)
sequenceDiagram
participant Client
participant Service as RetrieveGraph<br/>Service
participant Retriever
participant EntityLookup
participant TrustContext
participant Storage
Client->>Service: RetrieveGraph(query, memory_types, limits, trust)
Service->>Retriever: retrieve_records(query, trust)
Retriever->>Storage: query(memory_types, limits)
Storage-->>Retriever: candidate_records
Retriever->>Service: entityRootCandidates(query)
Service->>EntityLookup: FindEntitiesByTerm(query_term, scope)
EntityLookup-->>Service: matching_entities
Service->>Service: rerankGraphRoots(all_candidates, trust)
Note over Service: Score by alias/type/relation<br/>with entity payload cache
Service-->>Service: ranked_roots
Service->>Storage: expand_graph_neighborhood<br/>(roots, node_limit, edge_limit, max_hops)
Storage-->>Service: nodes[], edges[]
Service->>TrustContext: Allows(node, record)
TrustContext-->>Service: visible_or_redacted
Note over Service: Redact payloads for<br/>lower-sensitivity access
Service-->>Client: RetrieveGraphResponse(nodes, edges, root_ids, selection)
Estimated code review effort🎯 5 (Critical) | ⏱️ ~120 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
|
BennettSchwartz
added a commit
that referenced
this pull request
May 1, 2026
feat: add entity-linked agent harness and docs
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
Verification
Summary by CodeRabbit
New Features
CaptureMemoryandRetrieveGraphAPIs replacing multiple ingestion/retrieval methods.API Changes
Documentation