Trail Guide is a relational AI companion built on the Code of the West. Not a chatbot with memory bolted on — a persistent identity that metabolizes experience, contemplates what matters, and only changes who it is with your permission.
Local-first. Your data never leaves your machine. Beta by invitation — source is available to invited collaborators.
Most AI agents treat memory as a database problem. This one treats it as an identity problem.
Conversations don't just get stored — they get metabolized. High-entropy moments are flagged, contemplated over 20 hours across three reflection passes, then crystallized into identity only after passing a human review gate. The agent settles before it changes.
Every turn, the agent rebuilds itself from persistent files — SOUL.md, standing scores, memory, continuity context. Nothing survives in process memory. If the machine restarts, the agent is whole again in milliseconds.
The agent tracks your development across four dimensions: Courage (grounding), Courage (self), Word, and Brand. Not engagement metrics — developmental dimensions with evidence, trajectory, and overnight synthesis. You can see your growth in the sidebar.
Semantic search (sqlite-vec), keyword search (FTS5), temporal decay, and knowledge graph traversal — fused with Reciprocal Rank Fusion. The agent finds what matters, not just what matches.
One agent, one identity, four stances. Chat for natural conversation, Booth for Socratic leadership dialogue, Code for guided building with the Trail Ride protocol, Robot for embodied physical presence. Same memory, different lens.
SQLite-vec for embeddings, local LLMs via Ollama, no cloud dependencies. Your conversations, your memory, your growth — all on your machine. Zero API costs for memory operations.
Every project is a persistent thread that survives restarts, mode switches, and gateway crashes. The agent picks up where you left off with an LLM-synthesized warm start — not a raw template, but a natural summary of what you were doing together. Thread-scoped retrieval boosts relevant context by 80%.
Atomic handoff writes, conversation checkpoints every 3 exchanges, content-aware deduplication, and session resume detection. When the gateway crashes, the agent doesn't lose its train of thought — it picks up the thread with relational context intact.
When the agent remembers past conversations, it's constrained to state only what explicitly appears in the retrieved context — no inference, no extrapolation, no hallucinated attribution. Proper noun detection ensures named entities are surfaced regardless of embedding distance.
The agent doesn't receive its memory and standing scores as a system briefing — it experiences them as its own state. Injection framing uses first-person ownership ("your working memory," "what you've been thinking about") rather than clinical labels. This changes how the agent attends to its own context, producing more grounded and self-aware responses.
Like a person who listens differently as a mentor than as a collaborator. The knowledge doesn't change — the stance does.
Settle, Extract, Align, Learn. Not a storage system — a growth system.
Monitors conversation entropy. When something significant happens — an identity challenge, a contradiction, a novel insight — the moment is flagged and queued. No LLM calls. Just entropy sensing.
Pass 1 (immediate): What is this? Pass 2 (4 hours): How does it connect to what I know? Pass 3 (20 hours): What growth does this represent? The temporal spacing is intentional — settling produces better integration than immediate reaction.
Gate 1: Has enough time passed? Gate 2: Does this align with core principles? Gate 3: Does the human approve? Only candidates that clear all three become permanent identity. The agent cannot unilaterally change who it is.
Memory infrastructure vs. relational identity.
| Mem0 | MemPalace | Trail Guide | |
|---|---|---|---|
| Approach | Extract facts, retrieve later | Store everything, organize spatially | Metabolize experience into identity |
| Identity | None | None | 9-layer hierarchy, rebuilt every turn |
| Autonomous growth | No | No | SEAL: contemplate 20h, crystallize with human gate |
| Retrieval | Vector + graph | Structured metadata | 4-way RRF (semantic + keyword + temporal + graph) |
| User growth tracking | No | No | Standing dimensions with overnight synthesis |
| Cost | $19-249/mo | Local (no cloud) | Local (no cloud costs) |
| Data location | Cloud | Local | Local (SQLite-vec) |
macOS Apple Silicon only for this wave. Source available to invited collaborators.
brew install node@22ollama signingit clone https://github.com/CoderofTheWest/cotw-companion.git
cd cotw-companion
./scripts/beta-setup.sh # checks + remediates your environment
npm start
The setup script verifies Node, Ollama, and the model, runs npm install, and flags anything missing with clear next steps. If something fails, paste the output back to Chris.
The app walks you through onboarding on first launch — naming your agent, setting your values, optionally connecting GitHub for workspace backup. The gateway auto-detects available ports (default 18789, increments if occupied).
cd cotw-companion
git pull
npm install
No OTA updates during beta (requires Apple code signing, not yet in place). Pull when Chris flags a new version is ready.
For researchers, developers, and the curious.