DeepSeek-Reasonix provides a terminal interface for an AI coding agent built around DeepSeek models. The tool maintains prefix-cache stability across sessions, which reduces token costs for prolonged use. Developers run it in the terminal, where it suggests code edits as SEARCH/REPLACE operations. Changes apply to disk only after a manual /apply command.

This design addresses high costs in AI coding sessions without stable caching. Standard agents reset context frequently, leading to repeated token processing. DeepSeek-Reasonix enforces cache invariance through its loop—every component tunes prompts and state to preserve cacheable bytes. A benchmark from one user's day shows 435 million input tokens with 99.82% cache hit rate on DeepSeek v4-flash, costing about $12 versus $61 without caching.

Core features

The agent operates in code mode, displaying proposed edits without immediate file changes. Key elements include:

  • Prefix-cache loop: Four mechanisms in the architecture (detailed in docs/ARCHITECTURE.md#pillar-1--cache-first-loop) ensure stability. This works only with DeepSeek models due to their byte-stable caching.
  • Web tools: Built-in web_search and web_fetch. Defaults to Mojeek, a search engine needing no setup.
  • Configurable search: Switch engines via /search-engine (or /se), which updates ~/.reasonix/config.json. Options include Mojeek or self-hosted SearXNG at a custom endpoint.
  • Persistent state: Config survives restarts. Cache hit rates stay high over long runs, as shown in benchmarks/real-world-cache/README.md.
  • Slash commands: Quick actions like engine switches take effect immediately on next tool use.

Badges on the README confirm npm availability, Node.js compatibility (version from package.json badge), and active CI workflows.

Getting it running

Install via npm as the reasonix package:

npm install -g reasonix

Run with reasonix in your terminal. It connects to a DeepSeek API endpoint—set your key via environment variable or config. The tool creates ~/.reasonix/ for state and config files.

For web search with SearXNG, start a container. The README provides a Podman example (adapt for Docker):

podman run -d --replace --name searxng -p 8080:8080 docker.io/searxng/searxng

Switch to it:

/search-engine searxng http://localhost:8080

This writes to ~/.reasonix/config.json:

{
  "webSearchEngine": "searxng",
  "webSearchEndpoint": "http://localhost:8080"
}

No restart required. Mojeek works out of the box as default. Check docs/ARCHITECTURE.md for model setup details.

Who this is for

Terminal-focused developers handling long coding sessions benefit most. It suits users with DeepSeek API access who prioritize cost efficiency—cache hits directly lower bills on high-volume tasks. A single-day case study processed 435 million tokens at near-peak efficiency.

Those building or debugging codebases in a REPL-like flow find the SEARCH/REPLACE preview useful. It avoids accidental overwrites. Self-hosters pair it with SearXNG for privacy-focused search aggregation.

If you run extended agent sessions (hours or days), the leave-it-running design fits. It's TypeScript-based (734 GitHub stars), so Node.js users integrate it easily into workflows.

Comparisons to similar tools

Reasonix sticks to DeepSeek models for its cache mechanics, unlike general-purpose agents supporting multiple providers. Tools like Aider or Continue.dev handle edits in terminals but lack this prefix-cache focus, potentially incurring higher costs on long runs.

For search, default Mojeek avoids dependencies versus agents relying on paid APIs like Tavily. Self-hosted SearXNG offers control similar to metasearch setups in other OSS agents, but persists via simple slash commands.

Benchmarks folder provides data against non-cached DeepSeek runs. With 99.82% hits, it outperforms baseline v4-flash costs by 80% in the logged case.

Resource links

The GitHub repo at https://github.com/esengine/DeepSeek-Reasonix includes README.zh-CN.md, ARCHITECTURE.md, and benchmarks. Visit the website at https://esengine.github.io/DeepSeek-Reasonix/ for demos. NPM downloads and discussions appear active per badges.

Non-DeepSeek users or those preferring web UIs skip this—cache stability ties it to specific models. Node.js required (check badge for minimum version).