# `MnemosynePostgres`
[🔗](https://github.com/edlontech/mnemosyne_postgres/blob/main/lib/mnemosyne_postgres.ex#L1)

PostgreSQL + pgvector backend for the Mnemosyne agentic memory library.

This library provides a `Mnemosyne.GraphBackend` implementation backed by
PostgreSQL with pgvector for vector similarity search. It stores memory
graph nodes, edges, and metadata using Ecto schemas and supports
multi-tenant isolation via configurable table prefixes.

## Setup

    # Set as default backend in your supervision tree
    {Mnemosyne.Supervisor,
      config: config,
      llm: MyApp.LLM,
      embedding: MyApp.Embedding,
      backend: {MnemosynePostgres.Backend, repo: MyApp.Repo}}

    # Open repos -- repo_id is injected from the first argument
    Mnemosyne.open_repo("my-project")
    Mnemosyne.open_repo("my-project", tenant_id: "org-123")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
