Content
# Xenon
**Empowering developers to enjoy the ultimate cost-effectiveness of DeepSeek at zero cost.**
[]()
[]()
[]()
[](https://github.com/xianyu-sheng/Xenon/releases)
[](docs/deepseek-guide.md)
[](docs/ARCHITECTURE.md)
---
## 🏛️ Three Core Pillars
> Not just another agent wrapper. Every abstraction is justified by actual cache economic benefits or tool execution reliability.
> 📐 Complete design philosophy, directory structure, and comparison with Reasonix see **[Architecture Design Document →](docs/ARCHITECTURE.md)**
### Pillar 1 · Cache-Aware Cost Loop
*Cache-aware cost loop. All local computation, zero extra LLM consumption.*
DeepSeek context cache hit/miss price difference is as high as **120 times**. Xenon has built-in three-layer monitoring, making cache benefits **visible, quantifiable, and optimizable**.
```
L1 · StatusBar 💾96% 💰$<0.01 💡92% Millisecond-level refresh for each API call
L2 · /cost Split hit/miss token + cost breakdown + savings by model
L3 · Exit report Automatic total bill printing upon exit
```
SHA256 deduplication + hard-coded pricing table + PromptOptimizer automatic prefix matching window alignment.
📖 **[DeepSeek Cache Best Practices Guide →](docs/deepseek-guide.md)** · 📐 **[Architecture §Pillar 1 →](docs/ARCHITECTURE.md#-pillar-1--cache-aware-cost-loop)**
---
### Pillar 2 · 8-Engine Auto-Router
*Not about replacing models, but about using the most suitable engine.*
| Engine | Scenario |
|------|------|
| **direct** | Pure dialogue |
| **react** | Multi-step reasoning + tool invocation (default complex engine) |
| **plan-execute** | Plan DAG → topological parallel execution |
| **reflection** | Executor + independent reviewer dual-model |
| **novel** | Outline → chapter, long text generation |
| **plan-react · plan-reflection · react-reflection** | Combined engines |
Input file path/GitHub URL automatically switches to ReAct; LLM output tool JSON automatically detects retries.
📐 **[Architecture §Pillar 2 →](docs/ARCHITECTURE.md#-pillar-2--8-engine-auto-router)**
---
### Pillar 3 · 7-Stage Tool Pipeline
*26 tools unified execution pipeline.*
```
Existence verification → parameter standardization → hallucination detection → permission gate → circuit breaker → execution → result encapsulation
```
Each tool failure returns a structured `{success, error}`, circuit breaker prevents infinite retries, SSRF/command injection/path boundary interception.
📐 **[Architecture §Pillar 3 →](docs/ARCHITECTURE.md#-pillar-3--7-stage-tool-pipeline)**
---
## 📸 Demo

*Seven-step closed loop: startup animation → first conversation → `/cost` → second conversation hit rate soars → `/cost` → `/vision` visual mode → exit savings report*
---
## ⚡ Get Started in 30 Seconds
```bash
pip install xenon # or pipx install xenon
xenon # Start REPL, Xenon orbital animation logo ✦
> /setup # Configure API Key
> /model deepseek-v4-pro
> Hello # Start conversation
```
Bottom toolbar displays real-time cache hit rate. `/cost` shows complete bill. `Ctrl+Alt+V` paste image for DeepSeek inference.
---
## 🎯 Full Capabilities
| Category | Content |
|------|------|
| **Inference Paradigms** | 8 types (direct · react · plan-execute · reflection · novel + 4 combinations) |
| **Model Providers** | 12 providers · 3-tier grading · automatic failover |
| **MCP Ecosystem** | Smithery 7000+ servers · dual transmission · lazy loading · `/mcp browse` one-click installation |
| **DeepSeek Cache** | toolbar real-time + `/cost` panel + exit report + hit rate drop alert |
| **Visual Bridging** | `Ctrl+Alt+V` paste → multimodal transcription → DeepSeek inference · SHA256 deduplication |
| **Engineering Reliability** | circuit breaker · three-stage budget · hole detection · 6-step context compression |
| **REPL Experience** | prompt_toolkit completion · Rich rendering · slash commands · visual hierarchy · bright anchors |
---
## 🆚 One-Sentence Difference
Xenon is not an IDE replacement – it's a **deep control panel**. You still write code in VSCode/JetBrains, and Xenon precisely controls models, paradigms, and costs in the terminal.
| Unique Capability | Xenon | Others |
|----------|:-----:|:--------:|
| Multi-paradigm engines (8 types) | ✅ | ❌ |
| DeepSeek cache tracking | ✅ | ❌ |
| Visual bridging (any model combination) | ✅ | ❌ |
| Tool circuit breaker + three-stage budget | ✅ | ❌ |
| MCP registry (7000+) | ✅ | only Claude Code |
| 12 model providers · failover | ✅ | partial |
---
## 📖 Further Reading
| Document | Content |
|------|------|
| **[Architecture Design](docs/ARCHITECTURE.md)** | Three pillars detailed · unique highlights · directory structure · design principles · vs Reasonix |
| **[DeepSeek Cache Practice](docs/deepseek-guide.md)** | Principles → alignment strategies → three-layer monitoring → cost comparison → drop diagnosis |
---
## Installation · Commands · Tests
```bash
git clone https://github.com/xianyu-sheng/Xenon.git && cd xenon
pip install -e ".[dev]"
```
| Common Commands | |
|----------|--|
| `/setup` `/model <n>` `/models` | Configuration and model management |
| `/mode [name]` `Shift+Tab` | Paradigm switching |
| `/cost` `/vision on\|off` | Cost tracking · visual mode |
| `/mcp browse` `/mcp install` | MCP ecosystem |
| `/save` `/load` `/resume` `/clear` | Session management |
```bash
pytest tests/ -q # 131 unit tests
```
---
MIT · [xianyu-sheng/Xenon](https://github.com/xianyu-sheng/Xenon) · Credits: [Rich](https://github.com/Textualize/rich) · [prompt_toolkit](https://github.com/prompt-toolkit/python-prompt-toolkit) · [Smithery](https://smithery.ai)
Connection Info
You Might Also Like
No recommendations available