Setup & Installation
Guide to installing and running the Memory engine
This guide will help you set up and run the Memory engine locally.
Prerequisites
Before starting, ensure you have the following installed:
- Bun: The JavaScript runtime used by this project.
- PostgreSQL: Rational database for storing memory metadata.
- Qdrant: Vector database for storing embeddings.
Installation
-
Clone the repository:
git clone https://github.com/sincerelyyyash/memory cd memory -
Install dependencies:
bun install
Configuration
-
Copy the example environment file:
cp .env.example .env -
Configure the environment variables in
.env:Variable Description Default PORTAPI Port 8000OPENROUTER_API_KEYAPI Key for LLM services - DATABASE_URLPostgreSQL connection string - QDRANT_URLURL of your Qdrant instance - QDRANT_API_KEYAPI Key for Qdrant (if auth enabled) - EMBEDDING_MODELModel for generating embeddings openai/text-embedding-3-smallEMBEDDING_DIMENSIONDimension of the embedding vectors Matches model ANSWER_MODELModel for RAG answer generation gpt-4o-miniFACT_MODELModel for fact extraction gpt-4o-miniQDRANT_COLLECTION_NAMEName of the Qdrant collection - RERANK_MODELModel for reranking gpt-4o-miniRERANK_ENABLEDEnable reranking by default falseRERANK_TOP_KNumber of documents to rerank - PROCEDURAL_MODELModel for procedural summary generation gpt-4o-miniNODE_ENVEnvironment (e.g., development, production) -
Database Setup
-
Generate the Prisma client:
bun x prisma generate -
Push the schema to your database:
bun x prisma db push
Running the Engine
Start the development server:
bun run index.tsThe server will start on the configured PORT (default: 8000).