tanbopiao

tanze · 探赜

Community tanbopiao
Updated

探赜索隐,钩深致远——deer-flow 收编内化底座(Deep Research 编排,源自 bytedance/deer-flow,MIT)

tanze · 探赜

探赜索隐,钩深致远 ——《周易·系辞上》

轻量深研算子:把一个公开可查的研究问题,走完「规划 → 检索 → 抓取 → 成稿」,产出带来源编号的 Markdown 报告。零第三方依赖(纯 Python 标准库),单进程运行,内存占用几十 MB 量级,提供脚本、MCP stdio 服务两种形态。

理念致谢:编排思路提炼自 bytedance/deer-flow(MIT)的 Deep Research多智能体设计;本仓库代码为独立重写的轻量化实现,与上游无代码血缘。

为什么轻量复刻

deer-flow 完整形态需要 FastAPI 网关、Next.js 前端、Redis、无头浏览器与容器沙箱,内存 800MB–1.2GB。tanze 只保留其核心编排逻辑,全部由标准库实现:

deer-flow 完整形态 tanze 轻量复刻
FastAPI 网关 + LangGraph 编排 单文件状态机,函数直调
Next.js 前端 无界面,输出 Markdown
Redis 会话存储 无状态,一次一研
Playwright 无头浏览器(250–500M/实例) Bing 检索 + 按需正文抓取
Docker 沙箱体系 复用宿主现有执行边界
内存 800M–1.2G 实测峰值 22–24MB

复刻哲学:功能可以复刻、架构可以复刻、逻辑可以复刻——代码算子由自己生成完善,达到同样的功能与能力,而资源占用降低一个数量级。

用法

export TANZE_LLM_KEY=<密钥,不入档>
python3 tanze.py --mem "研究问题"

环境变量:TANZE_LLM_BASE(默认 ModelScope 推理 API,任何 OpenAI 兼容接口均可)、TANZE_LLM_MODEL、TANZE_FETCH_LIMIT(正文抓取页数上限,默认 3)。

MCP stdio 服务

python3 mcp_server.py

JSON-RPC 2.0 over stdio,工具 research(question),任何 MCP 客户端可接。

流程

  1. plan:问题拆成 3 个互补搜索查询(LLM,JSON;严禁年份开头,避免命中日历类页面);
  2. search:逐查询 Bing 中国检索,取标题、链接、摘要;
  3. fetch:按序抓取正文(去脚本样式,单页截断 4000 字符,总量受 TANZE_FETCH_LIMIT 约束);
  4. report:材料汇总成稿,只用材料内信息,不足处明确标注,引用带来源编号。

边界

  • 搜索依赖 Bing 中国页面结构(b_algo 结果块),结构变更时需适配;
  • 正文抓取为单次拉取,无渲染引擎,动态页面拿不到的内容以摘要代替;
  • 仅适合公开可查的事实题;私有概念、需登录的数据不适用;
  • LLM 密钥经环境变量注入,不写入任何存储。

许可

MIT。

安装(PyPI)

pip install tanze          # 算子本体
pip install tanze          # 含 MCP 入口:tanze-mcp(stdio JSON-RPC 2.0)

命令行:tanze "研究问题"(加 --mem 输出内存峰值);MCP 服务:tanze-mcp。密钥经环境变量 TANZE_LLM_KEY / TANZE_LLM_BASE / TANZE_LLM_MODEL 提供,不落盘。

MCP Client Configuration

Published on PyPI as tanze. For MCP clients (Cline, Cherry Studio, Cursor, etc.):

{
  "mcpServers": {
    "tanze": {
      "command": "uvx",
      "args": ["--from", "tanze", "tanze-mcp"]
    }
  }
}

MCP Server · Populars

MCP Server · New

    atilaahmettaner

    TradingMCP: Market Data & Technical Analysis for AI Assistants

    MCP server for market analysis in AI assistants: screeners, multi-timeframe technical analysis, backtests and sentiment for crypto, stocks, forex and futures. 39 tools. Self-host free, or use the hosted version, TradingMCP.

    Community atilaahmettaner
    lifan-builds

    Faster Mac Use (fmu)

    Background-first, multi-cursor browser and native macOS computer-use engine for AI agents

    Community lifan-builds
    agent360dev

    Agent360 Browser MCP

    The browser tool that can stop and ask you. A 2FA code, a CAPTCHA, a choice only you can make: it asks on your screen, then carries on in the same signed-in Chrome. 41 tools, MCP clients that run local servers, MIT.

    Community agent360dev
    robinAKL

    Agent Room

    Put Claude Code, Cursor, Codex, Gemini & Antigravity in one room — real-time multi-agent AI collaboration over MCP for distributed dev, code review, PR handoff & frontend↔backend integration. Free, self-hostable, MCP-native.

    Community robinAKL
    blen-labs

    Capture MCP

    AI-native Model Context Protocol (MCP) server that integrates SAM.gov, USASpending.gov, and Tango APIs to capture and analyze federal procurement and spending data through natural language queries. Responses include both human-readable text and structured JSON so MCP-compatible clients can consume the data programmatically.

    Community blen-labs