Skip to content

Latest commit

 

History

608 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Lore

Open-source memory infrastructure for users and their agents.
Store, retrieve, and evaluate user-owned memory on your own Postgres.

CI MIT License Postgres with pgvector Next.js 16

Lore owns memory storage, authorization, retrieval, and evaluation. Workspaces are the tenant boundary; private Memory belongs to a User, not to a single Agent. Postgres row-level security enforces that boundary before search ranking or graph assembly.

Architecture

Lore Core owns memory storage, retrieval algorithms, and PostgreSQL mechanics. Lore OSS supplies Workspace and identity management, authorization, request replay, product workflows, deployment, and concrete model adapters. It gives the engine a store whose transactions already enforce access policy. The same application and Postgres schema run in OSS self-hosting and CoreSpeed Cloud. Model integrations are optional; Postgres remains the canonical store.

See the architecture guide for domain modules, runtime seams, and the organization of scripts and tests.

flowchart LR
    UI["Web UI"] --> SDK["TypeScript SDK"]
    CLI["CLI"] --> SDK
    MCP["MCP"] --> SDK
    SDK --> API["OSS API<br/>Auth · tenancy"]
    API --> Core["Lore Core"]
    Core --> Database[("Postgres + pgvector")]
    Providers["Model providers · OSS"] -. inject .-> Core

    classDef interface fill:#f3e8ff,stroke:#7c3aed,color:#2e1065,stroke-width:2px
    classDef api fill:#e8f1ff,stroke:#2563eb,color:#102a43,stroke-width:2px
    classDef core fill:#e6f6ec,stroke:#24864b,color:#123b24,stroke-width:3px
    classDef data fill:#e3f6f5,stroke:#0f766e,color:#123b3a,stroke-width:2px
    classDef model fill:#fff4cc,stroke:#b7791f,color:#422006,stroke-width:2px
    class UI,CLI,MCP,SDK interface
    class API api
    class Core core
    class Database data
    class Providers model
Loading

Quick start

Requires Docker with Compose. The local stack includes Postgres with pgvector, applies migrations, creates restricted runtime roles, and starts Lore plus its maintenance worker.

git clone https://github.com/corespeed-io/lore.git
cd lore
cp .env.example .env  # replace the example passwords (URL-safe: openssl rand -hex 32)
docker compose up --build

Open http://localhost:3000.

Lexical retrieval works without a model server. For local semantic retrieval, install Ollama and pull the default 1024-dimensional embedding model:

ollama pull qwen3-embedding:0.6b

The example configuration is intentionally local-only. Never expose AUTH_MODE=none or ALLOW_INSECURE=1 to the internet. Apple Silicon users can also run the frontend, worker, Ollama, and a local Postgres installation through the native one-command service.

What Lore gives you

  • User-owned Memory — shared and user-private scopes, provenance, optimistic concurrency, replay-safe writes, and complete create/read/update/delete.
  • Guarded learning — immutable Observations stay outside canonical retrieval; owner-private Memory Proposals require explicit human acceptance.
  • Retrieval without authorization leaks — lexical and optional vector search apply Workspace, ownership, scope, Membership, Agent grant, and RLS filters before top-k.
  • A navigable memory graph — durable Memory Links, visible-node-safe edges, derived affinity, and clickable [[reference]] wikilinks.
  • Agent-ready interfaces — versioned HTTP APIs, a TypeScript SDK with generated contracts, a CLI, and an external MCP adapter.
  • Measurable production operation — background embedding jobs, portable Workspace archives, health probes, and Evaluation Suites for quality, isolation, latency, and cost.

AutoDream, automatic consolidation, summarization, and proactive insight generation are intentionally outside v1.

API and operations

Stable integrations use /api/v1; the OpenAPI 3.1 document is available at /openapi.json. Human requests select a Workspace with x-lore-workspace-id; Agents also present a lore_agent_… bearer credential.

The OSS profile runs Next.js with Hono APIs, maintenance, and database tooling on Bun, with Docker and Postgres support. CoreSpeed Cloud uses the same domain modules and schema on Cloudflare Workers with cache-disabled Hyperdrive. See the documentation before deploying beyond localhost:

Development

Full source verification requires Bun 1.4.2+.

bun install --frozen-lockfile
bun run typecheck
bun run lint
bun run architecture:check
bun run test

Working with a coding agent? AGENTS.md is the single source of truth for repository architecture and security constraints.

License

MIT © CoreSpeed

About

Open-source memory infrastructure for users and their agents — user-owned memory on your own Postgres, with tenant isolation enforced by row-level security.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

6 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages