A single-file Python agent for the terminal. Three-tier model routing, a thinking-framework proxy, multimodal + web search. All in stdlib. Just code. 单文件 Python 终端智能体。三档模型路由、思考框架代理、多模态 + Web Search。纯标准库实现。只管写代码。
Pure Python stdlib — urllib, json, subprocess. No pip install. Single .py file.纯 Python 标准库 — urllib, json, subprocess。无需 pip 安装,单个 .py 文件。
Autonomous tool-calling loop: read → think → edit → verify. Multi-step reasoning, no manual intervention.自主工具调用循环:读取→思考→编辑→验证。多步推理无需人工干预。
Three-tier compact: micro (expire stale tool results), session-memory, fallback (strip + trim). Auto at 80%.三级压缩:micro(过期工具结果)、session-memory、fallback(剥离+裁剪)。80% 自动触发。
view_image extension loads local screenshots / UI mockups into the model's vision context.view_image 扩展将本地截图/界面稿载入模型视觉上下文。
Per-preset directories: conf.py (tool whitelist / unloads) + extensions/. Activate with MANGO_PRESET; without it: pure built-in tools.按预设目录组织:conf.py(工具白名单/卸载)+ extensions/。用 MANGO_PRESET 激活;不设置则为纯内置工具。
JSON in .mangocli/session/. Auto-backup on corruption. Resume anywhere.会话保存在 .mangocli/session/。损坏自动备份。断点续聊。
rm -rf / sudo / chmod 777 detection. User confirmation before destructive commands. Path sandbox.检测 rm -rf / sudo / chmod 777。危险命令执行前需用户确认。路径沙盒。
Reusable workflow bundles via SKILL.md. Install in ~/.mangocli/skills/, invoke via use_skill.通过 SKILL.md 复用工作流。安装至 ~/.mangocli/skills/,通过 use_skill 调用。
Extension files in ~/.mangocli/presets/<name>/extensions/ — tools, prompt sections and entry points auto-register at startup. Event bus + reversible unload.将扩展放入 ~/.mangocli/presets/<name>/extensions/ — 工具/提示词段/入口启动自动注册。支持事件总线与可逆卸载。
Three model tiers (flash / standard / reasoning) auto-selected per turn via keyword + LLM scoring. Configure in .mangocli/providers.json.三档模型(flash / standard / reasoning)按回合经关键词 + LLM 打分自动选择。在 .mangocli/providers.json 配置。
Agent Client Protocol v1 over stdio — run as an agent inside Zed / JetBrains with session switching and full history replay.基于 stdio 的 Agent Client Protocol v1 — 在 Zed / JetBrains 中以 agent 运行,支持会话切换与历史回放。
Prefer the shell over GUI tools.比起 GUI 工具更爱 shell。
Dislike heavy AI frameworks and dependency trees.不喜欢臃肿的 AI 框架与依赖树。
Want to peek under the hood and customize everything.想掀开引擎盖、一切都自己改。
Want code & data to stay on their machine.希望代码与数据留在本机。
Build bespoke agents on a clean, auditable base.在干净基座上构建定制智能体。
Mix cheap + strong models per task to control API cost.按任务混用轻量与重型模型,控制 API 成本。
Auto-detected. Enables thinking/reasoning via extra_body.自动检测,通过 extra_body 启用 reasoning。
Full OpenAI-compatible. Any /v1/chat/completions endpoint.完整兼容 OpenAI,任意 /v1/chat/completions 端点。
Detected by model name. Exposes reasoning_split.通过模型名检测,暴露 reasoning_split。
Qwen, Moonshot, kimi, glm — anything that speaks OpenAI protocol.Qwen、Moonshot、kimi、glm — 任何兼容 OpenAI 协议的接口。
readText files only (view_image for images)仅文本文件(图片用 view_image)
writeWrite or overwrite写入或覆写
editExact string replace + diff精确字符串替换 + diff
searchGlob patterns, sorted by mtimeGlob 模式,按修改时间排序
grepRecursive regex content search递归正则内容搜索
bashShell exec (60s timeout)Shell 执行(60s 超时)
use_skillLoad installed SKILL.md加载已安装技能
attempt_completionTask completion signal任务完成信号
+ yoursDrop a .py into ~/.mangocli/presets/<name>/extensions/ — auto-registered at startup放入 .py 至 ~/.mangocli/presets/<name>/extensions/ 启动自动注册
acpACP v1 agent serverACP v1 Agent 服务
web_searchBocha AI Search live webBocha AI 实时搜索
view_imageLocal image to vision本地图片至视觉
clipboardSystem clipboard R/W系统剪贴板读写
git_statusRead-only git summaries只读 git 摘要
auditTool-call audit JSONL工具调用审计
debugPer-call debug prints逐调用调试打印
ratelimitRate warning (warn only)频率告警(仅告警)
traceSession event stream JSON会话事件流落盘
/qQuit退出
/nNew session新会话
/cCompact手动压缩
/hHelp帮助
Recommended. Requires Python 3.10+.推荐方式。需 Python 3.10+。
Clone and run. Zero setup.克隆即运行,零配置。