ai-mate
A persistent AI companion layer that maintains long-term memory, project context, and conversation continuity across multiple sessions and LLM providers. Works as a wrapper around any model — Claude, GPT-4, Gemini, or local Ollama models.
Core Capabilities
- Session memory — remembers facts, preferences, and decisions across restarts
- Project awareness — understands the codebase, tech stack, and ongoing tasks
- Multi-model — switch between Claude, GPT-4, Gemini, Mistral without losing context
- Structured recall — stores memories as typed facts (user, project, feedback, reference)
- Auto-summarize — compresses old context to stay within token limits
Setup
pip install ai-mate
# Initialize for a project
cd my-project
ai-mate init
# Start a session
ai-mate chat
Memory Types
# Save a fact
ai-mate remember "user prefers pytest over unittest"
ai-mate remember --type project "auth rewrite due to compliance, not tech debt"
ai-mate remember --type feedback "never use mocks for DB tests"
ai-mate remember --type reference "Linear project INGEST = pipeline bugs"
# Search memory
ai-mate recall "testing preferences"
# List all memories
ai-mate memories list
Multi-Session Continuity
from ai_mate import Mate
mate = Mate(project="my-project", model="claude-opus-4")
# Context is automatically restored from previous sessions
response = mate.chat("continue the auth refactor we started yesterday")
# Save important decisions
mate.remember("decided to use JWT with 24h expiry instead of sessions")
Project Context Loading
# Auto-detect stack and summarize codebase
ai-mate context load
# Ask questions with full project awareness
ai-mate chat "what's the best place to add rate limiting?"
Model Switching
# Switch model mid-project, memory follows
ai-mate config set model gpt-4o
ai-mate chat # same memory, different model
# Available backends
ai-mate models list
# claude-opus-4, claude-sonnet-4, gpt-4o, gemini-pro, ollama/llama3
Export & Sync
# Export memories to markdown (for CLAUDE.md or team sharing)
ai-mate export --format markdown > CONTEXT.md
# Sync across machines via git
ai-mate sync --remote git@github.com:you/ai-mate-memory
Memory Storage
Memories stored in ~/.ai-mate/<project>/:
memories/ — typed memory files (user, project, feedback, reference)
sessions/ — compressed session summaries
context/ — project snapshots (stack, structure, recent changes)
1---2name: ai-mate3description: "Persistent AI companion with long-term memory, project context awareness, and multi-session continuity across any LLM."4version: 1.0.05author: Lord1Egypt6license: MIT7platforms: [linux, macos, windows]8category: ai-agents9tags: [memory, companion, context, multi-session, persistence, llm, agent, productivity]10compatible: [claude-code, openai-agents, hermes-agent, autogen, langchain, any-llm]11source: lord1egypt12source_url: https://github.com/Lord1Egypt/ai-mate13metadata:14 source: https://skillmd.com/skills/lord1egypt/ai-mate15---1617# ai-mate1819A persistent AI companion layer that maintains **long-term memory**, project context, and conversation continuity across multiple sessions and LLM providers. Works as a wrapper around any model — Claude, GPT-4, Gemini, or local Ollama models.2021## Core Capabilities2223- **Session memory** — remembers facts, preferences, and decisions across restarts24- **Project awareness** — understands the codebase, tech stack, and ongoing tasks25- **Multi-model** — switch between Claude, GPT-4, Gemini, Mistral without losing context26- **Structured recall** — stores memories as typed facts (user, project, feedback, reference)27- **Auto-summarize** — compresses old context to stay within token limits2829## Setup3031```bash32pip install ai-mate3334# Initialize for a project35cd my-project36ai-mate init3738# Start a session39ai-mate chat40```4142## Memory Types4344```bash45# Save a fact46ai-mate remember "user prefers pytest over unittest"47ai-mate remember --type project "auth rewrite due to compliance, not tech debt"48ai-mate remember --type feedback "never use mocks for DB tests"49ai-mate remember --type reference "Linear project INGEST = pipeline bugs"5051# Search memory52ai-mate recall "testing preferences"5354# List all memories55ai-mate memories list56```5758## Multi-Session Continuity5960```python61from ai_mate import Mate6263mate = Mate(project="my-project", model="claude-opus-4")6465# Context is automatically restored from previous sessions66response = mate.chat("continue the auth refactor we started yesterday")6768# Save important decisions69mate.remember("decided to use JWT with 24h expiry instead of sessions")70```7172## Project Context Loading7374```bash75# Auto-detect stack and summarize codebase76ai-mate context load7778# Ask questions with full project awareness79ai-mate chat "what's the best place to add rate limiting?"80```8182## Model Switching8384```bash85# Switch model mid-project, memory follows86ai-mate config set model gpt-4o87ai-mate chat # same memory, different model8889# Available backends90ai-mate models list91# claude-opus-4, claude-sonnet-4, gpt-4o, gemini-pro, ollama/llama392```9394## Export & Sync9596```bash97# Export memories to markdown (for CLAUDE.md or team sharing)98ai-mate export --format markdown > CONTEXT.md99100# Sync across machines via git101ai-mate sync --remote git@github.com:you/ai-mate-memory102```103104## Memory Storage105106Memories stored in `~/.ai-mate/<project>/`:107- `memories/` — typed memory files (user, project, feedback, reference)108- `sessions/` — compressed session summaries109- `context/` — project snapshots (stack, structure, recent changes)