Agent runtime optimization with Small Language Models
See the code
2× the context. ½ the cost.
Same model. Longer reach.
Context savings for coding agents. parsec is a local proxy and plugin for Claude Code, OpenCode, Codex CLI, pi, and Claude Desktop that cuts the tokens your agent spends per turn: it blocks wasteful re-reads, breaks command loops, and (with scoring enabled) curates the conversation context before each request, cache-safely. Savings are measured per request against the provider's own token counter, never estimated.
Everything runs on your machine with your own credentials. Model traffic never touches anyone else's infrastructure.
|
macOS Apple silicon |
Windows x64 |
Linux x64 |
.pkg installer | setup.exe installer | one-line script |
Every installer signs you in when it opens the browser, then installs the
parsec binary and the Claude Code plugin. The native installers are on the
releases page next to
the raw binaries the scripts download.
Download parsec-<version>-macos-arm64.pkg from the
releases page and
open it, or run:
curl -fsSL https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.sh | bash
Download parsec-<version>-windows-x64-setup.exe from the
releases page and run
it, or in PowerShell:
irm https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.ps1 | iex
curl -fsSL https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.sh | bash
The script fetches the parsec-linux-x64 binary for the latest release and
installs the plugin.
claude plugin marketplace add https://github.com/daseinlabs/parsec
claude plugin install parsec@parsec-marketplace
The plugin fetches its binary from this repository's GitHub Releases on first
use (sha256-verified against the release's manifest.json), so a marketplace
install needs nothing else. Installed from the old daseinlabs/plugins
marketplace? That repository is frozen at its last release. Switch once:
claude plugin marketplace remove parsec-marketplace
claude plugin marketplace add https://github.com/daseinlabs/parsec
claude plugin install parsec@parsec-marketplace
Then in a session: /parsec:setup routes your agent through the proxy,
/parsec:savings shows what it saved, /parsec:share --preview shows exactly
what opt-in telemetry would upload before anything leaves.
parsec is a proxy, so this section is the contract. Everything below can be
verified in packages/proxy/src and the schemas in packages/contracts.
| When | What leaves your machine | Where | Off switch |
|---|---|---|---|
| Always | Your model requests, with your own auth headers | The provider you already use (api.anthropic.com by default) | n/a — this is your agent's own traffic |
| Always, no key needed | An anonymous install ping: random install id, parsec version, OS, arch, list of configured harnesses. Sent at setup, on key changes, and every 6 hours while the proxy runs. Never your API key. | parsec platform | PARSEC_INSTALL_REPORT=0 or DO_NOT_TRACK=1 |
| With scoring enabled | Chunk text (each chunk capped at 2000 chars) plus structural features, for keep/cut scoring. The response is scores; the service does not learn what was dropped. | parsec scoring API | PARSEC_FREEZE=off, or run with no scoring endpoint |
| With a parsec key | Savings-ledger rows: token counts per request, model, harness, conversation and request ids. No prompt text. | parsec platform | remove the key (/parsec:key) or unset PARSEC_PLATFORM_URL |
| Opt-in only | Featurized trace sharing (/parsec:share) | parsec platform | Off by default; --preview shows the exact bytes first |
~/.parsec/ holds local state: the savings ledger, score memo (hashes and
quantized scores only), and recordings if you enable PARSEC_RECORD_DIR.
Delete it whenever you like.
| Package | Language | What |
|---|---|---|
packages/engine | Rust | Chunking, featurization, deterministic freezing, readout. Pure library. |
packages/proxy | Rust | The parsec binary: local proxy, hooks, MCP server, status line, harness setup. |
packages/mapgen | Rust | Deterministic repo maps, outlines, symbol lookup for the explore agent. |
packages/contracts | JSON Schema | Cross-language schemas: scoring API, savings ledger, telemetry, install report. |
packages/plugin | Markdown/JSON | The Claude Code plugin (agents, skills, hooks, launcher shims). |
packages/opencode-plugin | JS | OpenCode plugin shim. |
packages/installer | Shell/Inno | Native macOS and Windows installer sources. |
packages/brain | Python | The scoring service: GNN inference over a curator checkpoint, self-validating bundle, calibrated tau. Self-hostable. |
The training pipeline and the account platform are separate, closed
components. Everything here talks to them only over the contracts in
packages/contracts, and runs without them.
The proxy runs without any scoring service (no-reread hook, loop breaker,
savings ledger). Curation needs one, and you can run it yourself: it is
packages/brain, one Python process holding the curator checkpoint and the
bge-large encoder.
The released curator checkpoints live on the Hugging Face Hub at
huggingface.co/parsecai/curator.
Use curator_v7-9_10nn_prod.pt: it is self-contained and needs no neighbor
store at serve time. The model card lists the other checkpoint and its
calibration tables.
# 1. a curator checkpoint — fetched and cached via huggingface_hub, or a local path
pip install huggingface_hub
export PARSEC_CKPT=hf://parsecai/curator/curator_v7-9_10nn_prod.pt
# 2. the service (in-process bge-large; CPU works, a GPU is faster)
docker compose up -d # http://127.0.0.1:8090
# 3. point the proxy at it
export PARSEC_BRAIN_URL=http://127.0.0.1:8090
packages/brain/README.md has the bare-uvicorn form, the auth options, and
a Cloud Run recipe. A self-hosted brain is where the chunk text in "What
parsec sends" goes; with your own host, nothing leaves your infrastructure.
cargo build --release # engine, proxy (the `parsec` binary), mapgen
make check # fmt + clippy + tests, same flags CI runs
make plugin # build and install a local plugin binary for `claude --plugin-dir`
Rust 1.98 is pinned in rust-toolchain.toml. No model download, no network
needed for the Rust test suite. The scoring service's tests
(make brain-test) run their hermetic subset without a checkpoint. See
CONTRIBUTING.md for the dev loop.
These are what the test suite protects; see DIRECTION.md §8.
count_tokens
counterfactual, never a modeled baseline.MIT, see LICENSE. Third-party notices and trademark note in
THIRD_PARTY.md. Security reports: SECURITY.md.
11 commits
Rust
66.6%
Python
24.4%
Shell
3.1%
PowerShell
2.5%
Inno Setup
1.5%
Agent runtime optimization with Small Language Models
See the code
2× the context. ½ the cost.
Same model. Longer reach.
Context savings for coding agents. parsec is a local proxy and plugin for Claude Code, OpenCode, Codex CLI, pi, and Claude Desktop that cuts the tokens your agent spends per turn: it blocks wasteful re-reads, breaks command loops, and (with scoring enabled) curates the conversation context before each request, cache-safely. Savings are measured per request against the provider's own token counter, never estimated.
Everything runs on your machine with your own credentials. Model traffic never touches anyone else's infrastructure.
|
macOS Apple silicon |
Windows x64 |
Linux x64 |
.pkg installer | setup.exe installer | one-line script |
Every installer signs you in when it opens the browser, then installs the
parsec binary and the Claude Code plugin. The native installers are on the
releases page next to
the raw binaries the scripts download.
Download parsec-<version>-macos-arm64.pkg from the
releases page and
open it, or run:
curl -fsSL https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.sh | bash
Download parsec-<version>-windows-x64-setup.exe from the
releases page and run
it, or in PowerShell:
irm https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.ps1 | iex
curl -fsSL https://raw.githubusercontent.com/daseinlabs/parsec/main/scripts/install.sh | bash
The script fetches the parsec-linux-x64 binary for the latest release and
installs the plugin.
claude plugin marketplace add https://github.com/daseinlabs/parsec
claude plugin install parsec@parsec-marketplace
The plugin fetches its binary from this repository's GitHub Releases on first
use (sha256-verified against the release's manifest.json), so a marketplace
install needs nothing else. Installed from the old daseinlabs/plugins
marketplace? That repository is frozen at its last release. Switch once:
claude plugin marketplace remove parsec-marketplace
claude plugin marketplace add https://github.com/daseinlabs/parsec
claude plugin install parsec@parsec-marketplace
Then in a session: /parsec:setup routes your agent through the proxy,
/parsec:savings shows what it saved, /parsec:share --preview shows exactly
what opt-in telemetry would upload before anything leaves.
parsec is a proxy, so this section is the contract. Everything below can be
verified in packages/proxy/src and the schemas in packages/contracts.
| When | What leaves your machine | Where | Off switch |
|---|---|---|---|
| Always | Your model requests, with your own auth headers | The provider you already use (api.anthropic.com by default) | n/a — this is your agent's own traffic |
| Always, no key needed | An anonymous install ping: random install id, parsec version, OS, arch, list of configured harnesses. Sent at setup, on key changes, and every 6 hours while the proxy runs. Never your API key. | parsec platform | PARSEC_INSTALL_REPORT=0 or DO_NOT_TRACK=1 |
| With scoring enabled | Chunk text (each chunk capped at 2000 chars) plus structural features, for keep/cut scoring. The response is scores; the service does not learn what was dropped. | parsec scoring API | PARSEC_FREEZE=off, or run with no scoring endpoint |
| With a parsec key | Savings-ledger rows: token counts per request, model, harness, conversation and request ids. No prompt text. | parsec platform | remove the key (/parsec:key) or unset PARSEC_PLATFORM_URL |
| Opt-in only | Featurized trace sharing (/parsec:share) | parsec platform | Off by default; --preview shows the exact bytes first |
~/.parsec/ holds local state: the savings ledger, score memo (hashes and
quantized scores only), and recordings if you enable PARSEC_RECORD_DIR.
Delete it whenever you like.
| Package | Language | What |
|---|---|---|
packages/engine | Rust | Chunking, featurization, deterministic freezing, readout. Pure library. |
packages/proxy | Rust | The parsec binary: local proxy, hooks, MCP server, status line, harness setup. |
packages/mapgen | Rust | Deterministic repo maps, outlines, symbol lookup for the explore agent. |
packages/contracts | JSON Schema | Cross-language schemas: scoring API, savings ledger, telemetry, install report. |
packages/plugin | Markdown/JSON | The Claude Code plugin (agents, skills, hooks, launcher shims). |
packages/opencode-plugin | JS | OpenCode plugin shim. |
packages/installer | Shell/Inno | Native macOS and Windows installer sources. |
packages/brain | Python | The scoring service: GNN inference over a curator checkpoint, self-validating bundle, calibrated tau. Self-hostable. |
The training pipeline and the account platform are separate, closed
components. Everything here talks to them only over the contracts in
packages/contracts, and runs without them.
The proxy runs without any scoring service (no-reread hook, loop breaker,
savings ledger). Curation needs one, and you can run it yourself: it is
packages/brain, one Python process holding the curator checkpoint and the
bge-large encoder.
The released curator checkpoints live on the Hugging Face Hub at
huggingface.co/parsecai/curator.
Use curator_v7-9_10nn_prod.pt: it is self-contained and needs no neighbor
store at serve time. The model card lists the other checkpoint and its
calibration tables.
# 1. a curator checkpoint — fetched and cached via huggingface_hub, or a local path
pip install huggingface_hub
export PARSEC_CKPT=hf://parsecai/curator/curator_v7-9_10nn_prod.pt
# 2. the service (in-process bge-large; CPU works, a GPU is faster)
docker compose up -d # http://127.0.0.1:8090
# 3. point the proxy at it
export PARSEC_BRAIN_URL=http://127.0.0.1:8090
packages/brain/README.md has the bare-uvicorn form, the auth options, and
a Cloud Run recipe. A self-hosted brain is where the chunk text in "What
parsec sends" goes; with your own host, nothing leaves your infrastructure.
cargo build --release # engine, proxy (the `parsec` binary), mapgen
make check # fmt + clippy + tests, same flags CI runs
make plugin # build and install a local plugin binary for `claude --plugin-dir`
Rust 1.98 is pinned in rust-toolchain.toml. No model download, no network
needed for the Rust test suite. The scoring service's tests
(make brain-test) run their hermetic subset without a checkpoint. See
CONTRIBUTING.md for the dev loop.
These are what the test suite protects; see DIRECTION.md §8.
count_tokens
counterfactual, never a modeled baseline.MIT, see LICENSE. Third-party notices and trademark note in
THIRD_PARTY.md. Security reports: SECURITY.md.
11 commits
Rust
66.6%
Python
24.4%
Shell
3.1%
PowerShell
2.5%
Inno Setup
1.5%