Skip to main content

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

promptolian-2.3.0.tar.gz (37.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promptolian-2.3.0-py3-none-any.whl (30.3 kB view details)

Uploaded Python 3

File details

Details for the file promptolian-2.3.0.tar.gz.

File metadata

  • Download URL: promptolian-2.3.0.tar.gz
  • Upload date:
  • Size: 37.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for promptolian-2.3.0.tar.gz
Algorithm Hash digest
SHA256 2ff4b98f9d7d6cde7a8fd7f45318e4ca1dd44cc5171c854703c3eaeb6f81b070
MD5 cf3613e1bd37f01671b069774104b119
BLAKE2b-256 b71686252ac85aec376ced4e8ff50ecff6c58d66da8c6c014bcd472106316fd7

See more details on using hashes here.

File details

Details for the file promptolian-2.3.0-py3-none-any.whl.

File metadata

  • Download URL: promptolian-2.3.0-py3-none-any.whl
  • Upload date:
  • Size: 30.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for promptolian-2.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1077ac0b7ea5a9025f2b485fa0d81b351987595ffb580c91be30a67a728f8bf5
MD5 f35e35b116d8123b37f07f0872a3d34c
BLAKE2b-256 c79a6b64dfc8c7a8703792a842f1ba1c31b279e81e65fe81102da80f88b6b3d5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page