Now launching · Prefex is live

The best ideas for cutting AI cost go viral one at a time:

smart routing

We integrated a dozen of them to run as one solution.

One local-first binary behind a single base_url change. A dozen celebrated optimizations, instrumented, auto-applied, and tuned to pull in the same direction instead of fighting each other. Built for Claude Code, with prebuilt support for Codex and other OpenAI-compatible tools now in active benchmarking.

Free 60 days·~20MB binary·localhost-only·honest receipts

prefex · localhost:8019 live
Saved by Prefex
$0.00 this session
incremental, beyond the native caching you already get free
prompt cache$2.91
routing$0.88
compression$0.61
memory$0.21
coach3 prompts repeat the same 2k preamble. Consolidate them to save about $0.40 a week.
99% cache hitmodel sonnet50% ctx used
While you work

Don't just spend less. Learn to spend less.

A monthly invoice never changed anyone's behavior. Prefex coaches the habit inline, in the moment, so the savings actually change how you work, not just what you read in a report.

Live coaching, in the moment:

consolidate 3 repeated prompts
Honest, measured

Real savings, with a receipt for every token.

Numbers from real sessions, read from Anthropic's own billing fields, not computed by us. What you save depends on your workload, which is exactly why the dashboard shows you the receipt per request instead of a headline.

$0
saved
$0
spent
0%
cut, all-in
0
logged requests

From the maintainer's own machine, March to May 2026. Every figure is read from Anthropic's own billing fields, not computed by us. Your numbers depend entirely on your workload, which is why the dashboard shows you the receipt per request instead of a headline.

Round 1, coldno cache yet
~$0.042
Round 2, warmsame prefix, cached
~$0.005 · 88% saved
Number on your dashboardWhat it meansWhose credit
Saved by PrefexWhat routing, trimming and guardrails added beyond the native caching you already get free.Prefex
vs no optimization at allEvery token repriced at full strong-model rate with no caching discount. The bigger number, shown only for context.mostly Anthropic's free caching

Most eye-catching "X% saved" figures elsewhere are really Anthropic's native caching, which you get without us. Prefex only takes credit for what it adds.

Flagship · Prefex

Every Claude token, cheaper and more useful.

Twelve layers and a dozen-plus optimizations in one proxy. Drop it in front of your existing client, change nothing else, and watch a local dashboard account for every cent.

01

Smart routing

An explainable rules router sends simple turns to a cheaper model and keeps the hard ones on the strong one. You set the threshold.

02

Prompt-cache assist

Prefix detection, a cache warmer, prefix-stabilization, and prewarm-on-switch keep your cached context hot — including pre-paying the re-write before a model switch or a proxy stop, so you never eat the cold-turn spike.

03

Compression

Lossless-first compaction of tool output, logs, and JSON. Cache-boundary-safe and recoverable. Never lossy on code.

04

Cross-session memory

Typed facts extracted from your sessions and re-injected by project, so a new session starts with what the last one learned. Strictly project-scoped: one project's memory never leaks into another.

05

Session handover

When a session ends, prefex distills a structured note — goal, progress, key files, blockers, next steps — and hands it to your next session in that project. Injected once, cache-safely, so continuity costs nothing per turn.

06

Spend guardrails

Token traps, loop guards, think-caps, and lean reasoning catch runaway turns before they bill.

07

Policy gateway

An embedded OPA engine evaluates every tool call against policy — advisory logging or hard enforcement, your call. Scans MCP tool descriptions at session start and flags suspicious ones on a security activity view. Your policies, your machine, no cloud.

08

Receipts & coaching

Savings attributed per mechanism, in honest incremental terms, then surfaced inline as you work so the numbers actually change how you spend.

09

Encoder routing

An optional on-device encoder, a frozen ModernBERT trunk that runs fully offline, scores prompt complexity for sharper routing than rules alone. Opt-in and default-off; the fast heuristic router runs until you switch it on.

10

Spend watcher

A background sentinel reads your live request stream and flags the expensive stuff the moment it happens: big cold cache writes, prefix flapping, rate limits, and spend spikes, straight to your status line.

11

Output shaper

Trims model verbosity on mechanical turns — measured ~11% fewer output tokens, the ones that bill at 5× input and never cache. Honest number, honestly measured.

12

Every tool, one daemon

prefex wrap codex (or aider, cursor, zed) routes any tool through the same shared daemon — one dashboard, one savings ledger, per-tool attribution. Codex rides the OpenAI Responses API natively. Pricing for ~3k models resolves automatically from an embedded snapshot; unknown models are flagged, never silently guessed.

The dashboard

See exactly what it's doing.

A local dashboard at localhost:8019: honest savings per request, every layer, full control. No account, localhost-only, no auth.

localhost:8019 / Home
Prefex dashboard Home: honest savings headline and per-layer cards
Home. The honest savings headline (what Prefex added beyond the free native caching), a labeled counterfactual, and every optimization layer at a glance.
localhost:8019 / Activity
Prefex dashboard Activity: full request log
Activity. Every request with model, cache hit %, cost, saved, and latency. Drill into projects and sessions.
localhost:8019 / Coach
Prefex dashboard Coach: suggestions from your own traffic
Coach. Suggestions computed from your own traffic: prompt consolidation, expiring cache, context cleanup.
localhost:8019 / Settings
Prefex dashboard Settings: every optimization layer
Settings. Every layer, model tier, and price editable in one place. Connect Claude Code, Cursor, and more.

// shown with sample data, localhost-only, your data never leaves your machine

The thesis

Saving tokens is nobody's job. So we made it ours.

Cheaper tokens sit in a blind spot. The frontier labs optimize capability, and more usage is their business, not less of it. Developers chase the next model and the next feature, not last month's bill. So the savings problem sits unowned, in no man's land, and the partial fixes that do exist do not add up.

The repo treadmill

Every week a new viral repo: a cache trick, a router, a compressor. You bolt it on and move on when the next one ships. Each is brilliant alone, but a pile of bolt-ons is not a scalable model, and they never knew about each other.

Invoices don't change behavior

A monthly total never changed anyone's habits. You change how you work when you see the saving happen, in the moment, inline, as you type. A number in a report you never open is not a feedback loop.

The cold-cache drain

Cache goes cold. Every restart pays to rebuild the same context, the same files, the same prompt. You are not doing more work. You are paying for the same warmup again, and nothing tells you it is happening.

A lone kayaker paddling solo
BeforePoint solutions, each paddling its own way
A synchronized rowing crew pulling in unison
AfterOne crew, every stroke in sync

So the answer was never one more optimizer. It was a foundation: measure everything, apply the wins automatically, and coach the habit while the work is happening. Prefex is the first product built on that base.

The foundation

Instrumentation. Auto-apply. Coaching.

Three layers sit under everything PromptForce builds. Saving tokens is the visible result. This is the base that makes it compound, and the reason a proxy turns into a platform.

01 · Instrumentation

Every request measured and attributed per mechanism, in honest, incremental terms. You cannot improve, or trust, what you cannot see. Instrumentation came first; the savings followed the data.

02 · Auto-apply

The wins apply themselves. No workflow change, no config archaeology, fail-open by default. A saving that takes effort to claim does not get claimed, so we claim it for you.

03 · Coaching

Savings shown inline, in the moment, so behavior actually changes (you saw it in action up top). The layer that compounds: a number you watch happen sticks.

Prefex runs on this base today. ReadyBase and the tools after it build on the same three layers, which is why this is a company, not a feature.

How we build it

Three non-negotiables.

1 · Fail open

Internal errors never block a request. On bad input, a missing dependency, or a slow path, we log and forward upstream unchanged. The optimization is never a single point of failure.

2 · Binary, not source

One CGO-free Go binary. No runtime fan-out of processes, no sidecar to supervise. Trained weights are the one exception, and they stay behind an opt-in, default-off seam.

3 · Your keys stay home

Everything runs on localhost. No telemetry, no analytics, no external logging. The dashboard has no auth because nothing can reach it but you.

Lineage: ideas we learned from, rebuilt natively.

We credit the sources we distilled from even when not legally required. Copyright protects code, not ideas, so we study the source, extract the intuition, and re-author it inside our own principles.

RouteLLM explainable rules router headroom / Kompress cache-safe compaction LLMLingua-2 token-importance trimming caveman filler-stripping for text Mem0 cross-session typed memory MemGPT / Letta tiered context management OpenHands task-span focus notes RTK tool-output compression ModernBERT on-device routing encoder NVIDIA Switchyard cascade routing signals (calibrating) Storybloq structured session handover codeburn setup-health waste detection Invariant Scanner tool-call policy taxonomy DefenseClaw result + admission scanning OPA embedded policy engine (linked, Apache-2.0) Anthropic native prompt cache + context editing
The lineup

One thesis, a growing toolkit.

Every PromptForce tool is local-first, single-binary, and honest about what it does. We launch with Prefex. ReadyBase is next. More are in the distillery.

Prefex / prefix, extended
● Live
Spend less on Claude, with receipts.

A local-first proxy for Claude Code and the Anthropic API. Smart model routing, prompt-cache assist, cross-session memory, request compression, and spend guardrails, all behind one base_url change. It shows the honest savings it adds beyond the native caching you already get free, request by request.

ReadyBase
Coming soon
Make your codebase AI-ready.

A dependency and co-change graph that scores how ready your repo is for AI agents, and guards high-blast-radius edits. It knows which files are cold, hot, and risky, so your agents (and Prefex) work with context, not guesswork.

More in the works
Distilling
Drawn from the best of the ecosystem.

We study the sharpest ideas in AI tooling and rebuild the ones that clear our bar as native, fail-open tools. The roadmap follows the thesis below.

Editions

Early access now. Pro when your team needs it.

Try the full toolkit on your own machine, no strings. Add team features when you are ready.

Early Access
Free · 60 days
The complete local toolkit.

Every optimization layer, the full dashboard, all of Prefex, free for 60 days. No credit card, no call-home. Renew online in a click when the trial ends. Your keys and prompts never leave your machine.

Pro & Team
On request
For teams that share a stack.

Shared caches, organization-wide routing policy, per-developer attribution, budgets and spend alerts, SSO, and consolidated billing, built on the same single binary. Available on request, tailored to your setup.

Docs

Read the guides.

Two short reads: running Prefex solo, and rolling it out across a team.

Install Prefex

Two commands. Then change one setting.

Download, review the script, run it. The installer starts Prefex and connects Claude Code for you.

Early Access

The install commands unlock the moment you join. Free for 60 days, no obligation, no credit card.

1.
Download & review the install script
Run prefex preview first to see exactly what would change.
$curl -fsSL https://promptforce.ai/install.sh -o install.sh && less install.sh
$bash install.sh
2.
Open the dashboard & restart Claude Code
Prefex runs on :8019. The installer connects Claude Code, so restart it to activate.
$open http://localhost:8019/dashboard

~20 MB standalone binary, zero dependencies. Your prompts and keys never leave your machine.

1.
Download & review the install script
$curl -fsSL https://promptforce.ai/install.sh -o install.sh && less install.sh
$bash install.sh
2.
Open the dashboard & restart Claude Code
$xdg-open http://localhost:8019/dashboard

~20 MB standalone binary, zero dependencies.

1.
Download & review the script
PS>iwr https://promptforce.ai/install.ps1 -OutFile install.ps1
PS>Get-Content install.ps1 | more
2.
Run it, then open the dashboard
PS>.\install.ps1
PS>Start-Process http://localhost:8019/dashboard

Requires PowerShell 5.1+ and Windows 10/11. Windows support is lightly tested, issues to contact@daytwoai.com.

Works with your tools

Or just change one value.

Prefex is a local proxy. Anything that lets you set a custom API base URL works out of the box.

# ~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "http://localhost:8019"  // add this
  }
}
ToolHow to connectStatus
Claude CodeSet ANTHROPIC_BASE_URL in ~/.claude/settings.jsonAuto-configured
CursorSet ANTHROPIC_BASE_URL env var in your shellSupported
Continue.devSet apiBase per model in ~/.continue/config.jsonSupported
AiderRun with --api-base http://localhost:8019Supported
Codex CLIprefex wrap codex, routes this session onlySupported
Python / Node SDKPass base_url="http://localhost:8019" to the clientSupported
Built for agents too

Coding agents can read llms.txt and AGENTS.md for install and config context, or call the MCP server directly at /api/mcpsearch_catalog, get_install_command, get_product_overview.

Your prompts never leave your machine.

Prefex runs entirely on localhost. No telemetry, no analytics, no external logging. If any internal component fails, requests pass through to the upstream API unchanged. Prefex never blocks a request because of its own failure.

# All outbound traffic should go only to api.anthropic.com
sudo tcpdump -i any -n 'dst port 443' 2>/dev/null | grep -v api.anthropic.com

Uninstall is one command. It stops Prefex, restores settings.json, and (with --purge) deletes ~/.prefex.

Full privacy & data-handling details →   Uninstall & guide →
The PromptForce family

Two planes, one boat

Prefex makes every AI token cheaper. ReadyBase makes every token count. Run either alone. Running both is strictly additive.

Cost plane

Prefex

A proxy that makes every Claude token cheaper, with receipts. Prefex rows cheaper.

Explore Prefex →
Time plane

ReadyBase

Makes your AI coding tool act like it grew up in this codebase. ReadyBase steers smarter.

Explore ReadyBase →
Get started

Download, review, run. Savings from the first request.

macOS, Linux & Windows · ~20 MB binary · zero dependencies · free for 60 days, no obligation.

View on GitHub →
close ×

Get Early Access

Prefex is in Early Access, free for 60 days. Tell us where to send your install link and the occasional update.

We store your name, email, and company only to send your link and product updates. Local-first as ever: your prompts and keys never touch our servers.

You're in. Welcome aboard.

Install Prefex on macOS or Linux with one line. Windows and full instructions are on the page.

$curl -fsSL https://promptforce.ai/install.sh | bash
Full instructions →