Skip to content

Latest commit

 

History

History
58 lines (45 loc) · 1.89 KB

README.md

File metadata and controls

58 lines (45 loc) · 1.89 KB

Agent memory (RAG)

Semantic memory for the LangGraph agent: seeded repo knowledge + run observations.

Out of the box (new clone)

  1. Seed content is committed in memory/seed/chunks.jsonl (no API key required to read it).

  2. Default path — Ollama (local, free):

    ollama pull nomic-embed-text
    ./scripts/seed-memory.sh

    Or copy the pre-built baseline (if present):

    cp memory/baseline/ollama-nomic.sqlite memory/store-ollama.sqlite
  3. Alternative — OpenAI embeddings:

    export EMBEDDING_PROVIDER=openai
    export OPENAI_API_KEY=sk-...
    ./scripts/seed-memory.sh
  4. Kubernetes — pgvector on Postgres:

    kubectl apply -f deploy/postgres/pgvector-init.yaml
    export MEMORY_BACKEND=postgres
    export DATABASE_URL=postgresql://lunar:PASSWORD@localhost:5432/lunar
    ./scripts/seed-memory.sh

Environment variables

Variable Default Purpose
EMBEDDING_PROVIDER ollama ollama or openai
OLLAMA_HOST http://localhost:11434 Ollama API
OLLAMA_EMBED_MODEL nomic-embed-text:v1.5 Local embedding model
OPENAI_EMBED_MODEL text-embedding-3-small OpenAI embedding model
MEMORY_BACKEND sqlite sqlite or postgres
SQLITE_MEMORY_PATH memory/store-{provider}.sqlite Local vector DB
DATABASE_URL — Required when MEMORY_BACKEND=postgres

Important: embeddings from Ollama and OpenAI are not interchangeable — use separate store files per provider.

Regenerate baseline for contributors

After updating memory/seed/chunks.jsonl:

ollama pull nomic-embed-text
EMBEDDING_PROVIDER=ollama ./scripts/seed-memory.sh --write-baseline
git add memory/baseline/ollama-nomic.sqlite memory/seed/chunks.jsonl

This keeps clones RAG-ready without running Ollama (baseline uses the same 768-dim model).