deepx-code
A DeepSeek-native terminal coding agent in a single Go binary, with a built-in code graph, local OCR and cache-friendly routing that cuts token spend at the root.
Evidence shows sandboxing (Seatbelt/bubblewrap/docker), a read-only plan mode, review mode requiring human confirmation for writes/shell by default, and workflow run confirmation — least_privilege and user_confirmation reach ordinary-use adequacy (2 each). Deductions: API keys stored in plaintext at ~/.deepx/model.yaml and session history written in plaintext with no encryption or permission guidance (sensitive_data_handling 1); dependencies pinned in go.mod but with no vulnerability-audit/SCA policy and several obscure deps (gotreesitter, up-zero/gotool) (dependency_security 1); first run auto-downloads a 118MB embedding model plus 37MB OCR model from third-party mirrors, curl|bash install, and a plain-HTTP web dashboard that can bind 0.0.0.0 (external_effects 1); only upgrade is documented, no downgrade/rollback path (rollback 1); empty author in package., unverified publisher, LICENSE copyright year 2026 (source_attribution 1). The architecture diagram and routing rules are openly documented, so data_flow_transparency gets 2.
README and code structure are broadly consistent, but package. contradicts it: license ISC vs MIT, a corrupted HTML-fragment description, version 1.0.0 with no matching CHANGELOG — self_consistency drops to 1. dependency_availability 2: embedding model downloads fall back ModelScope→hf-mirror→HuggingFace, failure degrades gracefully to all-flash without blocking startup; corrupt gob falls back to JSONL. failure_messages 2: failure paths (download failure, sandbox fallback to soft blacklist where no OS mechanism exists) are explicitly described.
audience_and_scenarios 3: covers interactive TUI, non-interactive exec for scripts/CI/cron, multilingual UI, multi-provider (DeepSeek/MiMo/Kimi/Qwen/custom) with concrete scenario narration. capability_boundaries 2: documents MiMo reasoning-field incompatibility handling, routing only after model readiness, Go-only precision for codegraph; but no failure-rate data on overall capability ceilings. trigger_precision 3: routing thresholds (>500 chars, 0.91 similarity), two pattern sets, and six tuning commands are specified reproducibly. environment_fit 2: three platforms covered, but sandbox degrades to a soft blacklist on platforms without OS mechanisms, materially weakening the safety boundary.
information_architecture 3: README is well structured (install/config/how-it-works/tool table/command table) with layered architecture diagrams. install_notes 3: shell refresh, Gitee mirror, and manual config all documented. known_limitations 2: web-dashboard HTTP risk and router false-positive examples ('one too-broad pattern rescued 2 cases and broke 2 others') are stated. license 2: MIT text complete but the 2026 copyright year is suspect, and package. declares ISC, conflicting. versioning_changelog 1: only a goreleaser auto-changelog pipeline; no CHANGELOG in evidence and package. versioning is disconnected from releases. maintenance_responsibility 2: CI mirror and release pipelines plus an upgrade command exist, but no maintainer commitment or response mechanism.
output_usability 2: exec mode prints clean stdout, codegraph results carry file:line and signatures with pagination — all described but unverified. marginal_value 2: symbol-level codegraph, offline OCR, and zero-token local routing are genuine differentiators; the vs-Claude-Code table honestly notes model quality is outside the trade-off. cost_benefit 3: the design around DeepSeek prefix caching (monotonic SwitchModel, transparent system-prompt replacement to keep the cache prefix, 70%-threshold layered compaction) is the best-evidenced cost argument in the source.
claim_traceability 1: the headline '~99% cache hit (measured)' cites a single session (41,472/41,591 tokens) with no methodology, sample size, or reproduction steps; routing accuracy and codegraph precision have no reproducible benchmarks. cross_source_corroboration 1: no test directory or test output appears in the evidence, so README assertions cannot be corroborated; package. explicitly reports 'no test specified'. fact_inference_separation 2: partially done well (items marked 'measured', trade-off NOTEs separating model quality from tool value), but many numbers lack sourced measurement.
- API keys are stored in plaintext at ~/.deepx/model.yaml and session history is written in plaintext; secure directory permissions and avoid shared environments.
- The web dashboard uses plain HTTP; bound to 0.0.0.0 it allows session control and command execution over the LAN with a fixed token — trusted networks only.
- curl|bash install and first-run auto-download of models from third-party mirrors (ModelScope/hf-mirror/HuggingFace) require your own supply-chain trust assessment.
- On platforms without OS sandbox mechanisms, isolation degrades to a soft blacklist — use auto mode with caution.
- The headline claim (~99% cache hit) rests on one session's numbers with no methodology; do not treat it as procurement-grade evidence.
- No tests appear in the evidence; package. declares ISC conflicting with MIT and the 2026 copyright year is anomalous — verify independently before use.
What does this agent do, and when should you use it?
deepx-code is a terminal coding agent distributed as a single Go binary, designed around DeepSeek's prefix cache with a measured ~99% prompt-cache hit rate on long sessions. It ships a built-in codegraph for symbol-level navigation (go-to-definition, callers, interface implementers, impact analysis, with Go parsed precisely via go/types) and local offline image OCR via PaddleOCR, so no multimodal API is needed. Its execution model routes each turn locally between flash and pro models with zero LLM-token overhead, and supports sequential Todos, concurrent plan DAGs with sub-agents, and reusable JS-scripted multi-agent workflows (generated via /ultracode, run via /workflow, compatible with Claude Code's workflow script conventions). Sessions are losslessly persisted as gob binaries with automatic tiered compression when the context window fills; file writes and shell commands require human confirmation by default, with OS-level sandboxing on macOS (Seatbelt) and Linux (bubblewrap). It natively supports MCP and Claude-compatible skill directories, and comes preconfigured for DeepSeek, Xiaomi MiMo, Kimi and Qwen, plus any custom OpenAI-compatible model.
deepx reads your message in a terminal TUI, picks the starting model via local semantic routing (multilingual-e5-small sentence embeddings; messages over 500 characters or ≥0.91 similarity to the upgrade-pro exemplar set start on pro, otherwise flash), then enters the StartStream tool loop. The model can call read-only tools (Read/List/Tree/Glob/Grep), CodeGraph (12 ops including def, refs, callers, implementers, impact), OCR (offline PaddleOCR PP-OCRv5), Search/Fetch, Memory, LoadSkill, and write operations (Write/Update/Bash) that require a manual YES/NO in review mode. Multi-step tasks run as a visible Todo checklist; independently parallelizable work is decomposed by CreatePlan into a DAG of concurrent sub-agents, each independently on flash or pro, then merged. Sessions are written to ~/.deepx/sessions/<workspace-hash>/ as history.gob (full tool_calls and reasoning_content, seamless resume) plus JSONL text logs; compression triggers automatically at 70% of the context window. deepx exec "task" offers a non-interactive mode that prints results to stdout for pipes, scripts and cron.
- Cost-sensitive developers who work in a terminal with DeepSeek and want ~99% cache hits and zero-token local routing instead of paying for repeated context
- Engineers doing impact analysis in large Go/TS/Python codebases — CodeGraph's callers/implementers/impact replace repo-wide grep
- Users who need an agent to read error screenshots or UI mockups without a multimodal API budget — local PaddleOCR reads text offline
- Teams embedding one-shot coding tasks in scripts, CI or cron —
deepx execoutputs to stdout and supports piping - Groups with repeatable multi-agent flows (multi-perspective review, fan-out research) — JS workflow scripts are compatible with Claude Code's script convention
- Security-conscious users — review mode confirms writes/shell, with optional Seatbelt/bubblewrap/Docker sandboxing
What are this agent's strengths and limitations?
- Single Go binary with no Node/Python runtime, one-line install across macOS/Linux/Windows — near-zero deployment friction
- Designed around DeepSeek's prefix cache with a measured ~99% hit rate, plus zero-token local routing; long-session cost is a genuine differentiator
- Built-in symbol-level codegraph and local offline PaddleOCR — capabilities rarely native in comparable terminal agents
- Compatible with Claude's skill directories and workflow script conventions, easing ecosystem migration; native MCP support
- The cost advantage is tightly coupled to DeepSeek's prefix-cache pricing; switching models forfeits the guaranteed hit-rate and pricing benefit
- Auto routing and OCR depend on models downloaded in the background on first launch (multilingual-e5-small 118MB, OCR model ~37MB + ONNX Runtime); failed downloads degrade routing to always-flash
- The web panel is plain HTTP, can control sessions and execute commands, and per the README should only be exposed on a trusted LAN — a real security consideration
- Routing relies on exemplar-sentence similarity (36 upgrade-pro, 22 keep-flash patterns) and can misfire on atypical phrasing, requiring manual tuning via router.yaml
- The project is young with no independent evaluation evidence beyond the README; the closed-source competitor's model quality is out of its comparison scope
How do you install or deploy this agent?
macOS / Linux:
bash
curl -fsSL https://raw.githubusercontent.com/itmisx/deepx-code/main/scripts/install.sh | bash && exec $SHELLInstalls to ~/.local/bin/deepx; upgrade later with deepx upgrade.
Windows (PowerShell):
powershell
irm https://raw.githubusercontent.com/itmisx/deepx-code/main/scripts/install.ps1 | iexUsers in China can use the Gitee mirror (macOS/Linux):
bash
curl -fsSL https://gitee.com/itmisx/deepx-code/raw/main/scripts/install.sh | SOURCE=gitee bash && exec $SHELLPrerequisite: an API key for your chosen provider (DeepSeek / Xiaomi MiMo / Kimi / Qwen).
How do you use this agent?
- In a terminal,
cdinto your project directory and rundeepxto enter the interactive TUI. - On first launch, a setup wizard appears: pick a provider with ←/→ (DeepSeek / Xiaomi MiMo / Kimi / Qwen), enter the API key — saved to ~/.deepx/model.yaml; reconfigure with
/config, switch configured providers with/provider. - Switch read-only/full-auto/review modes with
/plan/auto/review; lock the model with/model flash|proor leave/auto(default) for local routing. - Type
@for a fuzzy path picker to reference files/directories;/sandboxconfigures sandboxing (native/docker/off);/working-modeselects karpathy/openspec/superpowers. - Non-interactive:
deepx exec "task"prints the result to stdout and supports piping, e.g.cat error.log | deepx exec "analyze this error".
How does this agent compare with similar options?
The README explicitly compares itself to Claude Code: distribution is a Go single binary (Claude Code is npm/Node); open source under MIT (Claude Code is closed); models are DeepSeek/Xiaomi MiMo and other OpenAI-compatible providers (Claude Code is bound to Anthropic Claude); cost relies on ~99% cache hits; and it uniquely bundles a built-in codegraph and local offline OCR (Claude Code relies on grep and cloud multimodal). The README notes this table does not compare model quality itself — deepx-code's trade-offs are cost, open source, single binary, code graph and offline OCR.
FAQ
How much does it actually save on long sessions?
Is it safe to let it write files and run commands?
Am I locked to DeepSeek?
Do OCR and auto-routing need network access?
Can I use it in CI or scripts?
deepx exec "task" runs non-interactively, prints results to stdout, and supports piped input and output redirection; you must first configure the API key via the interactive TUI.