Architecture
Core Principles
Memory is Persistence
If you want to remember something, write it to a file
Flexible Structure
Create any directory/file hierarchy you need
Self-Documenting
Use README.md files to describe directory structure
Hybrid Search
Vector similarity + BM25 full-text via RRF
Key Operations
Reading Files
Writing Files
Directory Operations
Memory Operations
Identity Files
The workspace includes special files that shape the agent’s behavior:MEMORY.md
Long-term curated notes loaded into the system prompt:Keep MEMORY.md concise—it’s loaded on every session. Use daily logs for detailed session notes.
IDENTITY.md
Agent name, vibe, and personality:SOUL.md
Core values and behavioral boundaries:AGENTS.md
Session routine and operational instructions:USER.md
Information about the user:HEARTBEAT.md
Periodic background task checklist:TOOLS.md
Environment-specific tool notes (guidance, not enforcement):System Prompt Generation
The workspace builds the agent’s system prompt from identity files:Group Chat Safety
Hybrid Search
Combines full-text (BM25) and semantic (vector) search using Reciprocal Rank Fusion:Search Formula
Example
Search Result
Embedding Providers
Semantic search requires an embedding provider:OpenAI
Ollama (Local)
NEAR AI
Mock (Testing)
Document Chunking
Files are automatically chunked for indexing:Database Backends
The workspace supports multiple database backends:PostgreSQL
pgvectorextension for vector search- Full-text search via
ts_vector
libSQL (SQLite-compatible)
Workspace API
Protected Files
Some files are read-only from tools to prevent prompt injection:Memory Hygiene
The workspace includes utilities for maintaining clean memory:Next Steps
Routines
Automate periodic tasks with routines
Search API
API reference for hybrid search
