memory_stats
Get statistics about stored memories
Get an overview of memory storage including entity counts, observations, and relations.
Parameters
This tool takes no parameters.
Example Request
Response
Compact Mode (Default)
When COMPACT_RESPONSES=true (default), responses use short keys to reduce token usage by 40-60%:
Key mapping: e=totalEntities, o=totalObservations, r=totalRelations, by=entitiesByType
Verbose Mode
When COMPACT_RESPONSES=false:
Response Fields
| Field | Description |
|---|---|
totalEntities | Total number of entities in memory |
totalObservations | Total number of facts stored |
totalRelations | Total number of entity relations |
entitiesByType | Breakdown of entities by type |
Use Cases
Health Check
Verify memory system is working:
If all counts are 0, memory may not be initialized or ENABLE_MEMORY=false.
Capacity Planning
Monitor growth over time to plan for scaling.
Debugging
Check if entities are being created as expected.
Empty Memory
When no memories exist:
Errors
| Error | Cause | Fix |
|---|---|---|
| Database not configured | Missing Supabase credentials | Set SUPABASE_URL and SUPABASE_SERVICE_KEY |
| Memory not enabled | ENABLE_MEMORY feature flag is false | Set ENABLE_MEMORY=true |
Related Tools
list_entities- View actual entitiesremember_fact- Start adding memoriesrecall_memories- Search existing memories