openmemory/api/README.md
This directory contains the backend API for OpenMemory, built with FastAPI and SQLAlchemy. This also runs the Mem0 MCP Server that you can use with MCP clients to remember things.
The easiest way to get started is using Docker. Make sure you have Docker and Docker Compose installed.
make build
.env file:make env
Once you run this command, edit the file api/.env and enter the OPENAI_API_KEY.
make up
The API will be available at http://localhost:8765
make logsmake shellmake migratemake testmake test-cleanmake downOnce the server is running, you can access the API documentation at:
http://localhost:8765/docshttp://localhost:8765/redocapp/: Main application code
models.py: Database modelsdatabase.py: Database configurationrouters/: API route handlersmigrations/: Database migration filestests/: Test filesalembic/: Alembic migration configurationmain.py: Application entry point