Skip to content

Memory & Knowledge

How Astonish learns and remembers across sessions

Astonish has a persistent memory system that lets the agent remember facts, preferences, and project details across sessions. It is powered by a local vector store (chromem-go) with local embeddings — no external API is needed.

The agent automatically retrieves relevant knowledge before responding. If you have told it something before, it remembers. No manual searching is needed on your part.

Before each response, Astonish searches memory for content relevant to your current question and injects matching context into the system prompt.

The agent has three tools for working with memory:

ToolDescription
memory_saveStore facts, preferences, and infrastructure details. Content is organized by category headings in markdown files.
memory_searchSemantic search across all indexed memory. Returns scored snippets with file references.
memory_getRead specific lines from a memory file for full context.

Memory files are stored in ~/.config/astonish/memory/ as markdown files.

  • MEMORY.md — the default file for core identity and preferences.
  • Topic-specific files — knowledge about particular subjects goes in separate files (e.g., infra/portainer.md, projects/myapp.md).
  • SELF.md — the agent’s self-awareness file containing its identity, preferences, and communication style. Auto-indexed.
  • INSTRUCTIONS.md — per-project instructions. Place this in a project directory and Astonish reads it when working in that directory.

Search memory from the terminal:

Terminal window
astonish memory search <query>

List memory files and chunk counts:

Terminal window
astonish memory list

Show memory system status:

Terminal window
astonish memory status

Force re-index all memory files:

Terminal window
astonish memory reindex

These settings can be adjusted through Studio Settings > Memory, or in config.yaml:

memory:
enabled: true
memory_dir: ~/.config/astonish/memory
vector_dir: ~/.config/astonish/vectors
embedding:
# provider and model settings
chunking:
# chunk size and overlap params
search:
max_results: 10
min_score: 0.5