开源的 AI Agent 问题诊断知识库 / Open-source diagnostic intelligence for AI agents
Project description
🩺 CyberHuaTuo / 赛博华佗
The open-source AI clinic — Diagnose, Nourish, Fortify.
开源 AI 诊所 — 治病 · 养生 · 强体。
Your AI is sick? Walk in. We'll take it from here.
Not just fixing bugs — we prevent them.
|
⚡ 不放弃任何一个 AI No AI Left Behind |
🚨 雨夜急救 Emergency Rescue |
|
🫀 开膛手术 Open Surgery |
🏥 康复病房 Recovery Ward |
🎨 All artwork AI-generated · 所有画作均由 AI 文生图创作
🔮 Enter the Qimen Dunjia Formation → 进入奇门遁甲 · 药方天阵
🏥 Emergency Room • 🌿 Wellness Clinic • 🤖 GitHub Bot • 🦠 Epidemic • 🔌 MCP • 🎒 Skills • Why Us • Quick Start • Join • The Name
🏥 Three Departments, One Clinic
A great doctor doesn't wait for you to collapse — they keep you from falling in the first place.
大医治未病。
🚨 Emergency Room急诊科 Paste your error. Get a cure. In seconds, not hours. AI diagnosis powered by 2,000 years of medical wisdom. |
🌿 Wellness Clinic养生堂 Security audit. Health scoring. Prevent before it breaks. Nourishing prescriptions for your AI's long-term health. |
💊 Pharmacy药房 Browse the prescription library. Find proven cures & nourishing recipes. All prescriptions, one counter. Community-verified remedies from the AI ecosystem's front lines. |
🚨 Emergency Room — Diagnose in Seconds
# Clone → Install → Run. Three steps to your first cure.
git clone https://github.com/JinNing6/CyberHuaTuo.git
cd CyberHuaTuo && pip install -r requirements.txt
python -m cyberhuatuo serve
# → Browser opens http://127.0.0.1:8000
Paste your error. Watch the ancient four-step diagnosis unfold:
🔍 望 (Look) → Detected: LangChain 0.3, Python 3.11, ImportError
🩺 闻 (Listen) → Matched: Breaking change — package split in 0.2+
💬 问 (Ask) → No further questions needed
💊 切 (Diagnose) → Prescription #1 (95% cure rate):
pip install langchain-openai
from langchain_openai import ChatOpenAI # ✅ Fixed
Root cause: LangChain 0.2 split into langchain-core,
langchain-community, and langchain-openai.
The old import path no longer exists.
3 seconds. Not 3 hours. That's the difference.
三秒钟。 不是三小时。这就是区别。
🌿 Wellness Clinic — Nourish Before It Breaks
Hua Tuo didn't just cure disease — he invented the Five-Animal Exercises (五禽戏) to prevent it.
华佗不仅治病,更发明了五禽戏强身健体——预防胜于治疗。
Submit your AI agent code for a Six-Meridian Security Checkup(六经脉安全体检):
🛡️ Meridian 1: Sandbox Isolation → 30/100 ⚠️ CRITICAL
🔑 Meridian 2: Key Management → 85/100 ✅ Healthy
🧠 Meridian 3: Prompt Security → 45/100 ⚠️ At risk
🔒 Meridian 4: Output Sanitization → 60/100 🟡 Needs care
⏱️ Meridian 5: Resilience Design → 72/100 🔵 Good
📊 Meridian 6: Observability → 55/100 🟡 Needs care
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Overall Health Score: 58/100 🟡 Needs Nourishing
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
💊 Top Nourishing Prescriptions:
1. Add execution sandboxing (RestrictedPython / Docker)
2. Implement prompt injection defenses
3. Add structured logging and tracing
Your AI is running naked in production. Do you know it?
🦠 Epidemic Alert — The AI Pandemic Nobody Talks About
疫情通报 — 没有人谈论的 AI 大流行
Every day, thousands of AI systems go into production already infected:
- 🔓 No sandbox — agent code executes with full system privileges
- 🔑 Hardcoded secrets — API keys sitting in plain text, spreading like a virus
- 🧠 No prompt defense — one injection away from a full outbreak
- 📊 No observability — zero symptom monitoring, blind until collapse
This is not a future risk. This is an active pandemic.
And when things break? Developers spend hours digging through GitHub Issues, Discord threads, Reddit posts, and half-abandoned blog articles.
The cure exists. Buried under seven layers of irrelevant search results.
Stack Overflow waits for someone to answer. ChatGPT might hallucinate a treatment. GitHub Issues drown in duplicate reports.
CyberHuaTuo is the WHO of the AI world — tracking the epidemic, prescribing battle-tested cures, and vaccinating before the next outbreak.
🤔 Why CyberHuaTuo?
| 🩺 CyberHuaTuo | 🔍 Stack Overflow | 🤖 ChatGPT | 📋 GitHub Issues | |
|---|---|---|---|---|
| AI-specific knowledge | ✅ Purpose-built | ⚠️ General | ⚠️ Generic | ⚠️ Scattered |
| Version-aware diagnosis | ✅ Auto-detect | ❌ Manual | ❌ Outdated cutoff | ❌ Manual |
| Structured prescriptions | ✅ Root cause + fix + verify | ⚠️ Varies | ⚠️ May hallucinate | ⚠️ Varies |
| Cross-framework mapping | ✅ LangChain ↔ LlamaIndex ↔ CrewAI | ❌ Siloed | ⚠️ Inconsistent | ❌ Siloed |
| Security health check | ✅ Six-meridian scan | ❌ None | ❌ None | ❌ None |
| Preventive nourishing | ✅ Proactive hardening | ❌ Reactive only | ❌ Reactive only | ❌ Reactive only |
| Official doc retrieval | ✅ Context7 real-time docs | ❌ None | ❌ Outdated | ❌ None |
| Speed to cure | ⚡ Seconds | 🕐 Hours | ⚡ Fast but risky | 🕐 Hours |
🔮 How It Works
望闻问切 — The 2,000-Year-Old Diagnostic Protocol
Inspired by traditional Chinese medicine's four-step diagnosis, refined for the AI age:
Your Error / Your Code
│
▼
┌──────────┐
│ 望 Look │──→ Parse stack trace, detect framework, version & environment
└─────┬────┘
▼
┌───────────┐
│ 闻 Listen │──→ Correlate with known issues, breaking changes & CVEs
└──────┬────┘
▼
┌─────────┐
│ 问 Ask │──→ Smart follow-up (only when critical info is missing)
└────┬────┘
▼
┌────────────┐
│ 切 Diagnose │──→ Semantic search → LLM reasoning → Ranked prescriptions
└──────┬─────┘
▼
💊 Prescriptions (ranked by cure rate)
🌿 Nourishing advice (preventive recommendations)
Every prescription includes:
- 🎯 Root cause — not just what to do, but why it broke
- 🔧 Copy-paste fix — step-by-step with ready-to-run code
- 📌 Version-locked — verified for your exact framework version
- 🔄 Cross-framework map — "LangChain issue? Here's the LlamaIndex equivalent."
- 📚 Official docs — pulled from framework's latest documentation via Context7
- ✅ Community-verified — tested, upvoted, and marked "Cured ✅"
📋 What We Treat — Not Just Agents
If it has AI in it, CyberHuaTuo sees it. No framework left behind.
🤖 AI Agent Frameworks
| Framework | Cases | Status | Join 👇 |
|---|---|---|---|
| LangChain | 10+ | 🟢 Live | Add a case → |
| MCP (Anthropic) | 5+ | 🟢 Live | Add a case → |
| CrewAI | 5+ | 🟢 Live | Add a case → |
| LlamaIndex | — | 🟡 Accepting PRs | Be the first → |
| OpenAI Agents SDK | — | 🟡 Accepting PRs | Be the first → |
| AutoGen | — | 🟡 Accepting PRs | Be the first → |
| DSPy | — | 🔵 Planned | Vote → |
🧠 AI / ML / Deep Learning
| Technology | Cases | Status | Join 👇 |
|---|---|---|---|
| PyTorch | — | 🟡 Accepting PRs | Be the first → |
| Transformers (HuggingFace) | — | 🟡 Accepting PRs | Be the first → |
| TensorFlow | — | 🟡 Accepting PRs | Be the first → |
🏗️ Platform & Custom Agents
| Platform | Cases | Status | Join 👇 |
|---|---|---|---|
| GPTs / Coze / Dify | — | 🟡 Accepting PRs | Be the first → |
| Custom-built Agents | — | 🟡 Accepting PRs | Be the first → |
🌿 Nourishing Prescriptions (养生药方)
| Category | Cases | Status | Join 👇 |
|---|---|---|---|
| 🛡️ Security Sandbox | 2+ | 🟢 Live | Add → |
| 🔒 Security Hardening | 2+ | 🟢 Live | Add → |
| ⚡ Performance Tuning | — | 🟡 Accepting PRs | Be the first → |
Every framework starts with one case. Every nourishing recipe starts with one insight. Yours could be the first.
🚀 Quick Start
Prerequisites
- Python 3.9+
- (Optional) LLM API Key for AI-powered diagnosis (OpenAI / Anthropic / DeepSeek / Gemini / Ollama)
Option A: One-Click Launch
git clone https://github.com/JinNing6/CyberHuaTuo.git
cd CyberHuaTuo
# Windows
start.bat
# macOS / Linux
chmod +x start.sh && ./start.sh
Auto-installs dependencies and opens the Web UI at http://127.0.0.1:8000
Option B: Manual Setup
git clone https://github.com/JinNing6/CyberHuaTuo.git
cd CyberHuaTuo
pip install -r requirements.txt
# (Optional) Configure LLM for AI diagnosis
cp .env.example .env
# Edit .env — add your API Key
python -m cyberhuatuo serve
# → Browser auto-opens http://127.0.0.1:8000
CLI Commands
python -m cyberhuatuo serve # Start the clinic
python -m cyberhuatuo serve --port 9000 # Custom port
python -m cyberhuatuo serve --reload # Dev mode
python -m cyberhuatuo rebuild # Rebuild vector index
python -m cyberhuatuo stats # Knowledge base stats
Configuration
Copy .env.example to .env:
# LLM Provider (choose one)
OPENAI_API_KEY=sk-your-key # OpenAI
ANTHROPIC_API_KEY=sk-ant-your-key # Anthropic
DEEPSEEK_API_KEY=sk-your-key # DeepSeek
GEMINI_API_KEY=your-key # Google Gemini
OLLAMA_BASE_URL=http://localhost:11434 # Ollama (local, free)
# Diagnosis model
DIAGNOSIS_MODEL=gpt-4o-mini # or claude-sonnet-4-20250514 / deepseek-chat / gemini-1.5-pro
# Server
PORT=8000
No API Key? No problem. Vector search works without any key. AI-powered 望闻问切 diagnosis and 🌿 nourishing checkup require one of the above.
📊 Epidemic Report — Live Intelligence
A living dashboard tracking what's breaking across the AI ecosystem right now:
- 🔥 Trending issues and their cure rates
- 🗺️ Heatmap of problems across frameworks
- 📈 Framework health scores — know before you adopt
- ⛏️ Issue mining — real-time extraction from GitHub
🛠️ Tech Stack
| Layer | Technology |
|---|---|
| Backend | Python · FastAPI · Uvicorn |
| Frontend | Jinja2 Templates (server-rendered) |
| Vector DB | ChromaDB (embedded, zero-config) |
| LLM Gateway | LiteLLM (OpenAI / Anthropic / DeepSeek / Gemini / Ollama) |
| Doc Retrieval | Context7 API (real-time official framework docs) |
| Security Engine | Six-Meridian Audit (AI-powered code analysis) |
| GitHub Bot | GitHub Actions + lightweight text matching |
🤖 GitHub Bot — Zero-Friction Diagnosis
The greatest doctor doesn't wait in the clinic — they meet patients where they are.
大医不坐堂候诊——而是行走于民间,哪里有病痛,哪里就有华佗。
Install the CyberHuaTuo Bot on any repo — automatic prescription recommendations on every Issue.
┌─────────────────────────────────────────────┐
│ New Issue opened │
│ "ImportError: cannot import ChatOpenAI" │
│ │
│ 💬 @CyberHuaTuo Bot replies: │
│ ┌─────────────────────────────────────┐ │
│ │ 🩺 赛博华佗 · 自动诊断 │ │
│ │ │ │
│ │ 💊 药方 1 (92% match): │ │
│ │ pip install langchain-openai │ │
│ │ from langchain_openai import ... │ │
│ │ │ │
│ │ 📋 Full prescription → │ │
│ └─────────────────────────────────────┘ │
└─────────────────────────────────────────────┘
How it works
| Trigger | Action |
|---|---|
| 🆕 New Issue opened | Auto-match prescriptions from the knowledge base |
💬 @CyberHuaTuo in any comment |
On-demand diagnosis |
Install on your repo (3 minutes)
# Copy the Bot workflow to your repo
mkdir -p .github/workflows
curl -o .github/workflows/bot-prescribe.yml \
https://raw.githubusercontent.com/JinNing6/CyberHuaTuo/main/.github/workflows/bot-prescribe.yml
The Flywheel
Developers see Bot is useful → Contribute more prescriptions
→ Bot becomes more accurate → More repos install Bot
→ CyberHuaTuo brand appears before thousands of developers daily
Imagine: If LangChain's official repo installs this Bot, every new Issue gets a prescription recommendation. CyberHuaTuo's brand appears before thousands of developers every day. 🚀
🔌 MCP Server — AI Editor Integration
CyberHuaTuo provides a native Model Context Protocol (MCP) server, seamlessly integrating the ancient wisdom of 望闻问切 (Look, Listen, Ask, Diagnose) directly into your AI editors (e.g., Cursor, VS Code Copilot, Claude Desktop).
Simply configure the MCP Server, and your AI assistant gains access to these powerful tools:
- Diagnose (
diagnose): Send error messages to the AI, and it will automatically generate targeted prescriptions using our knowledge base. - Security Checkup (
security_checkup): Perform comprehensive six-meridian security and performance audits on your Agent code. - Search Prescriptions (
search_knowledge_base): Instantly query CyberHuaTuo's vast library of historical cases during your AI chats. - Save Prescriptions (
save_prescription): Did the LLM solve an unrecorded issue? Let it directly submit the new prescription to the local knowledge base with one click.
👉 For detailed installation and configuration instructions, please refer to README_MCP.md
🎒 Agent Skills Protocol (Self-Rescue)
We support the open Agent Skills standard (SKILL.md). You can empower your own AI assistants (Cursor, Copilot, Claude Code) to automatically seek help from CyberHuaTuo when they get stuck.
Simply copy the skills/cyberhuatuo-rescue directory into your project's .cursor/rules or .agent/skills folder. Your AI will learn to automatically diagnose errors and run security checkups using CyberHuaTuo's knowledge base.
✊ Join the Movement
This isn't just a project. This is a mission.
The greatest physicians didn't hoard knowledge — they traveled between villages, healing the sick and training the next generation.
最伟大的医者从不将医术据为己有——他们行走于村落之间,救死扶伤,薪火相传。赛博华佗,便是这段旅程在 AI 时代的延续。
👨⚕️ Become a Resident Doctor(坐堂医师)
Found a fix that saved your project? Don't let it die in your commit history.
- 📝 Submit a Prescription — document your fix with error, version, env, and solution
- ✅ Community Verification — other developers validate through real-world testing
- 🏅 Earn the "神医" Badge — top contributors earn the Divine Doctor(神医) title
You don't need to be a 10x engineer. You just need to have solved one problem that someone else hasn't — yet.
🌿 Contribute Nourishing Recipes(贡献养生方)
Discovered a security best practice? Performance optimization? Architectural pattern?
Your prevention wisdom saves thousands from future pain.
🧬 Contribute Cases(贡献病例)
Encountered a mind-bending agent bug? Your suffering has value.
- Error message + full stack trace
- Framework name & version, environment details
- Your debugging journey and final fix
- Bonus: reproduction steps
Every case makes the engine smarter. You're not filing a bug report — you're training a digital physician.
🛠️ Improve the Engine(改进引擎)
- Fork & clone the repo
- Check
CONTRIBUTING.mdfor setup - Submit a PR — every improvement heals thousands
🏛️ The Name
华佗(约 145–208),字元化,东汉末年名医,中国"外科鼻祖"。
Hua Tuo (c. 145–208 AD) — the legendary physician of ancient China, revered as the "Father of Surgery."
In an age of warlords and plague, while others sought power, Hua Tuo traveled across provinces with nothing but a medicine bag — healing the sick, asking for nothing in return.
He invented Ma Fei San(麻沸散), the world's first general anesthetic, 1,600 years before Western medicine. He pioneered abdominal surgery when the rest of the world was still praying to gods.
But Hua Tuo was more than a healer of the sick. He created the Five-Animal Exercises(五禽戏) — a system of preventive health inspired by the movements of the tiger, deer, bear, ape, and crane. His philosophy: the greatest medicine is prevention.
治病不如防病。The best cure is the one you never need.
When Cao Cao demanded he serve as a personal physician, Hua Tuo refused — and was executed. Legend says his life's medical knowledge, compiled in the Book of the Azure Bag(青囊书), was burned. The greatest medical wisdom of ancient China, lost to tyranny.
But the spirit was never lost.
但精神从未失传。
Today, 1,800 years later, AI developers face their own "ancient prescriptions" — buried in GitHub Issues, lost Discord threads, outdated Stack Overflow answers. And their AI systems run without checkups, without prevention, without nourishment.
CyberHuaTuo gathers them all — and builds the world's first AI clinic that doesn't just cure, but prevents.
🏆 Contributors — Hall of Divine Doctors
贡献者 · 名医堂
The greatest physicians didn't hoard knowledge — they shared it with the world.
最伟大的医者从不将医术据为己有——他们悬壶济世,薪火相传。
🏅 Hall of Fame / 名医排行
| Rank | Avatar | Name | Title / 称号 | Contributions / 贡献 |
|---|---|---|---|---|
| 🥇 | @JinNing6 | 👑 华佗再世 Hua Tuo Reborn | Creator & Lead |
🩺 Title System / 称号体系
| Title / 称号 | Requirement / 条件 | Description |
|---|---|---|
| 🏥 坐堂医师 Resident Doctor | First contribution | 提交了第一个药方或 PR |
| ⚕️ 主治医师 Attending Physician | 3+ contributions | 持续贡献的可靠伙伴 |
| 👨⚕️ 名医 Renowned Doctor | 5+ contributions | 社区公认的问题解决专家 |
| 🌟 神医 Divine Doctor | 10+ contributions | 传奇级别的贡献者 |
| 👑 华佗再世 Hua Tuo Reborn | 20+ contributions | 当代华佗,开源之光 |
All Contributors / 所有贡献者
Made with contrib.rocks · Auto-updated by GitHub commits
🩺 Want to see your avatar here? Submit a prescription, open a PR, or contribute a case — every contribution counts!
⭐ Star History
📜 License
Apache License 2.0 — Use it. Fork it. Build on it. Heal with it.
🩺 Your AI deserves a doctor.
Not just when it's sick — but before it ever gets sick.
你的 AI 值得一位医生。
不只是生病时——更是在它生病之前。
望闻问切,药到病除。
五禽养生,固本培元。
古为今用,薪火相传。
这是技术对文化的致敬,也是文化对技术的赋能。
⭐ Star this repo ·
💊 Submit a Prescription ·
💬 Discussions ·
🎮 Discord
Named after 华佗, the divine physician of ancient China — healer, inventor, and philosopher.
以华佗之名,致敬中华五千年医道传承——治病、养生、强体。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cyberhuatuo-0.1.0.tar.gz.
File metadata
- Download URL: cyberhuatuo-0.1.0.tar.gz
- Upload date:
- Size: 127.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2b300d537978b508929f7f3112bc9f346ada8897dfdc7640234be11239e9d701
|
|
| MD5 |
ebd86de686f2218edcad69412dc82a9e
|
|
| BLAKE2b-256 |
328c556d88118ead516906f71de6d4601ecfc4ca5b1c43165103f553c811fd82
|
Provenance
The following attestation bundles were made for cyberhuatuo-0.1.0.tar.gz:
Publisher:
release.yml on JinNing6/CyberHuaTuo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberhuatuo-0.1.0.tar.gz -
Subject digest:
2b300d537978b508929f7f3112bc9f346ada8897dfdc7640234be11239e9d701 - Sigstore transparency entry: 1088994215
- Sigstore integration time:
-
Permalink:
JinNing6/CyberHuaTuo@01006830dc54d71a5b1d3db742131a04fd6a3f21 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JinNing6
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01006830dc54d71a5b1d3db742131a04fd6a3f21 -
Trigger Event:
push
-
Statement type:
File details
Details for the file cyberhuatuo-0.1.0-py3-none-any.whl.
File metadata
- Download URL: cyberhuatuo-0.1.0-py3-none-any.whl
- Upload date:
- Size: 122.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98f4f3d0df192265b3909dbc89948e922125c61af68a8d0e08b6e7f70c1ee1a3
|
|
| MD5 |
ed116a4414477f14bfd9e0bf1811593b
|
|
| BLAKE2b-256 |
5ec1fd70312fb942738ea4f08d15ee52b72ebbb9d4ec27bdb5a0713ebab691af
|
Provenance
The following attestation bundles were made for cyberhuatuo-0.1.0-py3-none-any.whl:
Publisher:
release.yml on JinNing6/CyberHuaTuo
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
cyberhuatuo-0.1.0-py3-none-any.whl -
Subject digest:
98f4f3d0df192265b3909dbc89948e922125c61af68a8d0e08b6e7f70c1ee1a3 - Sigstore transparency entry: 1088994255
- Sigstore integration time:
-
Permalink:
JinNing6/CyberHuaTuo@01006830dc54d71a5b1d3db742131a04fd6a3f21 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/JinNing6
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@01006830dc54d71a5b1d3db742131a04fd6a3f21 -
Trigger Event:
push
-
Statement type: