🧠Tool: @remember ​
The @remember tool allows the AI agent to persist critical project context into a long-term SQLite database, ensuring important decisions or patterns are not lost between sessions.
Technical Implementation ​
When the agent invokes @remember, the system executes an INSERT OR REPLACE SQL statement against the local memories table (located in ~/.local/share/zed/).
The implementation in crates/agent/src/tools/memory_tools.rs enforces categorization into one of five schemas:
- Architecture: structural rules.
- Patterns: code styles.
- Issues: bug resolutions.
- Procedures: build/deploy steps.
- Notes: general facts.
Usage Examples ​
Example 1: Preserving Architectural Decisions ​
Example 2: Documenting Legacy Debt ​
Workflow Impact ​
- Institutional Memory: The agent remembers why you chose a specific pattern, even months after the conversation.
- Rule Enforcement: Injects these memories directly into the agent's subconscious prompt for every future turn.
- Onboarding Speed: Quickly catches the agent up on obscure project constraints that aren't in the global LLM training data.
- Scalable Context: Unlike
.rulesfiles, memories are retrieved contextually, saving tokens while maintaining precision.