OpenMantis is an open-source tool and SDK that lets developers run large AI models on low-spec devices by acting as a smart optimization layer between your app and local model runtimes like Ollama and Foundry Local.
It focuses on reducing memory and storage usage through caching, prompt tokenization, and context directory indexing.
This is a monorepo containing two SDK packages:
| Package | Path | Registry |
|---|---|---|
| @openmantis/openmantis | packages/node |
GitHub Packages (npm) |
| openmantis | packages/python |
PyPI |
- Runtime adapters for local model servers (Ollama, Foundry Local)
- Caching layer to avoid recomputation across sessions
- Tokenization and prompt budgeting utilities
- Context directory indexing to reuse relevant information efficiently
npm install
npm run test:node
node packages/node/bin/openmantis.js run "hello world"cd packages/python
pip install -r requirements.txt
pip install -e ".[dev]"
pytestCopy .env.example to .env.local and update the values.
| Variable | Description | Default |
|---|---|---|
OPENMANTIS_CACHE_DIR |
Cache directory | .openmantis/cache |
OPENMANTIS_RUNTIME_OLLAMA_URL |
Ollama endpoint | http://localhost:11434 |
OPENMANTIS_RUNTIME_FOUNDRY_URL |
Foundry endpoint | http://localhost:3000 |
OPENMANTIS_MAX_CONTEXT_TOKENS |
Max context tokens | 4096 |
OPENMANTIS_MAX_OUTPUT_TOKENS |
Max output tokens | 1024 |
# Run all tests
npm run test:all
# Node.js tests only
npm run test:node
# Python tests only
npm run test:pythonpackages/
node/ Node.js SDK (@openmantis/openmantis)
bin/ CLI entrypoint
src/cli/ Command handlers
src/core/ Cache, router, tokenizer, memory, directory
src/runtimes/ Ollama and Foundry adapters
src/platform/ Path, process, and hardware helpers
test/ Node.js tests
python/ Python SDK (openmantis)
src/openmantis/ Package source
tests/ Python tests
docs/ Architecture and runtime docs
skills/ Agent runbooks
- Bump the version in
packages/node/package.json. - Run
npm run test:nodeand make sure the suite passes. - Create a GitHub release or tag (e.g.
v0.1.1). - The workflow
.github/workflows/npm-publish.ymlpublishes to GitHub Packages.
- Bump the version in
packages/python/pyproject.toml. - Run
npm run test:pythonand make sure the suite passes. - Create a GitHub release or tag.
- The workflow
.github/workflows/pypi-publish.ymlpublishes to PyPI.
See SECURITY.md for reporting vulnerabilities.
MIT (see LICENSE).