v0.6 · DeepSeek V4 · cache-first

DeepSeek-native
AI coding agent in your terminal

Cache-first agent loop for DeepSeek V4 (flash + pro). Edits files as reviewable SEARCH/REPLACE blocks. Ink TUI. MCP first-class. No LangChain.

$ npx reasonix code
94.4%
prefix cache hit rate
~96%
cheaper vs Claude Sonnet 4.6
100%
τ-bench-lite pass rate

Why Reasonix

Every abstraction earns its weight against a DeepSeek-specific property — dirt-cheap tokens, R1 traces, automatic prefix caching, JSON mode. Generic wrappers leave these on the table.

Cache-first loop

Append-only conversation log keeps the prompt prefix byte-stable across turns, so DeepSeek's automatic cache hits 85–95% — not 40%.

¥

Cost is a pillar

Flash-first defaults, turn-end auto-compaction, model self-escalation when (and only when) needed. Per-turn cost badge in the TUI.

Ink TUI, no web

Lives in your terminal. Streaming preview, slash commands, plan picker, edit-confirm modal. Plain mode for stubborn Windows shells.

MCP first-class

Stdio + HTTP+SSE transports. Live progress notifications. Same cache-safety + repair plumbing as native tools.

Reviewable edits

Edits arrive as SEARCH/REPLACE blocks; nothing hits disk until /apply. Per-file diff confirm modal, undo history, sandboxed paths.

1M-token aware

Context gauge with proactive compaction, oversized tool-result repair, forced-summary fallback near the window edge.

Quick start (60 seconds)

  1. Get a DeepSeek API key

    Free credit on signup at platform.deepseek.com.

  2. Point it at a project

    No install needed.

    cd my-project
    npx reasonix code

    First run walks you through a 30-second wizard (paste API key → pick preset → pick MCP servers).

  3. Ask it to edit

    The model proposes edits as SEARCH/REPLACE blocks — nothing hits disk until you /apply.

Requires Node ≥ 20.10. macOS, Linux, Windows (PowerShell · Git Bash · Windows Terminal). Press Esc anytime to abort; /help for the full command list.

In the box

code Pair programmer mode

read_file · write_file · edit_file · search_files · directory_tree · run_command with read-only allowlist. Sandboxed to the launch root — no path escapes. Plan mode and per-edit review modal.

memory Two-layer memory

Committable REASONIX.md for team conventions plus a private per-user ~/.reasonix/memory/ with global and per-project scopes. The model can write to it via the remember tool.

skills User-authored prompt packs

Drop SKILL.md files anywhere. Names + descriptions are pinned in the prefix; the model picks them autonomously, or you trigger with /skill name.

hooks Lifecycle hooks

Shell commands fire at PreToolUse · PostToolUse · UserPromptSubmit · Stop. Exit code drives pass / block / warn.

mcp Bring your own tools

Wizard catalog, or --mcp "name=cmd" to attach stdio / HTTP+SSE servers on the fly. Live progress bars on long calls.

web Web search built-in

web_search + web_fetch via Mojeek — no key, no signup, off-by-flag for offline / CI. Bring-your-own provider via the WebSearchProvider interface.

Verify the cache claim yourself

On the same τ-bench-lite workload (8 multi-turn tool-use tasks × 3 repeats = 48 runs per side), live DeepSeek deepseek-chat, sole variable prefix stability:

metric baseline (cache-hostile) Reasonix delta
cache hit 46.6% 94.4% +47.7 pp
cost / task $0.002599 $0.001579 −39%
pass rate 96% (23/24) 100% (24/24)

Reproduce without spending an API credit:

git clone https://github.com/esengine/reasonix.git && cd reasonix && npm install
npx reasonix replay benchmarks/tau-bench/transcripts/t01_address_happy.reasonix.r1.jsonl
npx reasonix diff \
  benchmarks/tau-bench/transcripts/t01_address_happy.baseline.r1.jsonl \
  benchmarks/tau-bench/transcripts/t01_address_happy.reasonix.r1.jsonl

The committed JSONL transcripts carry per-turn usage, cost, and prefixHash. Reasonix's prefix hash stays byte-stable across every model call.

CLI at a glance

npx reasonix code [path]                 # coding mode scoped to path
npx reasonix                             # chat (uses saved config)
npx reasonix setup                       # reconfigure the wizard
npx reasonix run "ask anything"          # one-shot, streams to stdout
npx reasonix stats                       # cross-session cost dashboard
npx reasonix mcp inspect <spec>          # probe a single MCP server

Common flags:

--preset <fast|smart|max>   # model + harvest + branch bundle
--model <id>                # explicit DeepSeek model id
--mcp "name=cmd args…"      # attach an MCP server (repeatable)
--session <name>            # named session
--no-config                 # ignore ~/.reasonix/config.json (CI)

Ready to try?

One npx away. Sandboxed. Reviewable. 96% cheaper.