Surfil
// how it works

What happens on your machine, step by step

From the command you type to the numbers you end up reading. Every claim on this page is something you can check yourself, and nothing on it is hand-waved.

surfil · one interception point
Claude CodeCursorCodex · Copilot
◈ interceptor
1. security2. cost3. quality4. observability5. memory
≋ one signed Weave spine
Step 1 · install

One command, beside the agents you already run

Core detects the agents you already run and consolidates their scattered configuration into a single point - without changing how you invoke anything. The output below is illustrative product UI.

~ - surfil
$ curl -fsSL https://surfil.com/install.sh | sh
# detecting agents…
Claude Code adapter wired
Cursor adapter wired
Codex · Copilot · 2 MCP servers adapters wired
originals backed up byte-for-byte (uninstall restores exactly)
$ surfil consolidate
6 MCP servers → 1 endpoint · Weave bootstrapped
Before Surfil touches any agent config, it snapshots the original. Uninstalling restores every byte and leaves zero residue - that's verified behavior, not a promise.
Step 2 · intercept once

It sits in one place, and changes nothing on the way through

Every agent request crosses exactly one on-device boundary. Passthrough is byte-exact - the provider sees the identical prefix bytes, so your prefix cache keeps working. That's asserted in CI, not assumed.

Claude Code
Cursor
Codex · Copilot
MCP agents
interceptor
one point · byte-exact
security
Guard
cost
Cap
quality
Bench
observability
Radar
memory
Mind · Pilot
Weave spine
signed facts
signed output
Ed25519 receipt

One device-side pipeline. Every product is a stage; every stage writes to the same spine.

Why one point matters

One interception layer means one place to reason about security, one cost ledger, one memory. The One-Layer rule is permanent: we will never chain a second proxy behind the first - not even to sell you something.

Why byte-exact matters

Providers cache your prompt prefix; break the bytes and you silently pay full price on every request. Surfil's passthrough preserves the provider prefix hash exactly, and CI fails if it ever doesn't.

Step 3 · the pipeline

What every request is checked for, in order

The stage order is deliberate: safety rules first, cost decisions second, and only then measurement, recording and memory.

1

security

Guard evaluates every tool-call and payload pre-flight: secret patterns, OWASP-scored injection, sandbox rules. Fail-closed - if policy can't be evaluated, the call doesn't run.

2

cost

Cap measures what each request really needed: prefix-cache alignment, redundant context, model fit. Savings are computed before/after on your own traffic, never assumed.

3

quality

Bench scores what came back - fixes-per-task, cost-per-fix - per repository, so 'which model is worth it here' becomes a measured answer.

4

observability

Radar records the session as metadata: what ran, what it cost, what was blocked. Enough to see and rewind - never enough to reconstruct your source.

5

memory

Mind writes settled facts to Weave with provenance and a code hash; Pilot reads them back with citations. The next session starts warm instead of from zero.

Step 4 · one spine

What it learns is written down, in files you own

Weave is the signed knowledge network every stage writes to - plain, portable, and self-policing about staleness.

Signed Markdown

Facts are .md files with frontmatter: provenance, signature, code hash. Readable in any editor, verifiable by anyone.

Stale flags itself

Each fact pins the code it describes by hash. Code changes → hash mismatches → the fact auto-flags STALE. No confidently wrong memory.

Portable by design

surfil export packs the whole network into a .surfilpkg. Your knowledge leaves with you - receipts keep verifying after you're gone.

Step 5 · the proof

You can prove any number to somebody who does not trust us

Execution is unmetered. When Surfil produces something of provable value - a savings receipt, a benchmark, an attestation - the edge signs it. That signed output is the metered unit, and the proof. Illustrative UI:

~/acme/api - surfil
$ surfil audit
measured before/after on 3 repos · recoverable: 284k tokens/wk
receipt signed: rcpt_2b7e (Ed25519 · epoch 7)
$ surfil verify rcpt_2b7e
✓ VALID (offline · public key · no account - your auditor can run this)
The architecture

The work happens on your machine, not on our servers

The split is the zero-trace guarantee and the pricing model at once: your machine does the sensitive work, the edge only signs and meters.

On your device

runtime · Rust

Adapters, the interceptor, all five pipeline stages, the Weave engine and the local buffer. Your source, prompts and diffs exist only here.

At the edge

workers · stateless

Stateless workers for auth, entitlement, ingest, metering and signing. They see signed batches of metadata - never code. Cost stays flat per user.

Full threat model, key-epoch handling and fail-closed behavior live on the security page.
Not today

Read it all and still not sure?

Then the honest thing is not to sell you anything yet.

Tell me when Surfil starts cutting the bill

Cap measures what your context costs today; it does not reduce it yet. That work is next, and this is the only way to hear when it lands. One email, no schedule.

One click to confirm, one click to leave, any time. No sharing, no selling.

Walk the path on your own machine

Install, consolidate, run a normal week, verify the receipt. Every step above is reproducible - and reversible byte-for-byte if you change your mind.