TokenFluid
Public beta — open

Give your AI agent a mini-repo, not your whole codebase.

TokenFluid indexes your repo locally, selects the files that matter, and mounts a scoped working set your AI agent can inspect with normal tools like rg, cat, sed, and grep.

Fewer search loops. Less noisy context. Safer patches.

No source code stored in TokenFluid Cloud.

bash — agent working set
1cd .tokenfluid/sessions/abc/working_set
2rg "login_user"
3sed -n '40,90p' app/services/auth.py
rggrepcatsedheadtailfind
The problem

AI agents burn tokens searching your repo.

Modern agents are powerful, but they're handed a flat directory tree and told to figure it out. The result is a lot of wasted compute and a lot of risky guesses.

Whole-repo grep loops

Agents run grep across everything, get thousands of hits, then re-grep with narrower terms. Each loop burns tokens and rarely converges on the right file.

Noisy context windows

Long context fills up with irrelevant imports, generated files, and vendored deps. The signal gets drowned out, and the agent's answers get worse, not better.

Patches on unread files

Agents propose edits to files they never actually inspected. The diff looks plausible but touches code paths the agent has no real understanding of.

Can't approve what you can't see

When a change spans twenty files across a monorepo, there's no clean way to review what the agent touched and why before it lands in your branch.

What TokenFluid does

A scoped mini-repo, mounted for your agent.

Three pieces work together: a local index, a selection step, and a mounted working set. The agent stays in its comfort zone; you stay in control of what it sees.

Local index

TokenFluid indexes your repo locally into a SQLite database — symbols, imports, file structure, and boundaries. The index lives in .tokenfluid next to your code. No code leaves your machine to build it.

tokenfluid index .
Smart selection

When the agent asks a question, TokenFluid scores files by relevance to that specific task. It picks a small, defensible set — not the whole tree, not a fuzzy embedding match. Selection reasons are logged locally.

Mounted working set

The selected files get mounted into a sandboxed directory the agent can navigate. rg, cat, sed, head, tail, and find all work normally. The agent doesn't learn a new API — it just works in a smaller repo.

.tokenfluid/sessions/<id>/working_set
How it works

Four steps, no new agent API.

TokenFluid doesn't ask your agent to learn anything new. It changes what the agent sees, not how the agent works.

01
Build a local index
tokenfluid index .

TokenFluid walks your repo, extracts symbols, imports, and file boundaries, and writes them to a local SQLite database in .tokenfluid. The index is the substrate every later decision is made against. It rebuilds fast on changes — no full re-scan needed.

02
Wire it to your agent
tokenfluid mcp-install .

The install command registers TokenFluid as an MCP server for your agent. Claude Code, Cursor, Continue, and any MCP-compatible client pick it up automatically. Your agent now has a tool that knows your repo's shape.

03
Agent asks a question
"Where does login happen?"

When the agent needs context, TokenFluid scores files against the task and mounts a working set of the few that actually matter. The agent greps that small set instead of the whole tree. Selection reasons are logged locally so you can audit them.

04
Agent works inside the set
rg, cat, sed, head, tail, find

The mounted mini-repo is just a directory. The agent uses the same tools it always has, but against a curated subset. Fewer hits, cleaner diffs, and every proposed change stays in the sandbox until you approve it.

Why it saves tokens

Fewer tokens. Better answers.

The biggest token sink in agent workflows isn't the answer — it's the search. Cut the search and the rest follows.

When an agent greps a whole repo, every iteration pulls in dozens of irrelevant files. The context window fills with noise, the agent re-reads the same dead ends, and the loop runs five to twelve times before converging. TokenFluid short-circuits that loop by handing the agent a working set that's already been filtered to the task. One or two passes usually land on the right answer.

The savings compound: smaller context means faster inference, cleaner diffs mean fewer review cycles, and a scoped working set means the agent can't accidentally edit a file it never read.

Illustrative comparison (not benchmarked)
ModeAvg tokens / taskSearch loops
Whole-repo grep~80k5–12
TokenFluid mini-repo~12k1–2
Built for agents

Built for agents, not just IDEs.

TokenFluid is not an IDE plugin. It speaks MCP, so it works with any agent that speaks MCP — Claude Code, Cursor, Continue, custom in-house agents. There's no editor lock-in, no proprietary protocol, and no language server to babysit.

The mounted mini-repo is just a directory on disk, so agents can use their existing tools without learning a new API. If your agent can run rg and read files, it can use TokenFluid.

MCP-nativeAgent-agnosticWorks with rg/grep/cat/sed
Any MCP-speaking agent
Claude Code
Cursor
Continue
Custom agents via MCP
Safety model

Sandboxed. Approvable. Auditable.

TokenFluid gives agents power without giving them keys. Every change is contained, reviewed, and logged.

Working set is a sandbox

Agent changes stay in the mounted mini-repo until you explicitly approve them. Nothing writes back to your real working tree without a yes from you. The sandbox is a real directory, so you can inspect it with your own tools.

Patch approval

Every proposed change is shown as a diff. You see exactly which files, which lines, and why. Nothing applies without your explicit approval. Reject and the agent retries; accept and it lands in your tree.

Audit trail

Every session, every file touched, every approval is logged locally. You can reconstruct what the agent saw and what it did after the fact. The log lives on your machine, not in someone else's cloud.

Deployment modes

Local-first by default. Cloud-orchestrated when you want.

You can run TokenFluid entirely on your machine, or opt into cloud orchestration for cross-device sessions. The choice is yours, and the privacy model is explicit.

Local-only
default

Index, selection, and working set all stay on your machine. Nothing leaves — no metadata, no snippets, no telemetry. The cloud account exists only for billing and API key management if you choose to use them. This is the right default for sensitive codebases and air-gapped environments.

Cloud-orchestrated
opt-in

TokenFluid Cloud receives metadata first — repo hash, file paths, task type, privacy mode. Selected line-range snippets may be requested only if your privacy mode allows it. Cloud orchestration enables cross-device sessions and shared team history without sharing source.

Use cases

Where TokenFluid helps.

Any task where the agent would otherwise grep the whole repo and hope. A few common patterns:

Refactoring auth flows

Auth touches dozens of files across middleware, services, and tests. TokenFluid mounts the ones that matter for the change so the agent doesn't grep through unrelated controllers.

Migrating APIs

API migrations span clients, servers, schemas, and docs. TokenFluid scopes the agent to the affected surface so it proposes a coherent diff instead of half a migration.

Adding tests to legacy code

Legacy code without tests is hard to navigate. TokenFluid surfaces the call graph around the function under test so the agent writes tests that actually exercise real paths.

Bug triage across monorepos

Monorepos break grep. TokenFluid's index knows package boundaries and mounts only the relevant subtree, so the agent doesn't drown in unrelated packages.

Onboarding to unfamiliar repos

New to a codebase? Ask TokenFluid where something lives and get a curated working set instead of a directory listing. Faster than reading every README.

Multi-file feature work

Features touch models, routes, UI, and tests. TokenFluid mounts the cohesive set so the agent's diff spans all the right files in one coherent change.

Public beta — open

Stop wasting tokens on repo search.

Public beta is open. Hook up your agent in under five minutes.

pip install tokenfluid

FAQ

Questions, answered honestly.