Skip to main content

Promptolian

AI agents burn tokens repeating themselves. Promptolian stops that — transparently, with one line of code.

A local proxy that sits between your code and the Anthropic / OpenAI API. No SDK changes. No new abstractions. Just cheaper, more reliable agents.

promptolian.com · Docs · Pricing


What it does

  • Deduplicates tool outputs — when an agent reads the same file twice, the second read costs ~5 tokens instead of thousands
  • Prevents context wall failures — resets the session automatically before the model hits its context limit, preserving what matters
  • Caches tool schemas — Anthropic charges 10% for cached tokens; the proxy handles this for you

All free. No API key needed to start.


Install

pip install "promptolian[proxy]"

Quick Start

python -m promptolian.proxy

Then change one line in your code:

# Before
client = anthropic.Anthropic()

# After
client = anthropic.Anthropic(base_url="http://localhost:3002")

That's it. Every API call now goes through the proxy.


Features

Tool Result Compression (free)

In agentic workflows, the same files get read repeatedly, bash outputs recur, search results repeat. The proxy deduplicates automatically:

  • Exact repeat → [TOOL_CACHE_REF: same as call #N] — ~5 tokens instead of thousands
  • Similar content → compact diff showing only what changed

Benchmark: 34.6% token savings on tool outputs, 99% fact retention across 9 agentic sessions.

Works for both Anthropic (tool_result) and OpenAI (role=tool) formats. No configuration needed.


Tool Schema Caching (free)

The proxy automatically adds cache_control to tool definitions. Anthropic charges 10% for cached tokens.

500 calls/day × 5 tools × 120 tokens × 30 days = 9M tokens/mo → $27
With caching:                                       900K tokens/mo → $2.70

Session Reset (requires API key)

The proxy tracks token usage per session. When it approaches the model's context window limit, it compresses the conversation history and starts a fresh session — injecting the compressed context as a system prompt.

PROMPTOLIAN_API_KEY=your_key python -m promptolian.proxy --reset-at 0.70

Without a key, session reset is disabled and the proxy still runs with free features.

Compression quality benchmark (25 sessions, Factory.ai scoring):

Promptolian Anthropic built-in OpenAI built-in
Quality score 4.26 / 5 3.44 / 5 3.35 / 5
Tokens kept 21.8% 1.3% 0.7%

Free vs Paid

Free Paid
Tool result deduplication Yes Yes
Tool schema caching Yes Yes
Session reset + context compression — Yes
Compression quality score — 4.26 / 5

Get a key at promptolian.com/pricing — Solo $9/mo · Team $49/mo.


Claude Code — MCP

pip install "promptolian[mcp]"

Add to ~/.claude/settings.json:

{
  "mcpServers": {
    "promptolian": {
      "command": "promptolian-mcp"
    }
  }
}

Restart Claude Code. Adds compress_prompt, compress_tools_schema, and compression_stats tools.


Health check

curl http://localhost:3002/proxy/health

Metadata

Release files for promptolian 2.3.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for promptolian 2.3.5
File Size Uploaded Provenance Actions
promptolian-2.3.5.tar.gz 40.5 kB Without provenance Details for promptolian-2.3.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for promptolian 2.3.5
File Interpreter ABI Platform Actions
promptolian-2.3.5-py3-none-any.whl Python 3 none any Details for promptolian-2.3.5-py3-none-any.whl

Total release size: 74.6 kB

Release files / promptolian-2.3.5.tar.gz

Download URL promptolian-2.3.5.tar.gz
Size 40.5 kB
Tags Source
SHA-256 checksum
How to use checksums
811224ce2918741b20795d0d6d6d991edda0fe6c980b390f58236fe5915e3401
BLAKE2b-256 checksum
How to use checksums
ca484af60fe636fb6bce2c1ea3c86c45a5e24a46ecff3c92f006a26ed80a3bbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / promptolian-2.3.5-py3-none-any.whl

Download URL promptolian-2.3.5-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
20eb51360d595247c6eb178c79f2ffb41685179a9a658da01025091b37468bc8
BLAKE2b-256 checksum
How to use checksums
aa166fc412fb5af076a9211178a15aae6810b310125f59ffef7653499f60bb40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for promptolian 2.3.5

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page