Installation
Get Memori installed and connected to your own database in a few steps.Want a zero-setup option? Try Memori Cloud at app.memorilabs.ai.
Install Memori
Install Your Database Driver
Memori supports SQLite, PostgreSQL, MySQL, MariaDB, Oracle, MongoDB, CockroachDB, and OceanBase. Managed services like Neon, Supabase, and AWS RDS/Aurora work through their compatible PostgreSQL/MySQL engines. Install the driver for your preferred database:Neon, Supabase, and AWS RDS/Aurora use standard PostgreSQL drivers (
psycopg2-binary or psycopg).Connection Patterns
Memori accepts aconn parameter — a callable that returns a new connection each time it is called.
| Pattern | What to pass to conn | Works With |
|---|---|---|
| SQLAlchemy | sessionmaker | SQLite, PostgreSQL, MySQL, MariaDB, Oracle, CockroachDB, OceanBase |
| DB API 2.0 | Function that returns a PEP 249 connection | SQLite and SQL drivers (sqlite3, psycopg2, pymysql, oracledb) |
| Django ORM | Django connection callable | Django applications |
| MongoDB | Function that returns a MongoDB database object | MongoDB via pymongo |
SQLite (DB API 2.0)
PostgreSQL (SQLAlchemy)
PostgreSQL (DB API 2.0)
MySQL / MariaDB (SQLAlchemy)
MongoDB
Create the Schema
After setting up your connection, runbuild() once to create the Memori tables in your database. This only needs to be done the first time, or when you upgrade Memori.
The
build() method creates tables like memori_conversation_message, memori_entity_fact, memori_knowledge_graph, and more.Install Your LLM Provider
Install the SDK for your preferred LLM provider:Set Up Your LLM Provider Key
You will need an API key for your LLM provider:Set Up Your Memori API Key (Optional)
A Memori API key unlocks higher augmentation quotas (5,000/month vs 100 without a key). You can sign up directly from the CLI:.env file in your project root:
Pre-download the Embedding Model
Memori uses a local embedding model for semantic search. On first run, it downloads the model automatically, which can take a moment. To pre-download it:Verify Installation
Run the following command to confirm the package is installed:What’s Next?
Quick Start
Build your first memory-enabled application with SQLite in under 3 minutes.Go to Quick Start →
Choose Your Database
Explore detailed setup guides for each supported database.Go to Databases →