# Reasonix | Artificialus

> For the complete content index, see [llms.txt](https://artificialus.com/llms.txt). Markdown versions of all pages are available by appending `.md` to any URL.

- Home
- /
- Agents
- /
- Reasonix

RE

# Reasonix

The DeepSeek-native coding agent engineered for maximum prefix-cache efficiency — 99.82% hit rates, 80% cost savings.

esengine

Open source

Since 2026

Visit Website

Repository

Docs

Download

Share

X

Facebook

Reddit

Telegram

Bluesky

Email

Terminal-native AI coding agent built specifically for DeepSeek's API. Engineered for prefix-cache stability, it achieves 99.82% cache hit rates — cutting large-session costs from ~$61 to ~$12 while delivering a full TUI with file editing, shell access, MCP integration, and plan mode.

##
+

Pros
- Cache-first loop architecture engineered specifically for DeepSeek's prefix caching — achieves 99.82% cache hit rates in real-world usage
- 80% cost reduction on large sessions (~$61 to ~$12 for 435M tokens on v4-flash) through deliberate cache optimization
- Automatic tool-call repair handles DeepSeek-specific failure modes (malformed JSON, missed tool calls, truncation) without user intervention
- Cost-control presets let you trade model tier for cost with auto-escalation on hard turns — no silent budget surprises
- Full TUI with file editing, shell access, MCP integration, plan mode, skills, memory, and per-workspace session persistence
- Parallel tool dispatch groups safe calls and races them via Promise.allSettled — file reads, searches, and lookups run concurrently

##
−

Cons
- DeepSeek-only — no multi-provider flexibility; cannot use with OpenAI, Anthropic, or local models
- Requires Node ≥ 22 and pulls in a non-trivial dependency tree; no single static binary option
- Needs a paid DeepSeek API key to operate — not usable with free or local inference
- No IDE integration — terminal-first design means no VSCode or JetBrains plugin
- Claude Opus still outperforms DeepSeek on the hardest reasoning benchmarks; not ideal for PhD-level analytical work

##

Pricing

### Free

$0

MIT-licensed open source CLI agent. All features included. Requires a paid DeepSeek API key for token usage.

## Introduction

Reasonix is an open-source (MIT), terminal-native AI coding agent purpose-built for DeepSeek’s API. Unlike generic agent frameworks that happen to support DeepSeek , Reasonix treats DeepSeek’s prefix-caching mechanics as a first-class engineering constraint that shapes every architectural decision. This approach makes it the most cost-effective coding agent available for the DeepSeek ecosystem — real-world usage shows 99.82% cache hit rates, reducing a 435M-token session from ~$61 to ~$12.

Installed via a single `npm` command, Reasonix provides a full terminal UI with file editing, shell access, MCP tool integration, plan mode, a skills/memory system, and per-workspace session persistence. It runs on macOS, Linux, and Windows with Node ≥ 22.

## Key Features
- Cache-first loop — Context is partitioned into an immutable prefix (cached for the session), an append-only log (preserves prefix stability), and volatile scratch (reset each turn). The prefix is pinned once per session with no dynamic injection.
- 99.82% cache hit rate — Documented real-world data from a full day of coding on May 1, 2026: 435M input tokens at ~$12 on v4-flash versus ~$61 without cache optimization.
Tool-call repair engine — Automatically handles DeepSeek -specific failure modes: flattens deep schemas, scavenges tool calls from reasoning content, repairs truncated JSON, and suppresses duplicate tool calls.
- Cost-control presets — Three modes (`flash`, `auto`, `pro`) with turn-end auto-compaction, `/pro` single-turn arming, and failure-signal auto-escalation to v4-pro.
- Parallel tool dispatch — Tools declare `parallelSafe: boolean`; safe calls run concurrently via `Promise.allSettled` while mutating edits remain serial.
Full TUI —
Ink
-based terminal interface with file editing, shell commands, MCP integrations, plan mode, and a companion web dashboard.
- Skills and memory — Per-workspace session persistence, user-defined skills, hook system, permission management, and web search capability.
- Subcommands — `reasonix code` (default coding agent), `reasonix chat` (plain chat), `reasonix run` (one-shot), `reasonix doctor` (health check).

## Architecture: The Three Pillars

Reasonix’s architecture rests on three design pillars, each solving a failure mode that generic agent frameworks don’t address.

### Pillar 1: Cache-First Loop

DeepSeek’s automatic prefix caching activates only when the exact byte prefix of a request matches the previous one. Most agent loops are cache-hostile — they inject timestamps, reorder tool histories, rewrite context, or mutate session state mid-conversation, invalidating the cache prefix.

Reasonix partitions the context into three regions:

```
`┌─────────────────────────────────────────────────────┐
│ IMMUTABLE PREFIX │ ← fixed for session
│ system + tool_specs + few_shots │ cache hit candidate
├─────────────────────────────────────────────────────┤
│ APPEND-ONLY LOG │ ← grows monotonically
│ [assistant₁][tool₁][assistant₂]... │ preserves prefix of prior turns
├─────────────────────────────────────────────────────┤
│ VOLATILE SCRATCH │ ← reset each turn
│ R1 thought, transient plan state │ never sent upstream
└─────────────────────────────────────────────────────┘`
```

> Three invariants maintain cache stability: the prefix is computed once and pinned for the session, log entries are strictly append-only, and volatile reasoning state lives outside the cached prefix entirely.

### Pillar 2: Tool-Call Repair

DeepSeek models occasionally emit malformed structured tool calls — deeply nested schemas, tool calls embedded in reasoning content, truncated JSON, or duplicate invocations. Reasonix handles them through four mechanisms:
- flatten — Schemas with >10 leaf parameters or depth >2 are auto-detected and presented in dot-notation; args are re-nested before execution.
- scavenge — Regex + JSON parser sweeps the model’s reasoning content for tool calls not emitted in the structured `tool_calls` field.
- truncation — Detects unbalanced JSON and either closes braces or requests a continuation completion.
- storm — Duplicate `(tool, args)` tuples within a sliding window are suppressed; the model gets a reflection turn instead of repeating itself.

### Pillar 3: Cost Control

Three presets let users trade model tier for cost:

Preset

Model

Relative Cost

`flash`

v4-flash

1x

`auto` (default)

v4-flash → v4-pro on hard turns

1-3x

`pro`

v4-pro

~12x

Three mechanisms enforce cost discipline: turn-end auto-compaction shrinks tool results exceeding 3000 tokens, `/pro` arms a single v4-pro turn then auto-disarms, and failure-signal auto-escalation promotes hard turns to v4-pro with a visible warning.

## Installation & Setup

Requirements: Node.js ≥ 22, a paid DeepSeek API key.

```
`npm install -g reasonix`
```

Or run directly without installing:

```
`npx reasonix code`
```

On first run, Reasonix prompts for your DeepSeek API key and stores it locally. The tool is also available via the `dsnix` alias and runs on macOS, Linux, and Windows.

## Commands & Usage

Command

Description

`reasonix code [dir]`

Default coding agent mode — full TUI with file editing, shell, MCP

`reasonix chat`

Plain chat mode without coding tooling

`reasonix run <cmd>`

One-shot execution for quick prompts

`reasonix doctor`

Health check — verifies API key, Node version, and dependencies

Inside the TUI, users can switch cost presets with `/flash`, `/auto`, and `/pro` commands, access plan mode, manage skills and memory, and monitor real-time token and cost meters.

## How It Compares

Reasonix

Claude Code

Cursor

Aider

Backend

DeepSeek only

Anthropic

OpenAI / Anthropic

Any (OpenRouter)

License

MIT

Closed

Closed

Apache 2

Cost profile

Low per task

Premium

Subscription + usage

Varies

DeepSeek prefix-cache

Engineered

N/A

N/A

Incidental

MCP support

Yes

Yes

Yes

Partial

Plan mode

Yes

Yes

Yes

No

Skills / Memory

Yes

Yes

N/A

No

Web dashboard

Yes

No

N/A

No

Per-workspace sessions

Yes

Partial

N/A

No

The engineered prefix-cache support is what sets Reasonix apart. Aider supports DeepSeek (native API or OpenRouter) but its loop isn’t designed for prefix stability. Claude Code is DeepSeek-compatible via API proxy but optimized for Anthropic’s models. Cursor is a full IDE — a different category entirely.

## Use Cases
- Cost-conscious DeepSeek users — Developers already on DeepSeek who want to maximize every API dollar through deliberate cache optimization.
- Large-session workflows — Long coding sessions with hundreds of turns where generic clients bleed budget on cache misses.
- Terminal-first developers — Engineers who prefer a CLI/TUI workflow over IDE plugins and want a full-featured coding agent without leaving the terminal.
- Teams evaluating DeepSeek — Organizations assessing DeepSeek as a primary coding model, using Reasonix as the reference agent harness.
- MCP-heavy workflows — Developers using Model Context Protocol servers who want tight integration with file editing, shell access, and web search.

## Community

Reasonix is developed by esengine, a community project not affiliated with DeepSeek. The repository has accumulated ~6,500 GitHub stars, 1,338 commits, and 30+ contributors under the MIT license. The project reached #2 on Hacker News ’s front page with 324 points. Community engagement happens primarily through GitHub issues and a bilingual (English/Chinese) Discord server.

## Further Reading
- Reasonix GitHub Repository — Source code, releases, and community discussions
- Official Documentation & Architecture — CLI reference, configuration guide, and three-pillars architecture
- npm Package — Install Reasonix via npm
- Hacker News Discussion — Community discussion (324 points, #2 on front page)

## Conclusion

Reasonix fills a specific niche: the most cost-effective coding agent for DeepSeek’s API, built from the ground up around the provider’s caching mechanics. The cache-first loop delivers real-world savings that generic frameworks can’t match — 99.82% cache hit rates and 80% cost reduction are not theoretical benchmarks but reproducible outcomes of deliberate architecture. For developers committed to DeepSeek or evaluating it as a primary model, Reasonix is the current benchmark in DeepSeek-native agent design.

## Version History

desktop-v0.50.0
May 24, 2026
Desktop client (Tauri, prerelease), enhanced MCP support, web dashboard improvements

v0.6.0
Apr 24, 2026
Cost control presets (flash/auto/pro), turn-end auto-compaction, /pro single-turn arming, failure-signal auto-escalation

v0.5.24
Apr 24, 2026
MCP support improvements, plan mode refinements, bug fixes and stability enhancements

v0.1.0
Apr 21, 2026
Initial public release — terminal coding agent with DeepSeek API support, basic TUI, file editing and shell access

Best for DeepSeek API users who want the most cost-effective terminal-native coding agent with engineered prompt caching

Capability Cache-first loop architecture · 99.82% cache hit rate · Tool-call repair engine · Cost-control presets (flash/auto/pro) · Parallel tool dispatch

Runs on CLI · TUI · npm package

Signature Snippet

Copy

```
`npm install -g reasonix
reasonix code my-project

# Or run without installing:
npx reasonix code

# Subcommands:
reasonix chat # Plain chat mode
reasonix run <cmd> # One-shot execution
reasonix doctor # Health check`
```

## More in this Space

SO

### Sourcery

Closed source

AI code review platform for the AI era. Automated code reviews, security scanning, and team analytics across GitHub, GitLab, VS Code, and JetBrains. Used by 300,000+ developers.

View profile

WT

### What The Diff

Closed source

AI-powered PR description generator and code review assistant. Automatically writes pull request descriptions, sends stakeholder notifications, creates changelogs, and provides inline code refactoring.

View profile

BA

### Blackbox AI

Closed source

Multi-agent AI coding platform with 12+ agents and 24+ models, featuring Chairman LLM for parallel multi-agent evaluation and end-to-end encrypted inference. Ships across six surfaces: CLI, IDE, Cloud, API, Mobile, and Builder.

View profile