Memory
Astonish provides persistent memory that survives across sessions. The agent stores, searches, and retrieves knowledge automatically, building a growing context base over time.
How Memory Works
Memory is curated knowledge the agent accumulates — distinct from session history (which is a conversation log). The agent can:
- Save facts, patterns, and solutions during conversations
- Search across all accessible memory tiers before responding
- Retrieve specific entries for detailed context
Before responding, the agent automatically retrieves relevant memories based on the current conversation. This happens transparently via the knowledge retrieval system.
Memory Tools
The agent interacts with memory through three built-in tools:
| Tool | Description |
|---|---|
memory_save | Store a new memory with content and category |
memory_search | Semantic search across stored memories |
memory_get | Retrieve full context around a specific memory entry |
Saving Memory
The agent saves memories when it learns something worth retaining:
User: "Our API uses camelCase for JSON fields and snake_case for database columns"
Agent: [memory_save category="conventions" content="API uses camelCase for JSON, snake_case for DB columns"]Searching Memory
Agent: [memory_search query="API naming conventions"]
→ Returns: "API uses camelCase for JSON, snake_case for DB columns" (score: 0.92)Hybrid Search
Memory search combines two methods for best results:
- Vector similarity — Semantic search via embeddings (finds conceptually related content)
- Full-text search — Keyword matching (finds exact terms and phrases)
Results from both methods are merged using Reciprocal Rank Fusion (RRF).
SQLite Backend
- Embeddings stored as BLOBs with cosine similarity computed in Go
- FTS5 virtual tables for BM25-ranked keyword search
- Zero configuration required — works out of the box
PostgreSQL Backend
- pgvector for vector similarity search with IVFFlat indexes
- tsvector for full-text search
- Three-tier search (personal + team + org) with weighted RRF fusion
See Three-Tier Memory for details on how memory spans the org hierarchy.
Managing Memory in Studio
Studio provides a visual interface for memory management:
- Browse all memory entries with search and filtering
- View memory content, tags, and metadata
- Publish personal memories to your team
- Promote team memories to org level (admin)
- Delete or edit memory entries
Memory Configuration
memory:
embedding_model: text-embedding-3-small
search_limit: 20 # results per tier before fusion
weights:
personal: 1.2
team: 1.0
org: 0.8
auto_memorize: true # extract key facts from sessionsBest Practices
- Let the agent save memories organically during conversations
- Use categories for organization (the agent does this automatically)
- In team deployments, publish useful memories to your team via Studio so colleagues benefit
- The agent automatically searches memory before responding — no manual retrieval needed
See Sessions for how session history differs from memory, and Three-Tier Memory for the full multi-tier system.