Drop-in SDK for Anthropic & OpenAI — compresses prompts transparently. CLI + REST API + Claude Code MCP.
Project description
Promptolian — Context Reliability Proxy for AI Agents
Proxy layer for AI agents — keeps context intact across long conversations and eliminates redundant token costs. One line to add, zero changes to your agent logic.
promptolian.com · Pricing · Dashboard · Docs
Quick Start (dev)
# 1. Setup (run once)
bash ~/promptly/workspace.sh
# 2. Start public API at http://localhost:3001
cd ~/promptly/public/api && python3 api.py
# 3. Start transparent proxy at http://localhost:3002
python -m promptolian.proxy
# or: python -m promptolian.proxy --compress (+ context history compression)
# 4. Full dev workspace (tmux — API + proxy + website + monitor)
~/promptly/workspace.sh
Project Structure
~/promptly/
│
├── public/ ← Public git submodule (promptolian.com)
│ ├── website/
│ │ ├── index.html ← Landing page
│ │ ├── pricing.html ← Pricing + ROI calculator
│ │ ├── benchmarks.html ← Context quality benchmark results
│ │ └── docs.html ← Integration docs
│ ├── api/
│ │ ├── api.py ← Flask REST API (port 3001)
│ │ └── context_engine.py ← KV-sandwich context compression pipeline
│ └── promptolian/
│ ├── proxy.py ← Transparent proxy (port 3002)
│ └── __main__.py ← CLI entry point
│
├── tools/
│ ├── hooks/ ← Claude Code compression hooks
│ ├── scripts/
│ │ ├── benchmark_compression.py ← 25-session quality benchmark (Factory.ai methodology)
│ │ ├── build_sessions_50.py ← Session data builder for benchmarks
│ │ ├── article_draft.md ← Article: "Your AI Agent Is Forgetting Things"
│ │ ├── gen_article_cover.py ← Cover image generator (PIL)
│ │ └── article_images/ ← cover_article.png, kv_sandwich.svg, ...
│ ├── audit/
│ │ └── fact_retention_check.py ← Regex-only fact retention auditor (OSS)
│ ├── dev/ ← Local dev utilities
│ └── reports/ ← Roadmap, schemas, onboarding docs
│
├── services/ ← Production Flask server + dashboard
│
├── tests/
│ ├── test_engine.py ← Engine tests
│ ├── test_context_engine.py ← Context engine tests
│ └── test_api.py ← API endpoint tests
│
└── monitor.py ← Live DB stats + fix tracker
Context Engine
public/api/context_engine.py — KV-sandwich architecture:
- HEAD (first 2 turns): verbatim — session framing preserved
- MIDDLE: entity-encoded + compressed — redundant tokens removed
- TAIL (last 4 turns): verbatim — recent facts + task state intact
Benchmark results (25 sessions, Factory.ai 6-dimension scoring):
| Promptolian | Anthropic built-in | OpenAI built-in | |
|---|---|---|---|
| Quality score | 4.26 / 5 | 3.44 / 5 | 3.35 / 5 |
| Compression | 21.8% | 98.7% | 99.3% |
Tool Schema Caching (proxy)
The transparent proxy adds cache_control to tool schemas and re-injects them on subsequent calls. Anthropic bills cached tokens at 10%.
Without proxy: 500 calls/day × 5 tools × 120 tok × 30 days = 9M tok/mo → $27.00
With proxy: 9M tok × 10% cache rate = 900K tok/mo → $2.70
Tests
# Run all tests
python3 -m pytest tests/ -v
# By module
python3 -m pytest tests/test_context_engine.py
python3 -m pytest tests/test_api.py
Fact Retention Audit (OSS)
python3 tools/audit/fact_retention_check.py session.json --verbose --threshold 80
Regex-only (no LLM). Extracts numbers, URLs, key=value pairs, hostnames from session messages, checks survival rate after compression. Exit 0 = pass, 1 = below threshold.
Plans
| Plan | Price | Sessions | Keys |
|---|---|---|---|
| Free | $0 | SQLite · self-hosted | — |
| Solo | $9/mo | PostgreSQL · always-on | 1 |
| Team | $49/mo | PostgreSQL · always-on | Up to 10 |
→ promptolian.com/pricing.html
Tech Stack
| Layer | Tool |
|---|---|
| Context engine | Python (rule-based, no LLM) |
| Proxy | Python / Flask |
| Public API | Flask + Flask-CORS |
| Database (local) | SQLite |
| Database (prod) | PostgreSQL (Railway) |
| Payments | Stripe |
| Website hosting | Vercel |
Last updated: 2026-05-27 · Maurito · Zürich
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file promptolian-2.2.1.tar.gz.
File metadata
- Download URL: promptolian-2.2.1.tar.gz
- Upload date:
- Size: 36.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd810225207910180e0389ae780e42bfe552c99b3a5631da596b8b908d815013
|
|
| MD5 |
7d3009487539211de15e1ac0d517016d
|
|
| BLAKE2b-256 |
33dbca267bd4fa17ec7939b6089e0d3c4752c079a348964bdae572fb6d3e1665
|
File details
Details for the file promptolian-2.2.1-py3-none-any.whl.
File metadata
- Download URL: promptolian-2.2.1-py3-none-any.whl
- Upload date:
- Size: 29.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
db15c16e7acf28917e30686e99bf3bb9d1cd28dba2b22e2fbd9783021a7ad691
|
|
| MD5 |
4fe569bdf93701baf627854f377a9e87
|
|
| BLAKE2b-256 |
9b47686adeac7a3f7e469dd12d935dce32bac7870dc19d2b01697638b725b79f
|