Installation¶
Memorg targets Python 3.11+ and is published to PyPI as memorg.
From PyPI (Recommended)¶
This installs the library along with two console scripts:
| Script | Module | Purpose |
|---|---|---|
memorg |
memorg.cli_entry:main |
Interactive chat CLI |
memorg-mcp |
memorg.mcp.cli:main |
MCP server for Claude Desktop, etc. |
From Source (Development)¶
Memorg is managed with Poetry. To work on it locally:
Run the test suite:
Tests use pytest-asyncio in auto mode and live under tests/.
Verify Installation¶
CLI:
You should see the Welcome to Memorg CLI Chat! panel. Type exit to quit.
Python:
Top-level re-exports (from memorg/__init__.py):
MemorgSystemContextStore,ContextManager,RetrievalSystem,ContextWindowOptimizerSession,Conversation,Topic,Exchange,Entity
Dependencies¶
The runtime dependencies pinned in pyproject.toml:
| Package | Purpose |
|---|---|
openai (^1.79) |
Embeddings + chat completions |
rich (^14) |
Terminal output for the CLI |
tiktoken (^0.9) |
Token counting in the window optimizer |
aiosqlite (^0.21) |
Async SQLite I/O |
numpy (^2.2) |
Vector arithmetic |
usearch (^2.17) |
On-disk vector index |
python-dotenv (^1.1) |
Loads .env for the CLI and MCP server |
fastmcp (^0.1) |
MCP server implementation |
Optional: Documentation Dependencies¶
To build this documentation site locally:
The docs group pins mkdocs ^1.5 and mkdocs-material ^9.5.
Environment Setup¶
Memorg expects OPENAI_API_KEY to be available — either exported or loaded from a .env file in the working directory (python-dotenv is loaded by the CLI and the MCP server at startup).
If the key is missing, the CLI prints Please set OPENAI_API_KEY environment variable and exits.