Memory / Facts Tool

Store and retrieve long-term facts that persist across sessions and are injected into the system prompt.

Tool Name

remember_fact

Parameters

KeyTypeDefaultDescription
categorystringGrouping category (e.g., "user", "preference", "project")
keystringUnique identifier within the category
valuestringThe fact content to store

Storage

Facts are upserted into the facts table in SQLite. The (category, key) pair is unique — storing a fact with the same category and key overwrites the previous value.

System Prompt Injection

All facts are injected into the system prompt under a ## Known Facts section, grouped by category. This means the agent always has access to its stored knowledge.

system prompt injection
## Known Facts

### user
- name: David
- timezone: US/Pacific

### project
- language: Rust
- repo: /home/david/projects/myapp

Facts Table Schema

KeyTypeDefaultDescription
idintegerautoAuto-incrementing primary key
categorystringGrouping category
keystringFact key (unique per category)
valuestringFact content
sourcestring""Who stored it: "agent" or "user"
created_attimestampnowWhen the fact was created
updated_attimestampnowWhen the fact was last updated