Reasonix: The DeepSeek-Native Coding Agent
AICodeKinggo watch the original →
the gist
Reasonix is a terminal-based coding agent designed specifically for DeepSeek's API, featuring prefix caching, tool-call repair, and a flash-first model strategy that is now officially documented by DeepSeek.
DeepSeek-Native Agent Architecture
Reasonix is an open-source, terminal-based coding agent engineered to interface directly with the DeepSeek API without translation shims or OpenAI-compatible adapters. Its design prioritizes DeepSeek-specific API behaviors, most notably through a cache-first loop that maintains prompt prefix stability. This approach maximizes the efficiency of DeepSeek's prefix caching, which significantly reduces token costs for long-running sessions. In one documented case, a session with 435 million input tokens achieved a 99.82% cache hit rate, reducing the total cost from approximately $61 to $12.
Operational Efficiency and Tooling
The agent implements a flash-first workflow, defaulting to DeepSeek V4 Flash for standard tasks while allowing users to toggle to DeepSeek V4 Pro for complex operations via command-line flags. To improve reliability, Reasonix includes a tool-call repair mechanism that intercepts and corrects malformed tool calls on the fly, preventing turn failures. The tool supports persistent per-workspace sessions, MCP (Model Context Protocol) integration, and a skill system that allows users to define markdown-based sub-agents.
Setup and Usage
Installation is designed for minimal friction, requiring only Node.js (version 20.10 or higher) and a DeepSeek API key. Users can execute the agent without a global installation using the following command:
npx reasonix code
Upon the first execution, a built-in configuration wizard prompts for the API key and stores it locally. For users preferring a persistent installation, the agent can be installed globally via npm install -g reasonix. The agent provides several operational modes, including /pro to switch to the Pro model for a single turn, /preset max to force the Pro model for an entire session, and /apply to review and approve search-and-replace file edits.