Persistent structured memory for LLM agents using botmem CLI. Use when storing, retrieving, or managing agent memory — facts, knowledge graph relationships, conversation summaries, and context blocks...
CLI tool providing four memory types: blocks (working memory), archival (long-term facts), knowledge graph (entity relationships), and conversation summaries.
botmem binary on PATH (go install github.com/stukennedy/botmem@latest)botmem init (supports Claude Code CLI, Anthropic API, or Ollama)~/.botmem/config.yaml, DB at ~/.botmem/botmem.dbbotmem block set <label> <content> # Set/update a block (human, persona, context)
botmem block get <label> # Read a block
botmem block list [type] # List blocks
botmem block delete <label> # Delete a block
botmem archive add <text> --tags tag1,tag2 # Store a fact
botmem archive search <query> # Full-text search
botmem archive list [--tag tag] # List entries
botmem graph add <subject> <predicate> <object> # Add relationship
botmem graph query <entity> # All relations for entity
botmem graph search <predicate> # Search by relationship type
botmem graph entities [type] # List entities
botmem summary add <text> [--level N] # Add summary (level 0 = most detailed)
botmem summary list [--level N] # List summaries
botmem context # Returns JSON: { core_blocks, key_relations, ... }
botmem ingest <text> # Extract facts, triplets, block updates, summary
echo <text> | botmem ingest # Pipe from stdin
Ingest requires a configured LLM provider. It automatically:
Run botmem context and include the JSON in system prompt for full memory recall.
Summarise the conversation and pipe to botmem ingest to automatically extract and store structured memories.
Use botmem graph query <entity> or botmem archive search <term> for targeted recall.
Use botmem block set context <current situation> to keep working memory current.
All commands accept --db <path> to use a different database file. Useful for per-agent or per-project memory stores.