SuperAPI AI Directory

Reasonix - The Open-Source Terminal Coding Agent Built for DeepSeek

Author: AI小集 · Original source: AI工具集

What Is Reasonix

Reasonix is an open-source terminal coding agent built specifically for DeepSeek , designed around ByteDance's stable prefix-cache mechanism with an append-only run loop, achieving a 99.82% cache hit rate and reducing the input cost of long sessions to about 20%. Reasonix connects directly to the DeepSeek API, and through three pillars—fixed prefix, append-only logs, and tool-call repair with intelligent cost switching—it helps developers run coding tasks for extended periods at extremely low cost.

Reasonix

Reasonix's Main Features

  • Terminal Coding Agent: Connects directly to api.deepseek.com, supporting code editing, file system operations, Shell tool calls, and SEARCH/REPLACE review.
  • Cache-First Session Loop: Adopts an append-only run mode; old context stays fixed while new messages are only appended at the end, maximizing prefix-cache reuse.
  • Tool-Call Repair: 4 rounds of internal processing automatically repair common DeepSeek tool-call issues such as malformed JSON, misaligned parameters, duplicate call storms, and JSON truncation.
  • Intelligent Cost Control: Calls v4-flash by default; for difficult tasks, automatically or manually (/pro command) switches to v4-pro, and automatically compresses context at the end of a round.
  • Skill and Memory System: Supports writing Skills in Markdown format (inline or subagent modes), as well as prefix memory injection of users' private knowledge.
  • QQ Remote Channel: Can extend the current session into a QQ remote interaction channel, supporting remote access to Agent sessions from mobile devices.
  • Desktop Support: A Tauri-based native GUI client (pre-release version) with multiple tabs, displaying file reads/writes, cost, and cache metrics in real time.

Reasonix's Technical Principles

  • Cache-First Loop: Divides context into three regions: Immutable Prefix (system prompt + tool specifications + examples, fixed throughout the session), Append-Only Log (historical messages appended monotonically, preserving the prefixes of previous rounds), and Volatile Scratch (temporary drafts for the current round, not directly uploaded after reset). By ensuring that the exact byte prefix of each round's request matches that of previous requests, it activates DeepSeek's automatic prefix cache.
  • Tool-Call Repair: In response to issues DeepSeek commonly exhibits in tool calls, such as JSON generated internally but disappearing in the final message, malformed parameters, duplicate calls, and JSON truncation, it performs 4 rounds of repair processing before actually executing tools, ensuring stable and reliable tool calls.
  • Cost Control: A three-tier cost-reduction strategy: by default, prioritize the low-cost v4-flash; users can temporarily upgrade a single round to v4-pro via /pro , automatically falling back after completion; failure signals trigger automatic upgrades, and when the failure count reaches a warning threshold, the remaining portion automatically switches to v4-pro.

How to Use Reasonix

  • Environment Preparation: Ensure Node.js ≥ 22 is installed and obtain a DeepSeek API Key.
  • Installation and Startup: Global installation:npm install -g reasonix, then enter the project directory and run reasonix code; or run directly without installation:cd my-project && npx reasonix code。
  • Configure the Key: On first run, paste the DeepSeek API Key; it is automatically persisted and saved, so no repeated input is needed afterward.
  • Start a session: By default, enter code mode (includes filesystem and Shell tools); enter natural language instructions to start a programming task; if you need pure conversation, you can switch to reasonix chat。
  • Advanced operations: Use /pro to temporarily switch to v4-pro to handle difficult tasks; create custom skills via /skill new ; run reasonix doctor to check environment health status.

Reasonix's core advantages

  • Extreme cost savings: Measured at 435 million input tokens per day, with a 99.82% cache hit rate; the bill dropped from about $61 (no cache) to about $12 (v4-flash), and after stacking DeepSeek V4's permanent price reduction, the cost is extremely low.
  • DeepSeek native optimization: Every layer of abstraction is tuned based on DeepSeek's byte-stable prefix-cache mechanism, which generic frameworks cannot match.
  • Long-session stability: Designed specifically for long-running operation, it can "run continuously" without costs surging due to context expansion.
  • Terminal-first: No IDE integration required; relies on git diff and ls to manage changes, suitable for developers accustomed to command-line workflows.

Reasonix's project address

  • GitHub repository:https://github.com/esengine/DeepSeek-Reasonix

Comparison of Reasonix with similar competing products

Comparison dimension Reasonix Claude Code
Positioning DeepSeek native terminal programming Agent Anthropic general-purpose terminal programming Agent
Backend model DeepSeek exclusive (V4 series) Claude series (Sonnet/Opus, etc.)
Open-source license MIT open source Closed source
Cost strategy Cache-first, 99.82% hit rate, about 20% of the cost Pay-as-you-go, no cache optimization mechanism
Cache mechanism Natively engineered byte-level prefix-cache Not applicable (Anthropic does not have this mechanism)
Runtime environment Terminal-first + Tauri desktop client (pre-release) Terminal-exclusive
Long-session cost Extremely low; can run unattended for long periods Grows linearly with context; relatively high
Tool call repair 4 rounds of automatic repair for malformed JSON/truncation/duplicate calls Basic tool calls, no dedicated repair
Model switching Automatic/manual switching between flash ↔ pro Manual model version selection
Skill system Markdown Skill + Claude format compatibility Built-in skills, external import not supported
MCP support Supported Supported
Memory system Multi-type memory prefix injection for user/project/feedback Basic contextual memory
Remote channel Supports QQ channel remote access Not supported

Reasonix's application scenarios

  • Long-duration programming tasks: Code refactoring, batch modifications, and large project maintenance that require the Agent to run continuously for hours or even days.
  • High-frequency API call scenarios: Programming assistance requiring a large number of interactions with DeepSeek in automation scripts and CI/CD pipelines.
  • Cost-sensitive development: Individual developers and startup teams hope to further squeeze token costs on top of DeepSeek V4's low price.
  • Remote collaboration: Enable mobile users to remotely issue commands to a running Agent and receive results through the QQ channel.