SalmAlm — Private AI Gateway
Self-hosted, privacy-first AI gateway. Your data never leaves your machine.
Quick Start
pip install salmalm
salmalm start
# Open http://localhost:8000
Features
- 🔒 100% Local — no data sent to third parties
- 🤖 Multi-LLM — Claude, GPT, Gemini in one interface
- 📚 RAG — chat with your own documents
- 🛠️ 62 built-in tools — web search, file ops, code execution
- 🔐 Vault encryption for sensitive data
- 🐳 Docker ready
Docker
docker-compose up -d
Requirements
- Python 3.10+
- API key for at least one LLM provider
Features
- Multi-provider LLM routing — OpenAI, Anthropic, Google, xAI, Ollama with 3-tier auto-routing (simple / moderate / complex)
- Automatic failover + circuit breaker — transparent retry across providers; unhealthy endpoints are isolated
- RAG — BM25 + semantic search with Reciprocal Rank Fusion (RRF); indexes your local files automatically
- Vault encryption — AES-256-GCM with PBKDF2-200K key derivation; opt-in per secret
- OAuth2 — Google and Anthropic social login flows
- WebSocket streaming — real-time token streaming to the web UI
- Multi-user auth — JWT-based session management with per-user quotas
- Cost tracking + daily quotas — per-model token accounting with configurable daily spend caps
- Prometheus metrics —
/metricsendpoint; drop-in for any Grafana stack - SQLite audit log — WAL mode; every request, tool call, and auth event is logged
- 62 built-in tools — shell exec, file I/O, web search (Brave), browser automation, TTS/STT, image gen, cron, and more
Quick Start
pip install salmalm
salmalm start
# → http://localhost:18800
A Setup Wizard opens on first launch. Paste an API key, pick a model — done.
Recommended: use
pipx install salmalmto avoid dependency conflicts.
Configuration
All configuration is via environment variables. No config files required.
| Variable | Default | Description |
|---|---|---|
SALMALM_PORT |
18800 |
HTTP listen port |
SALMALM_BIND |
127.0.0.1 |
Bind address (0.0.0.0 for LAN access) |
SALMALM_SECRET |
(none) | Master secret for Vault + JWT signing (set this!) |
SALMALM_ALLOW_SHELL |
0 |
Enable shell operators in tool exec (1 to opt in) |
SALMALM_PYTHON_EVAL |
0 |
Enable Python eval tool (1 to opt in) |
SALMALM_DAILY_BUDGET |
(none) | Daily spend cap in USD, e.g. 2.00 |
API Reference
| Method | Path | Description |
|---|---|---|
POST |
/api/chat |
Send a message; returns SSE stream |
GET |
/api/sessions |
List chat sessions |
DELETE |
/api/sessions/{id} |
Delete a session |
GET |
/api/tools |
List available tools and their schemas |
GET |
/api/models |
List discovered models across all providers |
GET |
/api/costs |
Cost summary (today / 30-day) |
GET |
/metrics |
Prometheus metrics endpoint |
GET |
/api/vault |
List vault entries (values redacted) |
POST |
/api/vault |
Store an encrypted secret |
GET |
/api/audit |
Recent audit log entries |
Architecture
Client (Browser / Telegram / Discord)
│
▼ HTTP + WebSocket
┌───────────────────────────────────────────┐
│ SalmAlm │
│ │
│ ┌─────────────┐ ┌───────────────────┐ │
│ │ 3-Tier │ │ Engine Pipeline │ │
│ │ LLM Router │──▶│ classify → route │ │
│ │ + Failover │ │ → context → exec │ │
│ └─────────────┘ └───────────────────┘ │
│ │ │
│ ┌──────▼──────────────────────────────┐ │
│ │ Providers │ │
│ │ OpenAI · Anthropic · Google · xAI │ │
│ │ Ollama · LM Studio · vLLM │ │
│ └─────────────────────────────────────┘ │
│ │
│ RAG (BM25 + Semantic + RRF) │
│ Vault (AES-256-GCM) │
│ JWT Auth · OAuth2 │
│ 62 Tools · Cron · Sub-Agents │
│ SQLite Audit (WAL) · Prometheus /metrics │
└───────────────────────────────────────────┘
Development
git clone https://github.com/hyunjun6928-netizen/salmalm.git
cd salmalm
pip install -e ".[dev]"
pytest tests/ -q --timeout=30 -x \
--ignore=tests/test_multi_tenant.py \
--ignore=tests/test_fresh_install_e2e.py
See CONTRIBUTING.md for guidelines.
License
MIT © 2024 hyunjun6928-netizen
SalmAlm = 삶 (Life) + 앎 (Knowledge)
Your life, understood by AI.
SalmAlm — Private AI Gateway
Self-hosted, privacy-first AI gateway. Your data never leaves your machine.
Quick Start
pip install salmalm
salmalm start
# Open http://localhost:8000
Features
- 🔒 100% local — no data sent to third parties
- 🤖 Multi-LLM — Claude, GPT, Gemini in one place
- 📚 RAG — chat with your documents
- 🛠️ 62 built-in tools
- 🔐 Vault encryption for sensitive data
Docker
docker-compose up -d
Metadata
Release files for salmalm 0.30.28
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| salmalm-0.30.28.tar.gz | 988.7 kB | Without provenance | Details for salmalm-0.30.28.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| salmalm-0.30.28-py3-none-any.whl | Python 3 | none | any | Details for salmalm-0.30.28-py3-none-any.whl |
Total release size: 2.0 MB
Release files / salmalm-0.30.28.tar.gz
| Download URL | salmalm-0.30.28.tar.gz |
|---|---|
| Size | 988.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
96bf04361113d5bebe19524ca3cdb2fc75740f9b135d5ae765cf62a93126928b
|
|
BLAKE2b-256 checksum How to use checksums |
f8a6db60ce1198e6b2b0e8e74c061fa4b7e30baa96ad160253b19b656473f7e0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Release files / salmalm-0.30.28-py3-none-any.whl
| Download URL | salmalm-0.30.28-py3-none-any.whl |
|---|---|
| Size | 963.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2f810ef1c7a7ad1187fa7a2fca49cea390f8b22bb66f58fcbb79e798fc567af2
|
|
BLAKE2b-256 checksum How to use checksums |
fa2955f37b31b66202ac3b1fd3554231257869d89833c819015e1fe8d88e0052
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.3
|
Security for salmalm 0.30.28
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.