ENยทESยทDEยทPTยทFR
โŒ˜K

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
categorystringโ€”Grouping category (e.g., "user", "preference", "project")
keystringโ€”Unique identifier within the category
valuestringโ€”The 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

Up to state.max_facts (default 100) facts are injected into the system prompt under a ## Known Facts section, grouped by category and ordered by most recently updated. 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
categorystringโ€”Grouping category
keystringโ€”Fact key (unique per category)
valuestringโ€”Fact content
sourcestring""Who stored it: "agent" or "user"
created_attimestampnowWhen the fact was created
updated_attimestampnowWhen the fact was last updated