-
Notifications
You must be signed in to change notification settings - Fork 0
Implement memory retrieval, ranking, and context injection #41
Copy link
Copy link
Closed
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:medium1-3 days of work1-3 days of workspec:memoryDESIGN_SPEC Section 7 - Memory & PersistenceDESIGN_SPEC Section 7 - Memory & Persistencetype:featureNew feature implementationNew feature implementation
Description
Context
Build the memory retrieval pipeline that fetches relevant memories and injects them into the agent's context before LLM calls. This is what makes memory actually useful — without injection, stored memories are never consulted.
Acceptance Criteria
Retrieval Pipeline
- Retrieve relevant memories based on current task/query context
- Rank results by relevance and recency (configurable weighting)
- Token budget enforcement for memory injection (don't exceed context window)
- Graceful degradation when too many relevant memories exist (truncate/summarize)
Context Injection
- Inject retrieved memories into system prompt or conversation history
- Configurable injection point (system prompt vs user context vs both)
- Clear formatting of injected memories (agent can distinguish memory from instruction)
Shared Knowledge
- Retrieve from shared knowledge base (cross-agent memories)
- Merge personal and shared memories with appropriate priority
Testing
- Unit tests for retrieval and ranking logic (>80% coverage)
- Integration test demonstrating agent behavior change when memories are available vs absent
Dependencies
- Depends on SQLite persistence (Implement company templates loading and interactive builder CLI #38)
- Depends on Mem0 evaluation (Evaluate memory layer candidates: Mem0, Zep, Letta, Cognee, custom #39)
Design Spec Reference
- Section 7 — Memory System
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
prio:highImportant, should be prioritizedImportant, should be prioritizedscope:medium1-3 days of work1-3 days of workspec:memoryDESIGN_SPEC Section 7 - Memory & PersistenceDESIGN_SPEC Section 7 - Memory & Persistencetype:featureNew feature implementationNew feature implementation