[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"similar-evalstate--fast-agent":3,"tool-evalstate--fast-agent":62},[4,18,26,36,46,54],{"id":5,"name":6,"github_repo":7,"description_zh":8,"stars":9,"difficulty_score":10,"last_commit_at":11,"category_tags":12,"status":17},4358,"openclaw","openclaw\u002Fopenclaw","OpenClaw 是一款专为个人打造的本地化 AI 助手，旨在让你在自己的设备上拥有完全可控的智能伙伴。它打破了传统 AI 助手局限于特定网页或应用的束缚，能够直接接入你日常使用的各类通讯渠道，包括微信、WhatsApp、Telegram、Discord、iMessage 等数十种平台。无论你在哪个聊天软件中发送消息，OpenClaw 都能即时响应，甚至支持在 macOS、iOS 和 Android 设备上进行语音交互，并提供实时的画布渲染功能供你操控。\n\n这款工具主要解决了用户对数据隐私、响应速度以及“始终在线”体验的需求。通过将 AI 部署在本地，用户无需依赖云端服务即可享受快速、私密的智能辅助，真正实现了“你的数据，你做主”。其独特的技术亮点在于强大的网关架构，将控制平面与核心助手分离，确保跨平台通信的流畅性与扩展性。\n\nOpenClaw 非常适合希望构建个性化工作流的技术爱好者、开发者，以及注重隐私保护且不愿被单一生态绑定的普通用户。只要具备基础的终端操作能力（支持 macOS、Linux 及 Windows WSL2），即可通过简单的命令行引导完成部署。如果你渴望拥有一个懂你",349277,3,"2026-04-06T06:32:30",[13,14,15,16],"Agent","开发框架","图像","数据工具","ready",{"id":19,"name":20,"github_repo":21,"description_zh":22,"stars":23,"difficulty_score":10,"last_commit_at":24,"category_tags":25,"status":17},3808,"stable-diffusion-webui","AUTOMATIC1111\u002Fstable-diffusion-webui","stable-diffusion-webui 是一个基于 Gradio 构建的网页版操作界面，旨在让用户能够轻松地在本地运行和使用强大的 Stable Diffusion 图像生成模型。它解决了原始模型依赖命令行、操作门槛高且功能分散的痛点，将复杂的 AI 绘图流程整合进一个直观易用的图形化平台。\n\n无论是希望快速上手的普通创作者、需要精细控制画面细节的设计师，还是想要深入探索模型潜力的开发者与研究人员，都能从中获益。其核心亮点在于极高的功能丰富度：不仅支持文生图、图生图、局部重绘（Inpainting）和外绘（Outpainting）等基础模式，还独创了注意力机制调整、提示词矩阵、负向提示词以及“高清修复”等高级功能。此外，它内置了 GFPGAN 和 CodeFormer 等人脸修复工具，支持多种神经网络放大算法，并允许用户通过插件系统无限扩展能力。即使是显存有限的设备，stable-diffusion-webui 也提供了相应的优化选项，让高质量的 AI 艺术创作变得触手可及。",162132,"2026-04-05T11:01:52",[14,15,13],{"id":27,"name":28,"github_repo":29,"description_zh":30,"stars":31,"difficulty_score":32,"last_commit_at":33,"category_tags":34,"status":17},1381,"everything-claude-code","affaan-m\u002Feverything-claude-code","everything-claude-code 是一套专为 AI 编程助手（如 Claude Code、Codex、Cursor 等）打造的高性能优化系统。它不仅仅是一组配置文件，而是一个经过长期实战打磨的完整框架，旨在解决 AI 代理在实际开发中面临的效率低下、记忆丢失、安全隐患及缺乏持续学习能力等核心痛点。\n\n通过引入技能模块化、直觉增强、记忆持久化机制以及内置的安全扫描功能，everything-claude-code 能显著提升 AI 在复杂任务中的表现，帮助开发者构建更稳定、更智能的生产级 AI 代理。其独特的“研究优先”开发理念和针对 Token 消耗的优化策略，使得模型响应更快、成本更低，同时有效防御潜在的攻击向量。\n\n这套工具特别适合软件开发者、AI 研究人员以及希望深度定制 AI 工作流的技术团队使用。无论您是在构建大型代码库，还是需要 AI 协助进行安全审计与自动化测试，everything-claude-code 都能提供强大的底层支持。作为一个曾荣获 Anthropic 黑客大奖的开源项目，它融合了多语言支持与丰富的实战钩子（hooks），让 AI 真正成长为懂上",159636,2,"2026-04-17T23:33:34",[14,13,35],"语言模型",{"id":37,"name":38,"github_repo":39,"description_zh":40,"stars":41,"difficulty_score":42,"last_commit_at":43,"category_tags":44,"status":17},8272,"opencode","anomalyco\u002Fopencode","OpenCode 是一款开源的 AI 编程助手（Coding Agent），旨在像一位智能搭档一样融入您的开发流程。它不仅仅是一个代码补全插件，而是一个能够理解项目上下文、自主规划任务并执行复杂编码操作的智能体。无论是生成全新功能、重构现有代码，还是排查难以定位的 Bug，OpenCode 都能通过自然语言交互高效完成，显著减少开发者在重复性劳动和上下文切换上的时间消耗。\n\n这款工具专为软件开发者、工程师及技术研究人员设计，特别适合希望利用大模型能力来提升编码效率、加速原型开发或处理遗留代码维护的专业人群。其核心亮点在于完全开源的架构，这意味着用户可以审查代码逻辑、自定义行为策略，甚至私有化部署以保障数据安全，彻底打破了传统闭源 AI 助手的“黑盒”限制。\n\n在技术体验上，OpenCode 提供了灵活的终端界面（Terminal UI）和正在测试中的桌面应用程序，支持 macOS、Windows 及 Linux 全平台。它兼容多种包管理工具，安装便捷，并能无缝集成到现有的开发环境中。无论您是追求极致控制权的资深极客，还是渴望提升产出的独立开发者，OpenCode 都提供了一个透明、可信",144296,1,"2026-04-16T14:50:03",[13,45],"插件",{"id":47,"name":48,"github_repo":49,"description_zh":50,"stars":51,"difficulty_score":32,"last_commit_at":52,"category_tags":53,"status":17},2271,"ComfyUI","Comfy-Org\u002FComfyUI","ComfyUI 是一款功能强大且高度模块化的视觉 AI 引擎，专为设计和执行复杂的 Stable Diffusion 图像生成流程而打造。它摒弃了传统的代码编写模式，采用直观的节点式流程图界面，让用户通过连接不同的功能模块即可构建个性化的生成管线。\n\n这一设计巧妙解决了高级 AI 绘图工作流配置复杂、灵活性不足的痛点。用户无需具备编程背景，也能自由组合模型、调整参数并实时预览效果，轻松实现从基础文生图到多步骤高清修复等各类复杂任务。ComfyUI 拥有极佳的兼容性，不仅支持 Windows、macOS 和 Linux 全平台，还广泛适配 NVIDIA、AMD、Intel 及苹果 Silicon 等多种硬件架构，并率先支持 SDXL、Flux、SD3 等前沿模型。\n\n无论是希望深入探索算法潜力的研究人员和开发者，还是追求极致创作自由度的设计师与资深 AI 绘画爱好者，ComfyUI 都能提供强大的支持。其独特的模块化架构允许社区不断扩展新功能，使其成为当前最灵活、生态最丰富的开源扩散模型工具之一，帮助用户将创意高效转化为现实。",108322,"2026-04-10T11:39:34",[14,15,13],{"id":55,"name":56,"github_repo":57,"description_zh":58,"stars":59,"difficulty_score":32,"last_commit_at":60,"category_tags":61,"status":17},6121,"gemini-cli","google-gemini\u002Fgemini-cli","gemini-cli 是一款由谷歌推出的开源 AI 命令行工具，它将强大的 Gemini 大模型能力直接集成到用户的终端环境中。对于习惯在命令行工作的开发者而言，它提供了一条从输入提示词到获取模型响应的最短路径，无需切换窗口即可享受智能辅助。\n\n这款工具主要解决了开发过程中频繁上下文切换的痛点，让用户能在熟悉的终端界面内直接完成代码理解、生成、调试以及自动化运维任务。无论是查询大型代码库、根据草图生成应用，还是执行复杂的 Git 操作，gemini-cli 都能通过自然语言指令高效处理。\n\n它特别适合广大软件工程师、DevOps 人员及技术研究人员使用。其核心亮点包括支持高达 100 万 token 的超长上下文窗口，具备出色的逻辑推理能力；内置 Google 搜索、文件操作及 Shell 命令执行等实用工具；更独特的是，它支持 MCP（模型上下文协议），允许用户灵活扩展自定义集成，连接如图像生成等外部能力。此外，个人谷歌账号即可享受免费的额度支持，且项目基于 Apache 2.0 协议完全开源，是提升终端工作效率的理想助手。",100752,"2026-04-10T01:20:03",[45,13,15,14],{"id":63,"github_repo":64,"name":65,"description_en":66,"description_zh":67,"ai_summary_zh":67,"readme_en":68,"readme_zh":69,"quickstart_zh":70,"use_case_zh":71,"hero_image_url":72,"owner_login":73,"owner_name":74,"owner_avatar_url":75,"owner_bio":76,"owner_company":76,"owner_location":76,"owner_email":76,"owner_twitter":73,"owner_website":76,"owner_url":77,"languages":78,"stars":95,"forks":96,"last_commit_at":97,"license":98,"difficulty_score":32,"env_os":99,"env_gpu":100,"env_ram":101,"env_deps":102,"category_tags":110,"github_topics":111,"view_count":32,"oss_zip_url":76,"oss_zip_packed_at":76,"status":17,"created_at":123,"updated_at":124,"faqs":125,"releases":156},8788,"evalstate\u002Ffast-agent","fast-agent","Code, Build and Evaluate agents - excellent Model and Skills\u002FMCP\u002FACP Support","fast-agent 是一个灵活高效的开源框架，旨在帮助开发者快速构建、运行和评估基于大语言模型（LLM）的智能体（Agents）。它解决了传统开发中配置复杂、模型适配困难以及工作流编排繁琐的痛点，让用户能在几分钟内搭建出具备多模态处理能力的智能应用。\n\n这款工具特别适合软件开发者、AI 研究人员以及需要自动化工作流的工程团队使用。无论是编写代码、调试应用，还是进行模型评估，fast-agent 都能提供强大的支持。其独特的技术亮点在于对 MCP（模型上下文协议）和 ACP 的全链路原生支持，包括采样与交互唤起功能，这在同类框架中尚属首创。此外，fast-agent 采用\"CLI 优先”的设计理念，提供丰富的交互式终端体验，无需依赖沉重的图形界面即可流畅操作。\n\n它拥有广泛的模型兼容性，不仅原生支持 Anthropic、OpenAI 和 Google 等主流提供商，还能通过 TensorZero 轻松接入 Ollama、Deepseek 等数十种本地或第三方模型。配合声明式的语法和预置的技能库（Skills），用户可以专注于提示词设计与服务连接，高效实现从原型验证到生产部署的全过程。","\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Ffast-agent-mcp\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ffast-agent-mcp?color=%2334D058&label=pypi\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"#\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Factions\u002Fworkflows\u002Fmain-checks.yml\u002Fbadge.svg\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-raw\u002Fevalstate\u002Ffast-agent\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fxg5cJ7ndN6\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1358470293990936787\" alt=\"discord\" \u002F>\u003C\u002Fa>\n\u003Cimg alt=\"Pepy Total Downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpepy\u002Fdt\u002Ffast-agent-mcp?label=pypi%20%7C%20downloads\"\u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent-mcp\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Ffast-agent-mcp\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n## Start Here\n\n> [!TIP]\n> Please see https:\u002F\u002Ffast-agent.ai for latest documentation.\n\n**`fast-agent`** is a flexible way to interact with LLMs, excellent for use as a Coding Agent, Development Toolkit, Evaluation or Workflow platform.\n\nTo start an interactive session with shell support, install [uv](https:\u002F\u002Fastral.sh\u002Fuv) and run\n\n```bash\nuvx fast-agent-mcp@latest -x\n```\n\nTo start coding with Hugging Face inference providers or use your OpenAI Codex plan:\n\n```bash\n# Code with Hugging Face Inference Providers\nuvx fast-agent-mcp@latest --pack hf-dev\n\n# Code with Codex (agents optimized for OpenAI)\nuvx fast-agent-mcp@latest --pack codex\n```\n\nEnter a shell with `!`, or run shell commands e.g. `! cd web && npm run build`.\n\nManage skills with the `\u002Fskills` command, and connect to MCP Servers with `\u002Fconnect`. The default **`fast-agent`** registry contains skills to let you set up LSP, Agent and Tool Hooks, Compaction strategies, Automation and more.\n\n```bash\n# \u002Fconnect supports stdio or streamable http (with OAuth)\n\n# Start a STDIO server\n\u002Fconnect @modelcontextprotocol\u002Fserver-everything\n\n# Connect to a Streamable HTTP Server\n\u002Fconnect https:\u002F\u002Fhuggingface.co\u002Fmcp\n```\n\nIt's recommended to install **`fast-agent`** to set up the shell aliases and other tooling.\n\n```bash\n# Install fast-agent\nuv tool install -U fast-agent-mcp\n\n# Run fast-agent with opus, shell support and subagent\u002Fsmart mode\nfast-agent --model opus -x --smart\n```\n\nUse local models with the generic provider, or automatically create the correct configuration for `llama.cpp`:\n\n```bash\nfast-agent model llamacpp\n```\n\nAny **`fast-agent`** setup or program can be used with any ACP client - the simplest way is to use `fast-agent-acp`:\n\n```bash\n# Run fast-agent inside Toad\ntoad acp \"fast-agent-acp -x --model sonnet\"\n```\n\n**`fast-agent`** enables you to create and interact with sophisticated multimodal Agents and Workflows in minutes. It is the first framework with complete, end-to-end tested MCP Feature support including Sampling and Elicitations.\n\n`fast-agent` is CLI-first, with an optional prompt_toolkit-powered interactive terminal prompt (TUI-style input, completions, and in-terminal menus); responses can stream live to the terminal via rich without relying on full-screen curses UIs or external GUI overlays.\n\n\u003C!-- ![multi_model_trim](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_e418412f1aaf.png) -->\n\nThe simple declarative syntax lets you concentrate on composing your Prompts and MCP Servers to [build effective agents](https:\u002F\u002Fwww.anthropic.com\u002Fresearch\u002Fbuilding-effective-agents).\n\nModel support is comprehensive with native support for Anthropic, OpenAI and Google providers as well as Azure, Ollama, Deepseek and dozens of others via TensorZero. Structured Outputs, PDF and Vision support is simple to use and well tested. Passthrough and Playback LLMs enable rapid development and test of Python glue-code for your applications.\n\nRecent features include:\n\n- Agent Skills (SKILL.md)\n- MCP-UI Support |\n- OpenAI Apps SDK (Skybridge)\n- Shell Mode\n- Advanced MCP Transport Diagnsotics\n- MCP Elicitations\n\n\u003Cimg width=\"800\"  alt=\"MCP Transport Diagnostics\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_74b7690859d8.png\" \u002F>\n\n`fast-agent` is the only tool that allows you to inspect Streamable HTTP Transport usage - a critical feature for ensuring reliable, compliant deployments. OAuth is supported with KeyRing storage for secrets. Use the `fast-agent auth` command to manage.\n\n> [!IMPORTANT]\n>\n> Documentation is included as a submodule. When cloning, use `--recurse-submodules` to get everything:\n>\n> ```bash\n> git clone --recurse-submodules https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent.git\n> ```\n>\n> Or if you've already cloned:\n>\n> ```bash\n> git submodule update --init --recursive\n> ```\n>\n> The documentation source is also available at: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent-docs\n\n### Agent Application Development\n\nPrompts and configurations that define your Agent Applications are stored in simple files, with minimal boilerplate, enabling simple management and version control.\n\nChat with individual Agents and Components before, during and after workflow execution to tune and diagnose your application. Agents can request human input to get additional context for task completion.\n\nSimple model selection makes testing Model \u003C-> MCP Server interaction painless. You can read more about the motivation behind this project [here](https:\u002F\u002Fllmindset.co.uk\u002Fresources\u002Ffast-agent\u002F)\n\n![2025-03-23-fast-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_b9ff155f77ff.png)\n\n## Get started:\n\nStart by installing the [uv package manager](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F) for Python. Then:\n\n```bash\nuv pip install fast-agent-mcp          # install fast-agent!\nfast-agent go                          # start an interactive session\nfast-agent go --url https:\u002F\u002Fhf.co\u002Fmcp  # with a remote MCP\nfast-agent go --model=generic.qwen2.5  # use ollama qwen 2.5\nfast-agent go --pack analyst --model haiku  # install\u002Freuse a card pack and launch it\nfast-agent scaffold                    # create an example agent and config files\nuv run agent.py                        # run your first agent\nuv run agent.py --model='o3-mini?reasoning=low'    # specify a model\nuv run agent.py --transport http --port 8001  # expose as MCP server (server mode implied)\nfast-agent quickstart workflow  # create \"building effective agents\" examples\n```\n\n`--server` remains available for backward compatibility but is deprecated; `--transport` now automatically switches an agent into server mode.\n\nFor packaged starter agents, use `fast-agent go --pack \u003Cname> --model \u003Cmodel>`.\nThis installs the pack into the selected fast-agent environment if needed, then\nstarts `go` normally. `--model` is a fallback for cards without an explicit\nmodel setting; a model declared directly in an AgentCard still wins.\n\nOther quickstart examples include a Researcher Agent (with Evaluator-Optimizer workflow) and Data Analysis Agent (similar to the ChatGPT experience), demonstrating MCP Roots support.\n\n> [!TIP]\n> Windows Users - there are a couple of configuration changes needed for the Filesystem and Docker MCP Servers - necessary changes are detailed within the configuration files.\n\n### Basic Agents\n\nDefining an agent is as simple as:\n\n```python\n@fast.agent(\n  instruction=\"Given an object, respond only with an estimate of its size.\"\n)\n```\n\nWe can then send messages to the Agent:\n\n```python\nasync with fast.run() as agent:\n  moon_size = await agent(\"the moon\")\n  print(moon_size)\n```\n\nOr start an interactive chat with the Agent:\n\n```python\nasync with fast.run() as agent:\n  await agent.interactive()\n```\n\nHere is the complete `sizer.py` Agent application, with boilerplate code:\n\n```python\nimport asyncio\nfrom fast_agent import FastAgent\n\n# Create the application\nfast = FastAgent(\"Agent Example\")\n\n@fast.agent(\n  instruction=\"Given an object, respond only with an estimate of its size.\"\n)\nasync def main():\n  async with fast.run() as agent:\n    await agent.interactive()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\nThe Agent can then be run with `uv run sizer.py`.\n\nSpecify a model with the `--model` switch - for example `uv run sizer.py --model sonnet`.\n\nModel strings also accept query overrides. For example:\n\n- `uv run sizer.py --model \"gpt-5?reasoning=low\"`\n- `uv run sizer.py --model \"claude-sonnet-4-6?web_search=on\"`\n- `uv run sizer.py --model \"claude-sonnet-4-5?context=1m\"`\n\nFor Anthropic models, `?context=1m` is only needed for earlier Sonnet 4 \u002F Sonnet 4.5\nmodels that still require the explicit 1M context opt-in. Claude Sonnet 4.6 and\nClaude Opus 4.6 already use their long context window by default, so `?context=1m`\nis accepted for backward compatibility but is unnecessary there.\n\n### Combining Agents and using MCP Servers\n\n_To generate examples use `fast-agent quickstart workflow`. This example can be run with `uv run workflow\u002Fchaining.py`. fast-agent looks for configuration files in the current directory before checking parent directories recursively._\n\nAgents can be chained to build a workflow, using MCP Servers defined in the `fastagent.config.yaml` file:\n\n```python\n@fast.agent(\n    \"url_fetcher\",\n    \"Given a URL, provide a complete and comprehensive summary\",\n    servers=[\"fetch\"], # Name of an MCP Server defined in fastagent.config.yaml\n)\n@fast.agent(\n    \"social_media\",\n    \"\"\"\n    Write a 280 character social media post for any given text.\n    Respond only with the post, never use hashtags.\n    \"\"\",\n)\n@fast.chain(\n    name=\"post_writer\",\n    sequence=[\"url_fetcher\", \"social_media\"],\n)\nasync def main():\n    async with fast.run() as agent:\n        # using chain workflow\n        await agent.post_writer(\"http:\u002F\u002Fllmindset.co.uk\")\n```\n\nAll Agents and Workflows respond to `.send(\"message\")` or `.prompt()` to begin a chat session.\n\nSaved as `social.py` we can now run this workflow from the command line with:\n\n```bash\nuv run workflow\u002Fchaining.py --agent post_writer --message \"\u003Curl>\"\n```\n\nAdd the `--quiet` switch to disable progress and message display and return only the final response - useful for simple automations.\n\n### MAKER\n\nMAKER (“Massively decomposed Agentic processes with K-voting Error Reduction”) wraps a worker agent and samples it repeatedly until a response achieves a k-vote margin over all alternatives (“first-to-ahead-by-k” voting). This is useful for long chains of simple steps where rare errors would otherwise compound.\n\n- Reference: [Solving a Million-Step LLM Task with Zero Errors](https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09030)\n- Credit: Lucid Programmer (PR author)\n\n```python\n@fast.agent(\n  name=\"classifier\",\n  instruction=\"Reply with only: A, B, or C.\",\n)\n@fast.maker(\n  name=\"reliable_classifier\",\n  worker=\"classifier\",\n  k=3,\n  max_samples=25,\n  match_strategy=\"normalized\",\n  red_flag_max_length=16,\n)\nasync def main():\n  async with fast.run() as agent:\n    await agent.reliable_classifier.send(\"Classify: ...\")\n```\n\n### Agents As Tools\n\nThe Agents As Tools workflow takes a complex task, breaks it into subtasks, and calls other agents as tools based on the main agent instruction.\n\nThis pattern is inspired by the OpenAI Agents SDK [Agents as tools](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-python\u002Ftools\u002F#agents-as-tools) feature.\n\nWith child agents exposed as tools, you can implement routing, parallelization, and orchestrator-workers [decomposition](https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fbuilding-effective-agents) directly in the instruction (and combine them). Multiple tool calls per turn are supported and executed in parallel.\n\nCommon usage patterns may combine:\n\n- Routing: choose the right specialist tool(s) based on the user prompt.\n- Parallelization: fan out over independent items\u002Fprojects, then aggregate.\n- Orchestrator-workers: break a task into scoped subtasks (often via a simple JSON plan), then coordinate execution.\n\n```python\n@fast.agent(\n    name=\"NY-Project-Manager\",\n    instruction=\"Return NY time + timezone, plus a one-line project status.\",\n    servers=[\"time\"],\n)\n@fast.agent(\n    name=\"London-Project-Manager\",\n    instruction=\"Return London time + timezone, plus a one-line news update.\",\n    servers=[\"time\"],\n)\n@fast.agent(\n    name=\"PMO-orchestrator\",\n    instruction=(\n        \"Get reports. Always use one tool call per project\u002Fnews. \"  # parallelization\n        \"Responsibilities: NY projects: [OpenAI, Fast-Agent, Anthropic]. London news: [Economics, Art, Culture]. \"  # routing\n        \"Aggregate results and add a one-line PMO summary.\"\n    ),\n    default=True,\n    agents=[\"NY-Project-Manager\", \"London-Project-Manager\"],  # orchestrator-workers\n)\nasync def main() -> None:\n    async with fast.run() as agent:\n        await agent(\"Get PMO report. Projects: all. News: Art, Culture\")\n```\n\nExtended example and all params sample is available in the repository as\n[`examples\u002Fworkflows\u002Fagents_as_tools_extended.py`](examples\u002Fworkflows\u002Fagents_as_tools_extended.py).\n\n## MCP OAuth (v2.1)\n\nFor SSE and HTTP MCP servers, OAuth is enabled by default with minimal configuration. A local callback server is used to capture the authorization code, with a paste-URL fallback if the port is unavailable.\n\n- Minimal per-server settings in `fastagent.config.yaml`:\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      transport: http # or sse\n      url: http:\u002F\u002Flocalhost:8001\u002Fmcp # or \u002Fsse for SSE servers\n      auth:\n        oauth: true # default: true\n        redirect_port: 3030 # default: 3030\n        redirect_path: \u002Fcallback # default: \u002Fcallback\n        # scope: \"user\"       # optional; if omitted, server defaults are used\n```\n\n- The OAuth client uses PKCE and in-memory token storage (no tokens written to disk).\n- Token persistence: by default, tokens are stored securely in your OS keychain via `keyring`. If a keychain is unavailable (e.g., headless container), in-memory storage is used for the session.\n- To force in-memory only per server, set:\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      transport: http\n      url: http:\u002F\u002Flocalhost:8001\u002Fmcp\n      auth:\n        oauth: true\n        persist: memory\n```\n\n- To disable OAuth for a specific server , set `auth.oauth: false` for that server.\n\n## MCP Ping (optional)\n\nThe MCP ping utility can be enabled by either peer (client or server). See the [Ping overview](https:\u002F\u002Fmodelcontextprotocol.io\u002Fspecification\u002F2025-11-25\u002Fbasic\u002Futilities\u002Fping#overview).\n\nClient-side pinging is configured per server (default: 30s interval, 3 missed pings):\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      ping_interval_seconds: 30 # optional; \u003C=0 disables\n      max_missed_pings: 3 # optional; consecutive timeouts before marking failed\n```\n\n## Workflows\n\n### Chain\n\nThe `chain` workflow offers a more declarative approach to calling Agents in sequence:\n\n```python\n\n@fast.chain(\n  \"post_writer\",\n   sequence=[\"url_fetcher\",\"social_media\"]\n)\n\n# we can them prompt it directly:\nasync with fast.run() as agent:\n  await agent.post_writer()\n\n```\n\nThis starts an interactive session, which produces a short social media post for a given URL. If a _chain_ is prompted it returns to a chat with last Agent in the chain. You can switch the agent to prompt by typing `@agent-name`.\n\nChains can be incorporated in other workflows, or contain other workflow elements (including other Chains). You can set an `instruction` to precisely describe it's capabilities to other workflow steps if needed.\n\n### Human Input\n\nAgents can request Human Input to assist with a task or get additional context:\n\n```python\n@fast.agent(\n    instruction=\"An AI agent that assists with basic tasks. Request Human Input when needed.\",\n    human_input=True,\n)\n\nawait agent(\"print the next number in the sequence\")\n```\n\nIn the example `human_input.py`, the Agent will prompt the User for additional information to complete the task.\n\n### Parallel\n\nThe Parallel Workflow sends the same message to multiple Agents simultaneously (`fan-out`), then uses the `fan-in` Agent to process the combined content.\n\n```python\n@fast.agent(\"translate_fr\", \"Translate the text to French\")\n@fast.agent(\"translate_de\", \"Translate the text to German\")\n@fast.agent(\"translate_es\", \"Translate the text to Spanish\")\n\n@fast.parallel(\n  name=\"translate\",\n  fan_out=[\"translate_fr\",\"translate_de\",\"translate_es\"]\n)\n\n@fast.chain(\n  \"post_writer\",\n   sequence=[\"url_fetcher\",\"social_media\",\"translate\"]\n)\n```\n\nIf you don't specify a `fan-in` agent, the `parallel` returns the combined Agent results verbatim.\n\n`parallel` is also useful to ensemble ideas from different LLMs.\n\nWhen using `parallel` in other workflows, specify an `instruction` to describe its operation.\n\n### Evaluator-Optimizer\n\nEvaluator-Optimizers combine 2 agents: one to generate content (the `generator`), and the other to judge that content and provide actionable feedback (the `evaluator`). Messages are sent to the generator first, then the pair run in a loop until either the evaluator is satisfied with the quality, or the maximum number of refinements is reached. The final result from the Generator is returned.\n\nIf the Generator has `use_history` off, the previous iteration is returned when asking for improvements - otherwise conversational context is used.\n\n```python\n@fast.evaluator_optimizer(\n  name=\"researcher\",\n  generator=\"web_searcher\",\n  evaluator=\"quality_assurance\",\n  min_rating=\"EXCELLENT\",\n  max_refinements=3\n)\n\nasync with fast.run() as agent:\n  await agent.researcher.send(\"produce a report on how to make the perfect espresso\")\n```\n\nWhen used in a workflow, it returns the last `generator` message as the result.\n\nSee the `evaluator.py` workflow example, or `fast-agent quickstart researcher` for a more complete example.\n\n### Router\n\nRouters use an LLM to assess a message, and route it to the most appropriate Agent. The routing prompt is automatically generated based on the Agent instructions and available Servers.\n\n```python\n@fast.router(\n  name=\"route\",\n  agents=[\"agent1\",\"agent2\",\"agent3\"]\n)\n```\n\nLook at the `router.py` workflow for an example.\n\n### Orchestrator\n\nGiven a complex task, the Orchestrator uses an LLM to generate a plan to divide the task amongst the available Agents. The planning and aggregation prompts are generated by the Orchestrator, which benefits from using more capable models. Plans can either be built once at the beginning (`plan_type=\"full\"`) or iteratively (`plan_type=\"iterative\"`).\n\n```python\n@fast.orchestrator(\n  name=\"orchestrate\",\n  agents=[\"task1\",\"task2\",\"task3\"]\n)\n```\n\nSee the `orchestrator.py` or `agent_build.py` workflow example.\n\n## Agent Features\n\n### Calling Agents\n\nAll definitions allow omitting the name and instructions arguments for brevity:\n\n```python\n@fast.agent(\"You are a helpful agent\")          # Create an agent with a default name.\n@fast.agent(\"greeter\",\"Respond cheerfully!\")    # Create an agent with the name \"greeter\"\n\nmoon_size = await agent(\"the moon\")             # Call the default (first defined agent) with a message\n\nresult = await agent.greeter(\"Good morning!\")   # Send a message to an agent by name using dot notation\nresult = await agent.greeter.send(\"Hello!\")     # You can call 'send' explicitly\n\nawait agent.greeter()                           # If no message is specified, a chat session will open\nawait agent.greeter.prompt()                    # that can be made more explicit\nawait agent.greeter.prompt(default_prompt=\"OK\") # and supports setting a default prompt\n\nagent[\"greeter\"].send(\"Good Evening!\")          # Dictionary access is supported if preferred\n```\n\n### Defining Agents\n\n#### Basic Agent\n\n```python\n@fast.agent(\n  name=\"agent\",                          # name of the agent\n  instruction=\"You are a helpful Agent\", # base instruction for the agent\n  servers=[\"filesystem\"],                # list of MCP Servers for the agent\n  model=\"o3-mini?reasoning=high\",        # specify a model for the agent\n  use_history=True,                      # agent maintains chat history\n  request_params=RequestParams(temperature= 0.7), # additional parameters for the LLM (or RequestParams())\n  human_input=True,                      # agent can request human input\n)\n```\n\n#### Chain\n\n```python\n@fast.chain(\n  name=\"chain\",                          # name of the chain\n  sequence=[\"agent1\", \"agent2\", ...],    # list of agents in execution order\n  instruction=\"instruction\",             # instruction to describe the chain for other workflows\n  cumulative=False,                      # whether to accumulate messages through the chain\n  continue_with_final=True,              # open chat with agent at end of chain after prompting\n)\n```\n\n#### Parallel\n\n```python\n@fast.parallel(\n  name=\"parallel\",                       # name of the parallel workflow\n  fan_out=[\"agent1\", \"agent2\"],          # list of agents to run in parallel\n  fan_in=\"aggregator\",                   # name of agent that combines results (optional)\n  instruction=\"instruction\",             # instruction to describe the parallel for other workflows\n  include_request=True,                  # include original request in fan-in message\n)\n```\n\n#### Evaluator-Optimizer\n\n```python\n@fast.evaluator_optimizer(\n  name=\"researcher\",                     # name of the workflow\n  generator=\"web_searcher\",              # name of the content generator agent\n  evaluator=\"quality_assurance\",         # name of the evaluator agent\n  min_rating=\"GOOD\",                     # minimum acceptable quality (EXCELLENT, GOOD, FAIR, POOR)\n  max_refinements=3,                     # maximum number of refinement iterations\n)\n```\n\n#### Router\n\n```python\n@fast.router(\n  name=\"route\",                          # name of the router\n  agents=[\"agent1\", \"agent2\", \"agent3\"], # list of agent names router can delegate to\n  model=\"o3-mini?reasoning=high\",        # specify routing model\n  use_history=False,                     # router maintains conversation history\n  human_input=False,                     # whether router can request human input\n)\n```\n\n#### Orchestrator\n\n```python\n@fast.orchestrator(\n  name=\"orchestrator\",                   # name of the orchestrator\n  instruction=\"instruction\",             # base instruction for the orchestrator\n  agents=[\"agent1\", \"agent2\"],           # list of agent names this orchestrator can use\n  model=\"o3-mini?reasoning=high\",        # specify orchestrator planning model\n  use_history=False,                     # orchestrator doesn't maintain chat history (no effect).\n  human_input=False,                     # whether orchestrator can request human input\n  plan_type=\"full\",                      # planning approach: \"full\" or \"iterative\"\n  plan_iterations=5,                     # maximum number of full plan attempts, or iterations\n)\n```\n\n#### MAKER\n\n```python\n@fast.maker(\n  name=\"maker\",                           # name of the workflow\n  worker=\"worker_agent\",                  # worker agent name\n  k=3,                                    # voting margin (first-to-ahead-by-k)\n  max_samples=50,                         # maximum number of samples\n  match_strategy=\"exact\",                 # exact|normalized|structured\n  red_flag_max_length=256,                # flag unusually long outputs\n  instruction=\"instruction\",              # optional instruction override\n)\n```\n\n#### Agents As Tools\n\n```python\n@fast.agent(\n  name=\"orchestrator\",                    # orchestrator agent name\n  instruction=\"instruction\",              # orchestrator instruction (routing\u002Fdecomposition\u002Faggregation)\n  agents=[\"agent1\", \"agent2\"],            # exposed as tools: agent__agent1, agent__agent2\n  max_parallel=128,                       # cap parallel child tool calls (OpenAI limit is 128)\n  child_timeout_sec=600,                  # per-child timeout (seconds)\n  max_display_instances=20,               # collapse progress display after top-N instances\n)\n```\n\n### Function Tools\n\nRegister Python functions as tools directly in code — no MCP server or external file needed. Both sync and async functions are supported. The function name and docstring are used as the tool name and description by default, or you can override them with `name=` and `description=`.\n\n**Per-agent tools (`@agent.tool`)** — scope a tool to a specific agent:\n\n```python\n@fast.agent(name=\"writer\", instruction=\"You write things.\")\nasync def writer(): ...\n\n@writer.tool\ndef translate(text: str, language: str) -> str:\n    \"\"\"Translate text to the given language.\"\"\"\n    return f\"[{language}] {text}\"\n\n@writer.tool(name=\"summarize\", description=\"Produce a one-line summary\")\ndef summarize(text: str) -> str:\n    return f\"Summary: {text[:80]}...\"\n```\n\n**Global tools (`@fast.tool`)** — available to all agents that don't declare their own tools:\n\n```python\n@fast.tool\ndef get_weather(city: str) -> str:\n    \"\"\"Return the current weather for a city.\"\"\"\n    return f\"Sunny in {city}\"\n\n@fast.agent(name=\"assistant\", instruction=\"You are helpful.\")\n# assistant gets get_weather (global @fast.tool)\n```\n\nAgents with `@agent.tool` or `function_tools=` only see their own tools — globals are not injected. Use `function_tools=[]` to explicitly opt out of globals with no tools.\n\n### Multimodal Support\n\nAdd Resources to prompts using either the inbuilt `prompt-server` or MCP Types directly. Convenience class are made available to do so simply, for example:\n\n```python\n  summary: str =  await agent.with_resource(\n      \"Summarise this PDF please\",\n      \"mcp_server\",\n      \"resource:\u002F\u002Ffast-agent\u002Fsample.pdf\",\n  )\n```\n\n#### MCP Tool Result Conversion\n\nLLM APIs have restrictions on the content types that can be returned as Tool Calls\u002FFunction results via their Chat Completions API's:\n\n- OpenAI supports Text\n- Anthropic supports Text and Image\n- Google supports Text, Image, PDF, and Video (e.g., `video\u002Fmp4`).\n  > **Note**: Inline video data is limited to 20MB. For larger files, use the File API. YouTube URLs are supported directly.\n\nFor MCP Tool Results, `ImageResources` and `EmbeddedResources` are converted to User Messages and added to the conversation.\n\n### Prompts\n\nMCP Prompts are supported with `apply_prompt(name,arguments)`, which always returns an Assistant Message. If the last message from the MCP Server is a 'User' message, it is sent to the LLM for processing. Prompts applied to the Agent's Context are retained - meaning that with `use_history=False`, Agents can act as finely tuned responders.\n\nPrompts can also be applied interactively through the interactive interface by using the `\u002Fprompt` command.\n\n### Sampling\n\nSampling LLMs are configured per Client\u002FServer pair. Specify the model name in fastagent.config.yaml as follows:\n\n```yaml\nmcp:\n  servers:\n    sampling_resource:\n      command: \"uv\"\n      args: [\"run\", \"sampling_resource_server.py\"]\n      sampling:\n        model: \"haiku\"\n```\n\n### Secrets File\n\n> [!TIP]\n> fast-agent will look recursively for a fastagent.secrets.yaml file, so you only need to manage this at the root folder of your agent definitions.\n\n### Interactive Shell\n\n![fast-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_3fa0846ff880.png)\n\n## Documentation\n\nThe documentation site is included as a submodule in `docs\u002F`. To work with the docs locally:\n\n```bash\n# Install docs dependencies (first time only)\nuv run scripts\u002Fdocs.py install\n\n# Generate reference docs from source code\nuv run scripts\u002Fdocs.py generate\n\n# Run the dev server (http:\u002F\u002F127.0.0.1:8000)\nuv run scripts\u002Fdocs.py serve\n\n# Or generate and serve in one command\nuv run scripts\u002Fdocs.py all\n```\n\nThe generator extracts configuration field descriptions, model aliases, and API references directly from the source code to keep documentation in sync.\n\n## Project Notes\n\n`fast-agent` builds on the [`mcp-agent`](https:\u002F\u002Fgithub.com\u002Flastmile-ai\u002Fmcp-agent) project by Sarmad Qadri.\n\n### Contributing\n\nContributions and PRs are welcome - feel free to raise issues to discuss. Full guidelines for contributing and roadmap coming very soon. Get in touch!\n","\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fpypi.org\u002Fproject\u002Ffast-agent-mcp\u002F\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fv\u002Ffast-agent-mcp?color=%2334D058&label=pypi\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"#\">\u003Cimg src=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Factions\u002Fworkflows\u002Fmain-checks.yml\u002Fbadge.svg\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fgithub\u002Fissues-raw\u002Fevalstate\u002Ffast-agent\" \u002F>\u003C\u002Fa>\n\u003Ca href=\"https:\u002F\u002Fdiscord.gg\u002Fxg5cJ7ndN6\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fdiscord\u002F1358470293990936787\" alt=\"discord\" \u002F>\u003C\u002Fa>\n\u003Cimg alt=\"Pepy Total Downloads\" src=\"https:\u002F\u002Fimg.shields.io\u002Fpepy\u002Fdt\u002Ffast-agent-mcp?label=pypi%20%7C%20downloads\"\u002F>\n\u003Ca href=\"https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent-mcp\u002Fblob\u002Fmain\u002FLICENSE\">\u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fpypi\u002Fl\u002Ffast-agent-mcp\" \u002F>\u003C\u002Fa>\n\u003C\u002Fp>\n\n## 从这里开始\n\n> [!TIP]\n> 请参阅 https:\u002F\u002Ffast-agent.ai 获取最新文档。\n\n**`fast-agent`** 是一种灵活的与大语言模型交互的方式，非常适合作为编码助手、开发工具包、评估平台或工作流平台使用。\n\n要启动一个支持 Shell 的交互式会话，请安装 [uv](https:\u002F\u002Fastral.sh\u002Fuv) 并运行：\n\n```bash\nuvx fast-agent-mcp@latest -x\n```\n\n要使用 Hugging Face 推理服务进行编码，或者使用你的 OpenAI Codex 计划：\n\n```bash\n# 使用 Hugging Face 推理服务编码\nuvx fast-agent-mcp@latest --pack hf-dev\n\n# 使用 Codex 编码（针对 OpenAI 优化的助手）\nuvx fast-agent-mcp@latest --pack codex\n```\n\n通过输入 `!` 进入 Shell，或者直接运行 Shell 命令，例如 `! cd web && npm run build`。\n\n使用 `\u002Fskills` 命令管理技能，并用 `\u002Fconnect` 连接到 MCP 服务器。默认的 **`fast-agent`** 注册表包含许多技能，可以帮助你设置 LSP、代理和工具钩子、压缩策略、自动化等功能。\n\n```bash\n# \u002Fconnect 支持标准输入输出或可流式传输的 HTTP（带 OAuth）\n\n# 启动一个 STDIO 服务器\n\u002Fconnect @modelcontextprotocol\u002Fserver-everything\n\n# 连接到一个可流式传输的 HTTP 服务器\n\u002Fconnect https:\u002F\u002Fhuggingface.co\u002Fmcp\n```\n\n建议安装 **`fast-agent`**，以便设置 Shell 别名和其他工具。\n\n```bash\n# 安装 fast-agent\nuv tool install -U fast-agent-mcp\n\n# 以 opus 模型、Shell 支持及子代理\u002F智能模式运行 fast-agent\nfast-agent --model opus -x --smart\n```\n\n你可以使用通用提供者来运行本地模型，或者自动生成适用于 `llama.cpp` 的正确配置：\n\n```bash\nfast-agent model llamacpp\n```\n\n任何 **`fast-agent`** 配置或程序都可以与任意 ACP 客户端配合使用，最简单的方式是使用 `fast-agent-acp`：\n\n```bash\n# 在 Toad 中运行 fast-agent\ntoad acp \"fast-agent-acp -x --model sonnet\"\n```\n\n**`fast-agent`** 能够让你在几分钟内创建并交互复杂的多模态代理和工作流。它是首个具备完整端到端测试的 MCP 功能支持框架，包括采样和诱导机制。\n\n`fast-agent` 以命令行优先，同时提供一个可选的基于 prompt_toolkit 的交互式终端界面（TUI 风格的输入、补全和终端内菜单）；响应可以实时流式传输到终端，无需依赖全屏的 curses 界面或外部 GUI 叠加层。\n\n\u003C!-- ![multi_model_trim](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_e418412f1aaf.png) -->\n\n简单的声明式语法使你可以专注于编写提示词和 MCP 服务器配置，从而 [构建高效的代理](https:\u002F\u002Fwww.anthropic.com\u002Fresearch\u002Fbuilding-effective-agents)。\n\n模型支持非常全面，原生支持 Anthropic、OpenAI 和 Google 提供者，以及通过 TensorZero 支持 Azure、Ollama、Deepseek 等数十家厂商。结构化输出、PDF 和视觉功能的使用简单且经过充分测试。透传和回放 LLM 使你能够快速开发和测试应用程序中的 Python 胶水代码。\n\n近期新增功能包括：\n\n- 代理技能 (SKILL.md)\n- MCP-UI 支持\n- OpenAI Apps SDK（Skybridge）\n- Shell 模式\n- 高级 MCP 传输诊断\n- MCP 诱导机制\n\n\u003Cimg width=\"800\"  alt=\"MCP 传输诊断\" src=\"https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_74b7690859d8.png\" \u002F>\n\n`fast-agent` 是唯一一款能够检查可流式传输 HTTP 传输使用情况的工具，这一功能对于确保可靠、合规的部署至关重要。它支持 OAuth，并使用 KeyRing 存储机密信息。请使用 `fast-agent auth` 命令进行管理。\n\n> [!IMPORTANT]\n>\n> 文档以子模块形式包含在内。克隆时，请使用 `--recurse-submodules` 参数以获取所有内容：\n>\n> ```bash\n> git clone --recurse-submodules https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent.git\n> ```\n>\n> 或者，如果你已经克隆过仓库：\n>\n> ```bash\n> git submodule update --init --recursive\n> ```\n>\n> 文档源也可在以下地址查看：https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent-docs\n\n### 代理应用开发\n\n定义你的代理应用的提示词和配置存储在简单的文件中，几乎没有样板代码，便于管理和版本控制。\n\n在工作流执行之前、期间和之后，都可以与各个代理和组件进行对话，以调整和诊断你的应用。代理还可以请求人工输入，以获取完成任务所需的额外上下文。\n\n简单的模型选择使得测试模型与 MCP 服务器之间的交互变得轻松无压。你可以在此处了解更多关于该项目的背景信息 [here](https:\u002F\u002Fllmindset.co.uk\u002Fresources\u002Ffast-agent\u002F)。\n\n![2025-03-23-fast-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_b9ff155f77ff.png)\n\n## 开始使用：\n\n首先安装 Python 的 [uv 包管理器](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F)。然后执行以下命令：\n\n```bash\nuv pip install fast-agent-mcp          # 安装 fast-agent！\nfast-agent go                          # 启动交互式会话\nfast-agent go --url https:\u002F\u002Fhf.co\u002Fmcp  # 使用远程 MCP\nfast-agent go --model=generic.qwen2.5  # 使用 Ollama Qwen 2.5 模型\nfast-agent go --pack analyst --model haiku  # 安装\u002F复用卡片包并启动\nfast-agent scaffold                    # 创建示例智能体及配置文件\nuv run agent.py                        # 运行你的第一个智能体\nuv run agent.py --model='o3-mini?reasoning=low'    # 指定模型\nuv run agent.py --transport http --port 8001  # 以 MCP 服务器模式暴露（自动进入服务器模式）\nfast-agent quickstart workflow  # 创建“构建高效智能体”的示例\n```\n\n`--server` 参数仍可用于向后兼容，但已被弃用；现在 `--transport` 会自动将智能体切换到服务器模式。\n\n对于预打包的入门智能体，可使用 `fast-agent go --pack \u003Cname> --model \u003Cmodel>`。这会在必要时将卡片包安装到选定的 fast-agent 环境中，然后正常启动 `go`。`--model` 是一个备用选项，用于那些未明确指定模型的卡片；如果 `AgentCard` 中直接声明了模型，则优先使用该模型。\n\n其他快速入门示例包括研究者智能体（带有评估-优化工作流）和数据分析智能体（类似 ChatGPT 的体验），展示了对 MCP Roots 的支持。\n\n> [!TIP]\n> Windows 用户：文件系统和 Docker MCP 服务器需要进行一些配置更改——具体更改已在配置文件中详细说明。\n\n### 基础智能体\n\n定义一个智能体非常简单：\n\n```python\n@fast.agent(\n  instruction=\"给定一个物体，仅回答其大小的估计值。\"\n)\n```\n\n随后我们可以向智能体发送消息：\n\n```python\nasync with fast.run() as agent:\n  moon_size = await agent(\"月球\")\n  print(moon_size)\n```\n\n或者与智能体进行交互式对话：\n\n```python\nasync with fast.run() as agent:\n  await agent.interactive()\n```\n\n以下是完整的 `sizer.py` 智能体应用，包含样板代码：\n\n```python\nimport asyncio\nfrom fast_agent import FastAgent\n\n# 创建应用\nfast = FastAgent(\"示例智能体\")\n\n@fast.agent(\n  instruction=\"给定一个物体，仅回答其大小的估计值。\"\n)\nasync def main():\n  async with fast.run() as agent:\n    await agent.interactive()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n之后可以使用 `uv run sizer.py` 来运行该智能体。\n\n通过 `--model` 参数指定模型——例如 `uv run sizer.py --model sonnet`。\n\n模型字符串还支持查询覆盖。例如：\n\n- `uv run sizer.py --model \"gpt-5?reasoning=low\"`\n- `uv run sizer.py --model \"claude-sonnet-4-6?web_search=on\"`\n- `uv run sizer.py --model \"claude-sonnet-4-5?context=1m\"`\n\n对于 Anthropic 模型，`?context=1m` 仅适用于较早的 Sonnet 4 和 Sonnet 4.5 版本，这些版本仍需显式启用 1M 上下文窗口。而 Claude Sonnet 4.6 和 Claude Opus 4.6 默认已使用长上下文窗口，因此 `?context=1m` 虽然仍被接受以保持向后兼容性，但在这些模型上并无实际意义。\n\n### 智能体组合与 MCP 服务器的使用\n\n_要生成示例，请使用 `fast-agent quickstart workflow`。此示例可通过 `uv run workflow\u002Fchaining.py` 运行。fast-agent 会先在当前目录中查找配置文件，然后再递归检查父目录。_\n\n可以通过在 `fastagent.config.yaml` 文件中定义的 MCP 服务器，将多个智能体串联起来构建工作流：\n\n```python\n@fast.agent(\n    \"url_fetcher\",\n    \"给定一个 URL，提供完整且全面的摘要\",\n    servers=[\"fetch\"], # 在 fastagent.config.yaml 中定义的 MCP 服务器名称\n)\n@fast.agent(\n    \"social_media\",\n    \"\"\"\n    根据任意文本撰写一条 280 字符的社交媒体帖子。\n    只回复帖子内容，绝不使用标签。\n    \"\"\",\n)\n@fast.chain(\n    name=\"post_writer\",\n    sequence=[\"url_fetcher\", \"social_media\"],\n)\nasync def main():\n    async with fast.run() as agent:\n        # 使用链式工作流\n        await agent.post_writer(\"http:\u002F\u002Fllmindset.co.uk\")\n```\n\n所有智能体和工作流都可通过 `.send(\"message\")` 或 `.prompt()` 来开启聊天会话。\n\n将其保存为 `social.py` 后，我们可以在命令行中运行此工作流：\n\n```bash\nuv run workflow\u002Fchaining.py --agent post_writer --message \"\u003Curl>\"\n```\n\n添加 `--quiet` 参数可禁用进度和消息显示，仅返回最终响应——这对于简单的自动化任务非常有用。\n\n### MAKER\n\nMAKER（“大规模分解式代理流程，结合 K 投票误差减少”）封装了一个工作者智能体，并反复采样，直到某个响应在所有备选方案中领先 k 票为止（即“率先领先 k 票”的投票机制）。这对于由许多简单步骤组成的长链条非常有用，因为在这种情况下，罕见的错误可能会不断累积。\n\n- 参考文献：[零错误解决百万步 LLM 任务](https:\u002F\u002Farxiv.org\u002Fabs\u002F2511.09030)\n- 致谢：Lucid Programmer（论文作者）\n\n```python\n@fast.agent(\n  name=\"classifier\",\n  instruction=\"仅回复：A、B 或 C。\",\n)\n@fast.maker(\n  name=\"reliable_classifier\",\n  worker=\"classifier\",\n  k=3,\n  max_samples=25,\n  match_strategy=\"normalized\",\n  red_flag_max_length=16,\n)\nasync def main():\n  async with fast.run() as agent:\n    await agent.reliable_classifier.send(\"分类：...\")\n```\n\n### 代理作为工具\n\n“代理作为工具”工作流会将一个复杂任务拆分为多个子任务，并根据主代理的指令调用其他代理作为工具来完成这些子任务。\n\n这种模式受到 OpenAI Agents SDK 中“代理作为工具”功能的启发 [Agents as tools](https:\u002F\u002Fopenai.github.io\u002Fopenai-agents-python\u002Ftools\u002F#agents-as-tools)。\n\n通过将子代理暴露为工具，你可以在指令中直接实现路由、并行化以及协调者-工作者式的[分解](https:\u002F\u002Fwww.anthropic.com\u002Fengineering\u002Fbuilding-effective-agents)，并且还可以将它们组合起来。每一轮支持多次工具调用，并且这些调用会并行执行。\n\n常见的使用模式可能包括：\n\n- 路由：根据用户提示选择合适的专家工具。\n- 并行化：针对独立的项目或任务进行分流处理，随后再汇总结果。\n- 协调者-工作者模式：将任务分解为具有明确范围的子任务（通常通过一个简单的 JSON 计划），然后协调这些子任务的执行。\n\n```python\n@fast.agent(\n    name=\"NY-项目经理\",\n    instruction=\"返回纽约时间及所在时区，并附上一行项目状态。\",\n    servers=[\"time\"],\n)\n@fast.agent(\n    name=\"伦敦-项目经理\",\n    instruction=\"返回伦敦时间及所在时区，并附上一行新闻简报。\",\n    servers=[\"time\"],\n)\n@fast.agent(\n    name=\"PMO-协调器\",\n    instruction=(\n        \"获取报告。每个项目\u002F新闻始终使用一次工具调用。\"  # 并行化\n        \"职责：纽约项目：[OpenAI、Fast-Agent、Anthropic]。伦敦新闻：[经济、艺术、文化]。\"  # 路由\n        \"汇总结果，并添加一行 PMO 总结。\"\n    ),\n    default=True,\n    agents=[\"NY-项目经理\", \"伦敦-项目经理\"],  # 协调者-工作者\n)\nasync def main() -> None:\n    async with fast.run() as agent:\n        await agent(\"获取 PMO 报告。项目：全部。新闻：艺术、文化\")\n```\n\n扩展示例及所有参数的完整代码可在仓库中的 [`examples\u002Fworkflows\u002Fagents_as_tools_extended.py`](examples\u002Fworkflows\u002Fagents_as_tools_extended.py) 文件中找到。\n\n## MCP OAuth (v2.1)\n\n对于 SSE 和 HTTP MCP 服务器，默认情况下只需极少配置即可启用 OAuth。系统会使用本地回调服务器来捕获授权码；如果端口不可用，则会回退到粘贴式 URL 的方式。\n\n- 每个服务器在 `fastagent.config.yaml` 中所需的最少设置如下：\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      transport: http # 或 sse\n      url: http:\u002F\u002Flocalhost:8001\u002Fmcp # 或 \u002Fsse 用于 SSE 服务器\n      auth:\n        oauth: true # 默认值为 true\n        redirect_port: 3030 # 默认值为 3030\n        redirect_path: \u002Fcallback # 默认值为 \u002Fcallback\n        # scope: \"user\"       # 可选；若未指定，则使用服务器默认值\n```\n\n- OAuth 客户端采用 PKCE 流程，并使用内存中存储令牌（不会将令牌写入磁盘）。\n- 令牌持久化：默认情况下，令牌会通过 `keyring` 安全地存储在操作系统的密钥链中。如果无法使用密钥链（例如在无头容器中），则会在会话期间使用内存存储。\n- 若要强制每个服务器仅使用内存存储，可设置如下：\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      transport: http\n      url: http:\u002F\u002Flocalhost:8001\u002Fmcp\n      auth:\n        oauth: true\n        persist: memory\n```\n\n- 若要为特定服务器禁用 OAuth，只需将该服务器的 `auth.oauth` 设置为 `false` 即可。\n\n## MCP Ping（可选）\n\nMCP ping 工具可以由客户端或服务器任意一方启用。详情请参阅 [Ping 概述](https:\u002F\u002Fmodelcontextprotocol.io\u002Fspecification\u002F2025-11-25\u002Fbasic\u002Futilities\u002Fping#overview)。\n\n客户端侧的 ping 配置是按服务器进行的（默认间隔 30 秒，允许连续错过 3 次）：\n\n```yaml\nmcp:\n  servers:\n    myserver:\n      ping_interval_seconds: 30 # 可选；设置为 0 或更小则禁用\n      max_missed_pings: 3 # 可选；连续超时次数达到此值后标记为失败\n```\n\n## 工作流\n\n### 链式工作流\n\n“链式”工作流提供了一种更为声明式的顺序调用代理的方式：\n\n```python\n@fast.chain(\n  \"post_writer\",\n   sequence=[\"url_fetcher\",\"social_media\"]\n)\n\n# 我们可以直接向它发送提示：\nasync with fast.run() as agent:\n  await agent.post_writer()\n```\n\n这将启动一个交互式会话，为给定的 URL 生成一条简短的社交媒体帖子。如果对“链式”工作流发送提示，它会回到与链中最后一个代理的对话界面。你可以通过输入 `@代理名` 来切换当前代理。\n\n链式工作流可以嵌入到其他工作流中，也可以包含其他工作流元素（包括其他链式工作流）。如有需要，你可以为其设置 `instruction`，以精确描述其功能供其他工作流步骤使用。\n\n### 人工输入\n\n代理可以请求人工输入，以协助完成任务或获取更多上下文信息：\n\n```python\n@fast.agent(\n    instruction=\"一个协助完成基础任务的 AI 代理。必要时请求人工输入。\",\n    human_input=True,\n)\n\nawait agent(\"打印数列中的下一个数字\")\n```\n\n在示例文件 `human_input.py` 中，代理会提示用户输入更多信息，以便完成任务。\n\n### 并行工作流\n\n并行工作流会同时向多个代理发送相同的消息（即“扇出”），然后由“扇入”代理处理汇总后的结果。\n\n```python\n@fast.agent(\"translate_fr\", \"将文本翻译成法语\")\n@fast.agent(\"translate_de\", \"将文本翻译成德语\")\n@fast.agent(\"translate_es\", \"将文本翻译成西班牙语\")\n\n@fast.parallel(\n  name=\"translate\",\n  fan_out=[\"translate_fr\",\"translate_de\",\"translate_es\"]\n)\n\n@fast.chain(\n  \"post_writer\",\n   sequence=[\"url_fetcher\",\"social_media\",\"translate\"]\n)\n```\n\n如果你没有指定“扇入”代理，“并行”工作流会原样返回所有代理的结果。\n\n“并行”工作流也非常适合整合来自不同 LLM 的想法。\n\n在其他工作流中使用“并行”工作流时，请务必为其设置 `instruction`，以说明其运作方式。\n\n### 评估-优化工作流\n\n评估-优化工作流结合了两个代理：一个用于生成内容（“生成器”），另一个用于评估该内容并提供可操作的反馈（“评估者”）。消息首先发送给生成器，然后两者循环运行，直到评估者对内容质量满意，或者达到最大优化次数为止。最终返回的是生成器生成的内容。\n\n如果生成器关闭了 `use_history` 功能，那么在请求改进时只会返回上一次的迭代结果；否则会利用对话上下文。\n\n```python\n@fast.evaluator_optimizer(\n  name=\"研究员\",\n  generator=\"web_searcher\",\n  evaluator=\"quality_assurance\",\n  min_rating=\"EXCELLENT\",\n  max_refinements=3\n)\n\nasync with fast.run() as agent:\n  await agent.researcher.send(\"制作一份关于如何冲泡完美浓缩咖啡的报告\")\n```\n\n当它被用于某个工作流时，最终返回的是生成器最后一次生成的消息。\n\n有关更完整的示例，请参阅 `evaluator.py` 工作流示例，或参考 `fast-agent 快速入门 研究员`。\n\n### 路由器\n\n路由器使用大语言模型（LLM）来评估消息，并将其路由到最合适的代理。路由提示会根据代理的指令和可用的服务端自动生成功能。\n\n```python\n@fast.router(\n  name=\"route\",\n  agents=[\"agent1\",\"agent2\",\"agent3\"]\n)\n```\n\n示例请参考 `router.py` 工作流。\n\n### 协调器\n\n面对复杂的任务，协调器会利用大语言模型生成一个计划，将任务分配给可用的代理。规划和聚合提示由协调器生成，而协调器受益于使用更强大的模型。计划可以在开始时一次性构建（`plan_type=\"full\"`），也可以逐步迭代构建（`plan_type=\"iterative\"`）。\n\n```python\n@fast.orchestrator(\n  name=\"orchestrate\",\n  agents=[\"task1\",\"task2\",\"task3\"]\n)\n```\n\n请参阅 `orchestrator.py` 或 `agent_build.py` 的工作流示例。\n\n## 代理功能\n\n### 调用代理\n\n所有定义都允许省略名称和指令参数以简化代码：\n\n```python\n@fast.agent(\"You are a helpful agent\")          # 创建一个带有默认名称的代理。\n@fast.agent(\"greeter\",\"Respond cheerfully!\")    # 创建一个名为“greeter”的代理。\n\nmoon_size = await agent(\"the moon\")             # 使用消息调用默认代理（即第一个定义的代理）。\n\nresult = await agent.greeter(\"Good morning!\")   # 通过点符号按名称向代理发送消息。\nresult = await agent.greeter.send(\"Hello!\")     # 也可以显式调用“send”方法。\n\nawait agent.greeter()                           # 如果未指定消息，则会开启一次对话。\nawait agent.greeter.prompt()                    # 可以使对话更加明确。\nawait agent.greeter.prompt(default_prompt=\"OK\") # 并支持设置默认提示。\n\nagent[\"greeter\"].send(\"Good Evening!\")          # 如果偏好，也可以使用字典访问方式。\n```\n\n### 定义代理\n\n#### 基础代理\n\n```python\n@fast.agent(\n  name=\"agent\",                          \u002F\u002F 代理名称\n  instruction=\"You are a helpful Agent\", \u002F\u002F 代理的基础指令\n  servers=[\"filesystem\"],                \u002F\u002F 代理使用的 MCP 服务列表\n  model=\"o3-mini?reasoning=high\",        \u002F\u002F 指定代理使用的模型\n  use_history=True,                      \u002F\u002F 代理保留聊天历史\n  request_params=RequestParams(temperature=0.7), \u002F\u002F LLM 的附加参数（或 RequestParams）\n  human_input=True,                      \u002F\u002F 代理可以请求人工输入\n)\n```\n\n#### 链式代理\n\n```python\n@fast.chain(\n  name=\"chain\",                          \u002F\u002F 链式名称\n  sequence=[\"agent1\", \"agent2\", ...],    \u002F\u002F 执行顺序中的代理列表\n  instruction=\"instruction\",             \u002F\u002F 用于描述链式流程的指令\n  cumulative=False,                      \u002F\u002F 是否在链中累积消息\n  continue_with_final=True,              \u002F\u002F 在提示后，在链末尾与代理开启对话\n)\n```\n\n#### 并行代理\n\n```python\n@fast.parallel(\n  name=\"parallel\",                       \u002F\u002F 并行工作流名称\n  fan_out=[\"agent1\", \"agent2\"],          \u002F\u002F 并行运行的代理列表\n  fan_in=\"aggregator\",                   \u002F\u002F 合并结果的代理名称（可选）\n  instruction=\"instruction\",             \u002F\u002F 用于描述并行流程的指令\n  include_request=True,                  \u002F\u002F 在合并消息中包含原始请求\n)\n```\n\n#### 评估-优化器\n\n```python\n@fast.evaluator_optimizer(\n  name=\"researcher\",                     \u002F\u002F 工作流名称\n  generator=\"web_searcher\",              \u002F\u002F 内容生成代理名称\n  evaluator=\"quality_assurance\",         \u002F\u002F 评估代理名称\n  min_rating=\"GOOD\",                     \u002F\u002F 最低可接受质量（EXCELLENT、GOOD、FAIR、POOR）\n  max_refinements=3,                     \u002F\u002F 最大细化次数\n)\n```\n\n#### 路由器\n\n```python\n@fast.router(\n  name=\"route\",                          \u002F\u002F 路由器名称\n  agents=[\"agent1\", \"agent2\", \"agent3\"], \u002F\u002F 路由器可委派的代理列表\n  model=\"o3-mini?reasoning=high\",        \u002F\u002F 指定路由模型\n  use_history=False,                     \u002F\u002F 路由器不维护对话历史\n  human_input=False,                     \u002F\u002F 路由器是否可以请求人工输入\n)\n```\n\n#### 协调器\n\n```python\n@fast.orchestrator(\n  name=\"orchestrator\",                   \u002F\u002F 协调器名称\n  instruction=\"instruction\",             \u002F\u002F 协调器的基础指令\n  agents=[\"agent1\", \"agent2\"],           \u002F\u002F 协调器可使用的代理列表\n  model=\"o3-mini?reasoning=high\",        \u002F\u002F 指定协调器的规划模型\n  use_history=False,                     \u002F\u002F 协调器不维护聊天历史（无影响）。\n  human_input=False,                     \u002F\u002F 协调器是否可以请求人工输入\n  plan_type=\"full\",                      \u002F\u002F 规划方式：“full”或“iterative”\n  plan_iterations=5,                     \u002F\u002F 全量规划尝试的最大次数，或迭代次数\n)\n```\n\n#### MAKER\n\n```python\n@fast.maker(\n  name=\"maker\",                           \u002F\u002F 工作流名称\n  worker=\"worker_agent\",                  \u002F\u002F 工作者代理名称\n  k=3,                                    \u002F\u002F 投票优势（领先k票者胜出）\n  max_samples=50,                         \u002F\u002F 最大样本数量\n  match_strategy=\"exact\",                 \u002F\u002F 精确匹配|归一化匹配|结构化匹配\n  red_flag_max_length=256,                \u002F\u002F 标记异常长的输出\n  instruction=\"instruction\",              \u002F\u002F 可选的指令覆盖\n)\n```\n\n#### 代理作为工具\n\n```python\n@fast.agent(\n  name=\"orchestrator\",                    \u002F\u002F 协调器代理名称\n  instruction=\"instruction\",              \u002F\u002F 协调器的指令（路由\u002F分解\u002F聚合）\n  agents=[\"agent1\", \"agent2\"],            \u002F\u002F 作为工具暴露：agent__agent1、agent__agent2\n  max_parallel=128,                       \u002F\u002F 限制并行子工具调用的数量（OpenAI 的上限为 128）\n  child_timeout_sec=600,                  \u002F\u002F 每个子调用的超时时间（秒）\n  max_display_instances=20,               \u002F\u002F 在显示前N个实例后折叠进度显示\n)\n```\n\n### 函数工具\n\n可以直接在代码中将 Python 函数注册为工具，无需 MCP 服务器或外部文件。支持同步和异步函数。默认情况下，函数名和文档字符串会用作工具名称和描述；你也可以通过 `name=` 和 `description=` 参数来覆盖它们。\n\n**按代理的工具（`@agent.tool`）** — 将工具的作用范围限定于特定代理：\n\n```python\n@fast.agent(name=\"writer\", instruction=\"你负责写作。\")\nasync def writer(): ...\n\n@writer.tool\ndef translate(text: str, language: str) -> str:\n    \"\"\"将文本翻译成指定语言。\"\"\"\n    return f\"[{language}] {text}\"\n\n@writer.tool(name=\"summarize\", description=\"生成一行摘要\")\ndef summarize(text: str) -> str:\n    return f\"摘要：{text[:80]}...\"\n```\n\n**全局工具（`@fast.tool`）** — 对所有未声明自己工具的代理都可用：\n\n```python\n@fast.tool\ndef get_weather(city: str) -> str:\n    \"\"\"返回某个城市的当前天气状况。\"\"\"\n    return f\"{city} 天气晴朗\"\n\n@fast.agent(name=\"assistant\", instruction=\"你非常乐于助人。\")\n# assistant 可以使用全局工具 get_weather\n```\n\n带有 `@agent.tool` 或 `function_tools=` 的代理仅能看到自己的工具——不会注入全局工具。如果希望明确排除全局工具，可以使用 `function_tools=[]`。\n\n### 多模态支持\n\n可以通过内置的 `prompt-server` 或直接使用 MCP 类型向提示中添加资源。为此提供了便捷的类，例如：\n\n```python\n  summary: str =  await agent.with_resource(\n      \"请总结这份 PDF 文件\",\n      \"mcp_server\",\n      \"resource:\u002F\u002Ffast-agent\u002Fsample.pdf\",\n  )\n```\n\n#### MCP 工具结果转换\n\nLLM API 在通过其聊天补全 API 返回工具调用或函数结果时，对内容类型有一定限制：\n\n- OpenAI 支持文本；\n- Anthropic 支持文本和图像；\n- Google 支持文本、图像、PDF 和视频（例如 `video\u002Fmp4`）。\n  > **注意**：内联视频数据上限为 20MB。对于更大的文件，请使用文件 API。YouTube URL 可直接支持。\n\n对于 MCP 工具结果，`ImageResources` 和 `EmbeddedResources` 会被转换为用户消息并添加到对话中。\n\n### 提示\n\n支持使用 `apply_prompt(name,arguments)` 来应用 MCP 提示，该方法始终返回助手消息。如果来自 MCP 服务器的最后一条消息是“用户”消息，则会将其发送给 LLM 进行处理。应用于代理上下文的提示会被保留——这意味着即使设置 `use_history=False`，代理也能作为经过精细调优的响应者工作。\n\n此外，还可以通过交互式界面使用 `\u002Fprompt` 命令来交互式地应用提示。\n\n### 抽样\n\nLLM 的抽样配置是按客户端\u002F服务器对进行设置的。可在 `fastagent.config.yaml` 中指定模型名称，如下所示：\n\n```yaml\nmcp:\n  servers:\n    sampling_resource:\n      command: \"uv\"\n      args: [\"run\", \"sampling_resource_server.py\"]\n      sampling:\n        model: \"haiku\"\n```\n\n### 秘密文件\n\n> [!TIP]\n> fast-agent 会递归查找 `fastagent.secrets.yaml` 文件，因此你只需在代理定义的根目录下管理此文件即可。\n\n### 交互式 Shell\n\n![fast-agent](https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_readme_3fa0846ff880.png)\n\n## 文档\n\n文档站点以子模块形式包含在 `docs\u002F` 目录中。要在本地处理文档：\n\n```bash\n# 安装文档依赖项（仅首次）\nuv run scripts\u002Fdocs.py install\n\n# 从源代码生成参考文档\nuv run scripts\u002Fdocs.py generate\n\n# 启动开发服务器（http:\u002F\u002F127.0.0.1:8000）\nuv run scripts\u002Fdocs.py serve\n\n# 或者一步完成生成与服务\nuv run scripts\u002Fdocs.py all\n```\n\n生成器会直接从源代码中提取配置字段说明、模型别名和 API 参考，以确保文档始终保持同步。\n\n## 项目说明\n\n`fast-agent` 构建于 Sarmad Qadri 的 [`mcp-agent`](https:\u002F\u002Fgithub.com\u002Flastmile-ai\u002Fmcp-agent) 项目之上。\n\n### 贡献\n\n欢迎贡献和提交 PR；如有任何问题，也欢迎随时提出讨论。完整的贡献指南和路线图即将发布。请随时联系我们！","# fast-agent 快速上手指南\n\n`fast-agent` 是一个灵活的 LLM 交互框架，适用于构建编码智能体（Coding Agent）、开发工具包、评估平台及工作流自动化。它支持 CLI 优先操作，具备完整的 MCP（Model Context Protocol）功能，包括采样、询问（Elicitations）及多模态支持。\n\n## 环境准备\n\n在开始之前，请确保您的系统满足以下要求：\n\n*   **操作系统**：Linux, macOS 或 Windows（Windows 用户需注意文件系统配置，详见官方文档）。\n*   **Python 环境**：推荐安装 **[uv](https:\u002F\u002Fdocs.astral.sh\u002Fuv\u002F)** 包管理器（由 Astral 开发，速度极快）。\n    *   *国内加速提示*：如果 `uv` 安装或下载慢，可配置国内镜像源。\n*   **网络环境**：访问 Hugging Face、OpenAI 或 Anthropic 等服务需要稳定的网络连接。\n\n### 安装 uv (推荐)\n\n```bash\n# Linux\u002FmacOS\ncurl -LsSf https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.sh | sh\n\n# Windows (PowerShell)\npowershell -ExecutionPolicy ByPass -c \"irm https:\u002F\u002Fastral.sh\u002Fuv\u002Finstall.ps1 | iex\"\n```\n\n## 安装步骤\n\n您可以选择直接运行最新版本的 `fast-agent`，或者将其安装为本地工具以使用 shell 别名和高级功能。\n\n### 方式一：直接运行（无需安装）\n\n使用 `uvx` 直接启动交互式会话：\n\n```bash\n# 启动带有 Shell 支持的交互式会话\nuvx fast-agent-mcp@latest -x\n```\n\n### 方式二：本地安装（推荐）\n\n安装后可使用 `fast-agent` 命令，并配置 Shell 别名：\n\n```bash\n# 安装 fast-agent 工具\nuv tool install -U fast-agent-mcp\n\n# 验证安装并启动（示例：使用 Opus 模型，开启 Shell 支持和智能模式）\nfast-agent --model opus -x --smart\n```\n\n### 安装特定功能包\n\n针对特定场景，可以加载预配置的功能包：\n\n```bash\n# 使用 Hugging Face 推理提供商进行编码\nuvx fast-agent-mcp@latest --pack hf-dev\n\n# 使用针对 OpenAI 优化的 Codex 智能体\nuvx fast-agent-mcp@latest --pack codex\n```\n\n## 基本使用\n\n### 1. 启动交互式会话\n\n安装完成后，运行以下命令进入交互式终端（支持 Shell 命令执行）：\n\n```bash\nfast-agent go\n```\n\n**常用参数示例：**\n\n```bash\n# 连接远程 MCP 服务器\nfast-agent go --url https:\u002F\u002Fhf.co\u002Fmcp\n\n# 指定本地 Ollama 模型 (例如 qwen2.5)\nfast-agent go --model=generic.qwen2.5\n\n# 加载预设包并指定模型\nfast-agent go --pack analyst --model haiku\n```\n\n**在会话中：**\n*   输入 `!` 进入 Shell 模式，或直接运行 `! cd web && npm run build` 执行命令。\n*   使用 `\u002Fskills` 管理技能。\n*   使用 `\u002Fconnect` 连接 MCP 服务器（支持 stdio 或 HTTP）。\n\n```bash\n# 连接标准 MCP 服务器示例\n\u002Fconnect @modelcontextprotocol\u002Fserver-everything\n\u002Fconnect https:\u002F\u002Fhuggingface.co\u002Fmcp\n```\n\n### 2. 创建第一个 Agent (代码示例)\n\n创建一个名为 `sizer.py` 的文件，定义一个简单的智能体：\n\n```python\nimport asyncio\nfrom fast_agent import FastAgent\n\n# 创建应用实例\nfast = FastAgent(\"Agent Example\")\n\n@fast.agent(\n  instruction=\"Given an object, respond only with an estimate of its size.\"\n)\nasync def main():\n  async with fast.run() as agent:\n    # 启动交互式聊天\n    await agent.interactive()\n\nif __name__ == \"__main__\":\n    asyncio.run(main())\n```\n\n**运行 Agent：**\n\n```bash\n# 运行脚本，指定模型为 sonnet\nuv run sizer.py --model sonnet\n\n# 支持模型参数覆盖\nuv run sizer.py --model \"gpt-5?reasoning=low\"\nuv run sizer.py --model \"claude-sonnet-4-6?web_search=on\"\n```\n\n### 3. 构建工作流 ( chaining )\n\n`fast-agent` 支持将多个 Agent 串联成工作流。首先初始化示例项目：\n\n```bash\n# 创建示例工作流文件\nfast-agent quickstart workflow\n```\n\n编辑生成的 `workflow\u002Fchaining.py`，你可以看到如何组合 Agent：\n\n```python\n@fast.agent(\n    \"url_fetcher\",\n    \"Given a URL, provide a complete and comprehensive summary\",\n    servers=[\"fetch\"], # 引用 fastagent.config.yaml 中定义的 MCP 服务器\n)\n@fast.agent(\n    \"social_media\",\n    \"\"\"\n    Write a 280 character social media post for any given text.\n    Respond only with the post, never use hashtags.\n    \"\"\",\n)\n@fast.chain(\n    name=\"post_writer\",\n    sequence=[\"url_fetcher\", \"social_media\"],\n)\nasync def main():\n    async with fast.run() as agent:\n        # 执行链式工作流\n        await agent.post_writer(\"http:\u002F\u002Fllmindset.co.uk\")\n```\n\n**运行工作流：**\n\n```bash\n# 运行工作流，传入消息参数\nuv run workflow\u002Fchaining.py --agent post_writer --message \"\u003Curl>\"\n\n# 静默模式：仅输出最终结果，不显示进度\nuv run workflow\u002Fchaining.py --agent post_writer --message \"\u003Curl>\" --quiet\n```\n\n### 4. 高级特性速览\n\n*   **MAKER 模式**：用于高可靠性任务，通过多次采样和投票机制减少错误。\n*   **Agents as Tools**：将子 Agent 作为工具暴露给主 Agent，实现任务分解、路由和并行处理。\n*   **MCP 诊断**：内置 Streamable HTTP 传输诊断工具，确保部署合规性。\n*   **本地模型**：自动配置 `llama.cpp` 或使用通用提供商连接本地模型。\n    ```bash\n    fast-agent model llamacpp\n    ```\n\n> **提示**：更多详细文档请访问 [https:\u002F\u002Ffast-agent.ai](https:\u002F\u002Ffast-agent.ai) 或查看 GitHub 仓库中的 `fast-agent-docs` 子模块。","某全栈开发者需要在半天内为现有 Python 后端快速集成一个支持多模型、具备文件读取能力的智能代码助手，并验证其在不同大模型下的表现。\n\n### 没有 fast-agent 时\n- **环境配置繁琐**：手动编写脚本连接不同厂商（如 OpenAI、Hugging Face）的 API，处理鉴权和参数差异耗时耗力。\n- **工具链割裂**：为了让 Agent 能读取本地文件或执行 Shell 命令，需反复调试 LangChain 等框架的 Tool 定义，常因上下文丢失导致失败。\n- **评估成本高**：切换模型进行测试时，必须重写大量胶水代码，难以在同一套逻辑下对比 Claude 3.5 Sonnet 与 Llama 3 的实际编码效果。\n- **交互体验差**：缺乏原生终端支持，无法直接在命令行中流畅地进行多轮对话、查看流式输出或管理复杂的技能插件。\n\n### 使用 fast-agent 后\n- **一键启动多模型**：通过 `uvx fast-agent-mcp --pack hf-dev` 或 `--pack codex` 指令，瞬间加载针对特定厂商优化的开发包，自动处理底层配置。\n- **原生 MCP 集成**：利用 `\u002Fconnect` 命令直接接入标准 MCP 服务器（如文件系统、Git），无需编写额外代码即可赋予 Agent 读写文件和执行构建命令的能力。\n- **统一评估工作流**：借助内置的 Evaluation 功能和 Passthrough 模式，仅用一行命令切换模型后端，快速完成从编码生成到自动化测试的全流程验证。\n- **沉浸式终端开发**：在支持自动补全和历史记录的交互式 Shell 中，直接输入 `! npm run build` 即可让 Agent 执行并反馈结果，开发过程如行云流水。\n\nfast-agent 将原本需要数天搭建的多模型代理工作流压缩至分钟级，让开发者能专注于业务逻辑而非基础设施的重复造轮子。","https:\u002F\u002Foss.gittoolsai.com\u002Fimages\u002Fevalstate_fast-agent_b9ff155f.png","evalstate","shaun smith","https:\u002F\u002Foss.gittoolsai.com\u002Favatars\u002Fevalstate_a8fb33fb.png",null,"https:\u002F\u002Fgithub.com\u002Fevalstate",[79,83,87,91],{"name":80,"color":81,"percentage":82},"Python","#3572A5",98.6,{"name":84,"color":85,"percentage":86},"HTML","#e34c26",1.3,{"name":88,"color":89,"percentage":90},"Shell","#89e051",0.1,{"name":92,"color":93,"percentage":94},"CSS","#663399",0,3747,404,"2026-04-17T13:00:16","Apache-2.0","Linux, macOS, Windows","未说明（支持本地模型如 llama.cpp，具体取决于所选模型）","未说明",{"notes":103,"python":104,"dependencies":105},"推荐使用 uv 包管理器进行安装和环境管理。Windows 用户在使用文件系统和 Docker MCP 服务器时需要修改配置文件。支持多种模型提供商（Anthropic, OpenAI, Google, Ollama 等）。可通过 'fast-agent model llamacpp' 自动配置本地模型。文档作为子模块包含，克隆时需使用 --recurse-submodules 参数。","需通过 uv 包管理器安装（隐含支持现代 Python 版本）",[106,107,108,109],"fast-agent-mcp","uv","prompt_toolkit","rich",[13,14,45],[112,113,114,115,116,117,118,119,120,121,122],"agent","agent-framework","agent-skills","cli","mcp","mcp-client","mcp-server","python","skills","tui","acp","2026-03-27T02:49:30.150509","2026-04-18T09:19:28.737445",[126,131,136,141,146,151],{"id":127,"question_zh":128,"answer_zh":129,"source_url":130},39416,"如何配置 fast-agent 以支持 Ollama 或本地模型（如 Qwen）？","可以通过修改 `fastagent.config.yaml` 配置文件来使用 Ollama 或其他兼容 OpenAI 格式的本地模型。具体配置示例如下：\n```yaml\ndefault_model: \"generic.qwen2.5-instruct\"\ngeneric:\n  api_key: \"ollama\"\n  base_url: \"http:\u002F\u002Fxxxxxxxxx:9999\u002Fv1\u002F\"\n```\n将 `base_url` 指向你的 Ollama 服务地址，并将 `api_key` 设置为任意非空字符串（如 \"ollama\"）即可。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F40",{"id":132,"question_zh":133,"answer_zh":134,"source_url":135},39417,"在使用 Google Gemini 模型并启用人类输入（Human Input）功能时，遇到 Pydantic 'Extra inputs are not permitted' 报错怎么办？","这是一个已知问题，维护者已在代码库的主分支中通过提交修复了该错误（涉及 `google_converter.py` 文件）。但该修复尚未包含在某些旧版本发布包中（例如用户报告的 0.2.58 版本可能未完全生效或需特定版本）。\n解决方案：\n1. 尝试升级到包含修复的最新版本（维护者确认在后续版本如 0.2.36 之后的更新中已解决）。\n2. 如果无法升级，可手动从 GitHub 主分支获取修复后的 `google_converter.py` 文件并替换本地安装包中的对应文件。\n3. 确保不使用过旧的版本，该问题在较新版本中已不再复现。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F356",{"id":137,"question_zh":138,"answer_zh":139,"source_url":140},39418,"使用 Gemini 模型（如 gemini-2.0-flash, gemini-1.5-flash）时遇到 'contents.parts must not be empty' (400 错误) 该如何解决？","该错误通常不是 fast-agent 框架本身的问题，而是源于 Google Gemini API 在处理特定提示模板或长上下文时的限制（特别是在 Flash 2.5 以下的版本中）。\n建议的解决方法：\n1. 切换到其他模型提供商（如 OpenAI GPT-4），许多用户反馈切换后问题解决。\n2. 修改提示词策略：要求 LLM 不要一次性生成所有数据，而是分章节生成，并通过多次调用写入文件，这可以缓解部分问题。\n3. 尝试设置 `use_history=False`（虽然不一定完全解决，但可作为排查手段）。\n4. 这是一个上游 API 问题，需等待 Google 修复或其 SDK 更新。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F205",{"id":142,"question_zh":143,"answer_zh":144,"source_url":145},39419,"Gemini 模型在出现一次 400 错误后，后续所有请求都持续返回 400 错误，如何处理？","这是 Gemini API 在 Beta 阶段的一个特定行为，一旦会话中出现错误，可能会导致后续请求全部失败。维护者指出这可能是由于 Gemini 对某些其他模型能容忍的错误非常敏感。\n临时应对措施：\n1. 避免在单个长会话中累积错误，尝试重置会话或重新初始化聊天机器人实例。\n2. 检查并调整错误处理逻辑，维护者曾表示会考虑在框架端增加对小调整的兼容性。\n3. 向 Google 反馈该 API 问题，因为根本原因在于其服务端实现。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F6",{"id":147,"question_zh":148,"answer_zh":149,"source_url":150},39420,"fast-agent 0.3.0 版本重构计划主要包含哪些变化？对用户有什么影响？","0.3.0 版本的重构计划旨在改善 API 体验、加速新功能实现并更好地集成标准。\n主要变化包括：\n1. 核心目标：弃用 `augmented_llm` 方法，打破 Agent 和 LLM 之间的多重继承链和反向依赖，使架构更清晰。\n2. 次要目标：更容易使用提供商交付的原生功能（如 Anthropic\u002FOpenAI 的搜索、代码执行、远程 MCP、引用等），并提供对推理片段（Reasoning chunks）的更好控制。\n3. 第三目标：简化 MCP 管理逻辑。\n对大多数高层用户而言，使用体验不会有重大变化；但对于底层集成开发者，可能会有一些易于重构的破坏性变更。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F345",{"id":152,"question_zh":153,"answer_zh":154,"source_url":155},39421,"在 VSCode 中能正常工作，但在自定义 HTTP 流式传输实现中遇到 Elicitation（征求）超时或生命周期问题怎么办？","如果在自定义实现中遇到 `elicitation\u002Fcreate` 请求超时或与 HTTP 生命周期相关的问题，而 VSCode 客户端表现正常，这通常意味着客户端实现与服务器端的 SSE（Server-Sent Events）交互逻辑存在差异。\n排查建议：\n1. 确认客户端是否在收到 SSE 事件后立即发送征求结果，而不应完全依赖 tools\u002Fcall 的 HTTP 请求 - 响应周期。\n2. 参考 VSCode 的实现逻辑，确保正确处理 `session_id` 和 `rpc_id` 的关联。\n3. 维护者指出在最新版本的 fast-agent 中难以复现此类问题，建议升级到最新版本进行测试。\n4. 如果问题依旧，需提供最小复现脚本以便进一步调试，因为这可能与特定的网络配置或客户端实现细节有关。","https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fissues\u002F600",[157,162,167,172,177,182,187,192,197,202,207,212,217,222,227,232,237,242,247,252],{"id":158,"version":159,"summary_zh":160,"released_at":161},315349,"v0.6.17","## 变更内容\n\n### Opus 4.7 支持\n\n新增“摘要显示”功能，用于展示推理摘要。  \n- 自适应推理默认开启。可通过 `\u002Fmodel` 命令或模型字符串设置推理级别和任务预算，例如：`opus?reasoning=xhigh&task_budget=64000`。\n\n如需使用早期版本，可使用预设 `opus46` 和 `opus45`，或直接指定完整的模型标识符。\n\n请注意，`task_budget` 仅适用于 Opus 4.7。\n\n### 助手回复横幅\n\n对于较长的回复，现在会在最后一条助手消息处显示一个横幅，以便更轻松地定位滚动缓冲区中的位置。可通过 `fast-agent config display` 禁用此功能（流式重印横幅）。\n\n![图片](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F67b80563-dab3-4f9c-95c8-23b96aa04aae)\n\n### 其他变更\n\n- 新增 Kimi25 即时模式别名\n- 增强会话快照功能\n- \n\n* 由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F768 中将 pytest 从 9.0.2 升级至 9.0.3\n* 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F769 中提交 Dev\u002F0.6.17 版本\n\n","2026-04-16T21:55:25",{"id":163,"version":164,"summary_zh":165,"released_at":166},315350,"v0.6.15","- 新增对使用 llama.cpp 作为路由器的自动配置实验性支持（已在模型选择器中添加快捷方式）\n- 更新了默认颜色方案（仍全部使用 ANSI 颜色）\n- 修复了钩子显示代码，现在新建会话会重置计数器。\n- MCP 服务器现在可以由 ACP 客户端提供。\n","2026-04-12T17:15:26",{"id":168,"version":169,"summary_zh":170,"released_at":171},315367,"v0.4.29","## Responses and Hot Reload!\r\n\r\n### OpenAI Responses is now the default\r\n\r\nStateless Responses API (encrypted reasoning) is now the default for `gpt-5` and `o-` series models. `gpt-5.1-codex` has been added as an alias. \r\n\r\n### Hot Reload of Agent Cards\r\n\r\nBy @iqdoctor -- hot reload of AgentCards (both Agents and Agents-as-Tools); completely dynamic, self-rewriting agents now possible. Available via TUI and ACP.\r\n\r\n### Other Changes\r\n\r\n* ACP prompt sequencing by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F615\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.27...v0.4.29","2026-01-12T22:51:49",{"id":173,"version":174,"summary_zh":175,"released_at":176},315351,"v0.6.13","# fast-agent 0.6.13 -- 🚨FastMCP 更新至 0.3.2🚨\n\n请尽快升级到此版本。\n\n## OpenAI Responses API 修复及 FastMCP v0.3.2\n\n本次发布包含针对 OpenAI WebSockets API 服务器端变更的修复，以及 FastMCP 的重要安全补丁。\n\n## 主要特性\n\n- 工具注解（感谢 @danieldagot）。https:\u002F\u002Ffast-agent.ai\u002Fagents\u002Ffunction_tools\u002F#when-to-use-function-tools\n- 远程 MCP（Anthropic 和 OpenAI Responses）。https:\u002F\u002Ffast-agent.ai\u002Fmcp\u002F#provider-managed-remote-mcp\n- ACP 会话处理改进。\n- ACP 兼容性修复（0.8 至 0.9 升级）。\n- 支持 Anthropic on Vertex。\n- 工具输出渲染及结构化输出处理优化（感谢 @iqdoctor）。\n- 流式传输过程中 `apply_patch` 的颜色标注。\n- GLM 5.1 支持；gpt-oss 别名默认恢复为 Cerebras。\n- `--prompt-file` 开关现默认为非交互式。\n- 通过 TUI 文件、MCP 资源和 URL 提供文档\u002F视觉附件（使用 `^`）。\n- 可将工具标记为 `code` 样式，以改善渲染效果。\n\n## 变更内容\n* 原始用法存储，`--prompt-file` 非交互式，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F739 中实现。\n* 修复屏幕底部的 Markdown 渲染问题，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F740 中完成。\n* 将 MCP 服务器通知展示给代理，由 @es617 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F741 中实现。\n* 改进 README 文档，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F743 中完成。\n* 0.6.10 \u002F Vertex \u002F ACP 修复，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F745 中实施。\n* 功能\u002F工具装饰器，由 @danieldagot 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F744 中添加。\n* ACP 会话、代码（Monty Codegen）高亮显示及工具增强，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F749 中完成。\n* 修复：避免推理句子跨增量拼接，由 @iqdoctor 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F704 中解决。\n* UI：对于多块工具结果，优先显示 structuredContent 预览，由 @iqdoctor 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F703 中实现。\n* Dev\u002F0.6.13，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F751 中完成。\n* 将 fastmcp 从 3.1.1 升级至 3.2.0，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F752 中执行。\n* 将 aiohttp 从 3.13.3 升级至 3.13.4，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F753 中完成。\n* 将 anthropic 从 0.86.0 升级至 0.87.0，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F755 中完成。\n* 将 cryptography 从 46.0.5 升级至 46.0.7，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F754 中完成。\n* 将 pygments 从 2.19.2 升级至 2.20.0，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F756 中完成。\n\n## 新贡献者\n* @es617 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F741 中完成了首次贡献。\n* @danieldagot 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F744 中完成了首次贡献。\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.6.7...v0.6.13","2026-04-09T23:42:17",{"id":178,"version":179,"summary_zh":180,"released_at":181},315352,"v0.6.7","## 新增功能\n\n- 减少 Markdown 流式渲染时的闪烁\n- 修复 Opus\u002FSonnet 4.6 结构化内容 API 的警告\n- 显示卡片包安装\u002F更新时的 README 文件（`--pack` 选项）\n- @phucly95 提供的修复，解决了按代理技能筛选的问题\n- @peachgabba22 提供的修复，解决了非持久化服务器的 MCP 连接问题\n- 在 Python 3.14 上抑制 `uvloop` 和 `prompt_toolkit` 的警告\n\n## 新贡献者\n* @phucly95 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F729 中完成了首次贡献\n* @peachgabba22 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F737 中完成了首次贡献\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.6.1...v0.6.7","2026-03-22T20:53:36",{"id":183,"version":184,"summary_zh":185,"released_at":186},315353,"v0.6.1","## 变更内容\n\n* 支持 GPT-5.4-mini\u002Fnano\n* 移除 SSE 服务器支持，迁移到 @evalstate 的 FastMCP3，详见 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F724\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.6.0...v0.6.1","2026-03-17T20:02:00",{"id":188,"version":189,"summary_zh":190,"released_at":191},315354,"v0.6.0","# fast-agent 0.6.0 \n\n## llama.cpp 支持\n\n- 新增了 llama.cpp 模型发现、导入及启动引导流程，使本地模型的配置更加简便。可通过 `fast-agent model llamacpp` 命令使用。\n- 能够读取模型设置（如可用上下文窗口大小和模态），并生成配置文件（模型覆盖层）。若需从服务器端引入采样参数，请使用 `--include-sampling-defaults` 选项。\n\n![图片](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Ff33693e3-c24c-487f-ba24-1f256ce78581)\n\n## 模型覆盖层\n\n- 引入了本地模型覆盖层功能，团队可在内置目录之外定义可复用的本地模型别名及运行时设置。\n- 在 CLI、提示词 UI 和 ACP 中扩展了模型选择与切换的用户体验，优化了目录管理、诊断信息展示以及引用处理。\n- 更多详情请参阅：https:\u002F\u002Ffast-agent.ai\u002Fmodels\u002Fmodel_overlays\u002F\n\n## Anthropic 100万上下文、Google 原生更新\n\n- 现已支持 Anthropic 4.6 系列模型的 100 万上下文窗口。较旧的模型仍需使用扩展标志，例如 `claude-sonnet-4-5?context=1m`。\n- 改进了对 Google Gemini 的支持，并优化了 Gemini 提供商的整体行为。\n- 新增了对 Anthropic 100 万上下文工作流的支持，同时进一步提升了 Anthropic 的整体能力。\n- 推出了专用的技能 CLI，并将技能子系统重构为更清晰的服务层和操作层。\n- 改进了 ACP\u002FMCP 的命令处理、认证透传、会话行为以及命令界面的一致性。\n- 升级了提示词和交互式 Shell 的体验，包括更优的补全效果、工具显示、历史记录视图以及输入\u002F运行时结构。\n- 增加了更详细的历史摘要、响应遥测、工具追踪以及流式传输行为的相关信息。\n- 重构了核心运行时、代理加载、验证及模型解析代码，以更干净地支持新的工作流。\n\n## ⚠️警告\n\n- 模型别名现更名为预设（例如 `kimi25`）。\n- 配置别名现更名为引用（例如 `$system.default, $system.fast`）。如果配置文件中定义了别名，则需要进行更新。\n- 进行了大规模的内部重构——虽然未涉及重大 API 变更，但升级时仍需谨慎。\n\n## 主要变更\n* 支持本地 Codex 的 auth.json 覆盖，由 @iqdoctor 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F709 中实现。\n* 新增 ACP 注册功能，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F711 中实现。\n* 开发分支 0.5.9，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F712 中完成。\n* 加强中断会话下工具循环的恢复机制，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F713 中实现。\n* 升级并清理至 ty 0.0.21，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F714 中完成。\n* 添加技能 CLI 并提取可独立运行的技能核心，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F715 中实现。\n* 增加历史时间摘要和流式遥测功能，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F716 中实现。\n* MCP：准确报告底层启动错误，由 @iqdocto 实现。","2026-03-16T19:51:20",{"id":193,"version":194,"summary_zh":195,"released_at":196},315355,"v0.5.7","## 变更内容\n\n![2026-03-07-gpt-5 4](https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F2c2f7db9-68ca-496c-9dd8-a7212f1647ce)\n\n## OpenAI Responses 改进及 `gpt-5.4` 支持\n - 支持 gpt-5.4（`codexplan` 别名已更新）和 gpt-5.3-chat-instant（`chatgpt` 别名）\n - 支持助手“阶段”功能\n - SDK 版本更新\n - 对支持的模型提供 `fast` 和 `flex` 服务层级选择（可在 UI 中使用 Shift+TAB 键便捷切换）\n - WebSocket 现已成为默认传输方式 - （如需 SSE 连接，请使用 `?transport=sse`）注意：OpenResponses 仍为 SSE\n \n## Shell 改进\n - 提供 `read_text_file` 和 `write_text_file` 工具，并具备 shell 访问权限（兼容 Qwen 3.5\u002FACP）。可通过 `write_text_file_mode (auto|on|off|apply_patch)` 进行配置\n - 对 Responses 模型，`write_text_file` 已被 `apply_patch` 替代\n - `apply_patch` 的输出在流式传输后会进行颜色标注\n - `read_text_file` 的预览功能得到增强，并支持语法高亮显示。\n   - 技能提示生成现基于运行时能力，采用明确的读取工具命名方式（`read_text_file` 与 `read_skill` 区分）。\n\n## 工具结果直通\n - 在 `request_params` 和模型卡片中新增选项，可绕过 LLM 对工具输出的处理（适用于代码模式风格的子代理及 MCP 服务器）。\n\n## 其他 UI\u002FUX 改进\n - 使用 Shift+TAB、F6-F9 键可切换 `service_tier`、`reasoning`、`verbosity`、`web_search` 和 `web_fetch` 设置\n - 新增 `fast-agent model setup` 和 `fast-agent model doctor`，用于管理模型配置和别名\n - 在模型选择器中添加 Codex 登录链接\n - `fast-agent model setup` 现在会引导用户处理缺失、无效以及已配置的别名\n - 新建模型设置默认使用 `$system.default`\n - 使用 `##\u003Cagent>` 可向特定代理发送消息，且输入缓冲区将静默返回。\n   - 交互式 UI 工具栏\u002F模型芯片现已升级，增加了服务层级、推理模式、详细程度、网络搜索和网页抓取等指示标志。\n\n## 新的提示快捷键和控件：\n - Shift+Tab：服务层级循环切换\n - F6：推理模式循环切换\n - F7：详细程度循环切换\n - F8：网络搜索开关\n - F9：网页抓取开关\n \n## 内部优化 \u002F 重构 \u002F 测试\n\n- 为命令处理器共享格式化及市场参数解析辅助函数。\n- 统一了跨 CLI 和命令界面使用的 A3 头部渲染工具。\n- 文档布局已切换为指向文档 Git 子模块的指针。\n- 广泛扩展了针对直通流程、文件系统运行时、`apply_patch` 显示与预览、静默哈希发送、显示抑制、模型控制以及 ACP 响应模式处理的测试用例。\n- 改进了交互式界面、CLI 运行器、ACP 提示处理以及工具循环历史记录对齐中的取消\u002F中断处理机制。\n- 取消操作后的恢复功能得到提升：清理过时进度行、更清晰地显示取消回合信息，并更安全地管理任务取消状态。\n- 改进了 `read_text_file` 和 Shell 结果的显示行为（摘要更简洁、截断行为更合理、与显示抑制功能更好地集成）。\n- 优化了 MCP 连接与重连逻辑。","2026-03-08T00:34:16",{"id":198,"version":199,"summary_zh":200,"released_at":201},315356,"v0.5.6","## 变更内容\n\n- Markdown 流式渲染性能大幅提升\n- Responses API 的 WebSocket 功能大幅优化\n- 支持 Minimax M2.5 和 Qwen 3.5 模型\n- 模型选择器\n- MCP 实验性会话演示\n- 其他界面显示优化\n\n* Dev\u002F0.5.1 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F693 中提交\n* 依赖更新：将 requests 从 2.32.3 升级至 2.32.4，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F690 中提交\n* 依赖更新：将 urllib3 从 2.3.0 升级至 2.6.3，由 @dependabot[bot] 在 \u002Fdocs 中提交，见 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F688\n* Dev\u002F0.5.2 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F694 中提交\n* 修复 WebSocket 续接问题，并放宽 Shell Token 限制，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F695 中提交\n* 依赖更新：将 requests 从 2.32.3 升级至 2.32.4，由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F699 中提交\n* 迁移到新数据 schema，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F698 中提交\n* Markdown 乐观场景性能优化，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F700 中提交\n* Dev\u002F0.5.4 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F697 中提交\n* 修复重复打印问题，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F701 中提交\n* 新功能：模型选择器，由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F702 中提交\n\n\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.5.1...v0.5.6","2026-03-01T21:34:39",{"id":203,"version":204,"summary_zh":205,"released_at":206},315357,"v0.5.1","## 编码与配置\r\n\r\n- 通过 API 密钥支持 GPT-5.3-codex\r\n- 所有 OpenAI Responses 模型现在都可以配置为使用 WebSocket（在模型字符串中添加 `?transport=ws`，例如 `fast-agent -x --model responses.GPT-5.2?transport=ws`）\r\n- WebSocket 处理和规划功能的改进\r\n- `fastagent.config.yaml` 和 AgentCards 都可以使用 `target` 样式的配置来设置 MCP\r\n- 支持 MCP 实验性会话及演示\r\n\r\n\r\n**完整变更日志**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.5.0...v0.5.1","2026-02-24T23:12:37",{"id":208,"version":209,"summary_zh":210,"released_at":211},315358,"v0.5.0","## `fast-agent` 0.5.0 系列\n\n- 支持“卡片包”——可通过命令行和 ACP\u002FTUI 进行添加、更新和发布。（`fast-agent cards` 或 `\u002Fcards`）。\n- 改进了模型管理，支持别名（例如 `$system.code` 或 `$system.fast`）。新增了 `\u002Fmodels` 命令和 CLI 选项。\n- 改进了智能代理 MCP 功能。\n- MCP 补全支持。\n\n- 注意：此版本不会破坏 API 兼容性，但 `fast-agent setup` 现已更名为 `fast-agent scaffold`，其他自动化流程可能需要更新命令行参数。\n\n## 变更内容\n* 由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F684 中将 cryptography 从 46.0.3 升级至 46.0.5。\n* 由 @dependabot[bot] 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F685 中将 requests 从 2.32.3 升级至 2.32.4。\n* 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F686 中修复并优化 Markdown 格式。\n* 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F687 中新增 OpenAI 搜索功能。\n* 由 @dependabot[bot] 在 \u002Fdocs 中将 pillow 从 11.2.1 升级至 12.1.1，相关 PR 为 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F689。\n* 由 @evalstate 在 https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F691 中对模型功能进行了增强。\n\n\n**完整变更日志**：https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.54...v0.5.0","2026-02-22T23:04:59",{"id":213,"version":214,"summary_zh":215,"released_at":216},315359,"v0.4.54","## `fast-agent` 0.4.54\r\n\r\n## Sonnet 4.6 and Web Search\u002FWeb Fetch features\r\n\r\nSupport for `claude-sonnet-46`, as well as Web Search and Fetch features (all supported models). Enable with `?web_search=on&web_fetch=on`. \r\n\r\n**NB** The older web tools appear to perform better, I will continue testing and revert\u002Ffix as needed.\r\n\r\n## Agent Card MCP enhancements \u002F Smart Agent improvements.\r\n\r\nSpecify url, npx or uvx MCP connections directly from the Agent Card:\r\n\r\n```\r\nmcp_connect:\r\n  - target: \"https:\u002F\u002Fhf.co\u002Fmcp\"\r\n    name: \"hf_hub\"\r\n  - target: \"npx @modelcontextprotocol\u002Fserver-everything\"\r\n    name: \"everything\"\r\n```\r\n\r\nSmart Agent instructions can be added to prompts with:\r\n\r\n`{{internal:smart_prompt}}` for the default smart agent prompt,  `{{internal:smart_agent_cards}}` for the description section. Read more at https:\u002F\u002Ffast-agent.ai\u002Fagents\u002Finstructions\u002F#template-variables for other new template vars.\r\n\r\n\r\n## Web Socket Improvements\r\n\r\nImproved Web Socket handling for `codexplan` models.\r\n\r\n## What's Changed\r\n* Dev\u002F0.4.54 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F683\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.53...v0.4.54","2026-02-18T00:11:28",{"id":218,"version":219,"summary_zh":220,"released_at":221},315360,"v0.4.53","## `fast-agent 0.4.53` -- hot sockets and skills\r\n\r\n### What's Changed\r\n\r\n- Experimental: Codex Spark support. Use model string `codexspark`\r\n- Experimental: Websockets for OpenAI Plan - Use `codexspark?transport=ws` or `codexplan?transport=ws` to enable Web Socket connection.\r\n- Skill Update mechanism -- uses a small manifest to track git source and allow updating without manifest\u002Fmarketplace peeking.\r\n- GLM-5 support via Hugging Face inference providers.\r\n- Introduce --agent and --noenv flags to make use in evaluations\u002Ftesting simpler\r\n- ACP Registry compatibility and nested agent notifications (thanks @iqdoctor)\r\n- `\u002Fmcp connect` command to allow dynamic loading\u002Freloading of MCP Servers. This works similar to the command line so `\u002Fmcp connect https:\u002F\u002Fhuggingface.co` and `\u002Fmcp connect npx @modelcontextprotocol\u002Fserver-everything` wrok.\r\n- Improvements to URL Elicitation handling\r\n\r\n\r\n* Bump protobuf from 6.33.2 to 6.33.5 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F675\r\n* add --agent target and --noenv option. refactor CLI command handling. by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F676\r\n* acp: advertise authMethods + handle authenticate by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F672\r\n* ACP tool call tracking: stable IDs and nested grouping by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F677\r\n* Feat\u002Fhot mcp by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F678\r\n* chore(gitignore): replace examples\u002F**\u002F*.jsonl with *.jsonl by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F680\r\n* fix(mcp): reject non-finite or non-positive connect timeouts by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F679\r\n* Dev\u002F0.4.52 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F681\r\n* Dev\u002F0.4.53 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F682\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.49...v0.4.53","2026-02-15T23:09:15",{"id":223,"version":224,"summary_zh":225,"released_at":226},315361,"v0.4.49","## fast-agent 0.4.49 \r\n\r\n### GPT-5.3-Codex and Opus 4.6\r\n\r\nUse **`GPT-5.3-Codex`** with the `codexplan` model (e.g. `fast-agent --model codexplan`. Alias added for GPT-5.2-Codex `codexplan52`.\r\n\r\nUse **`Opus 4.6`** with Adaptive Reasoning and 1m Context Window support. Alias `opus` now points to Opus 4.6.  Adaptive reasoning is on by default, use `opus?reasoning=[off|low|med|high|max` to set effort hints. Use `[?|&]longcontext=1m` to enable extended context window.\r\n\r\n### `.agentskills` support. \r\n\r\nIncludes `.agentskills\u002Fskills` as a default skills search location.\r\n\r\n### Open Telemetry and other fixes\r\n\r\nPatches and library updates to restore OpenTelemetry for Anthropic and MCP. Thanks @yarisoy .\r\n\r\nNumerous defect fixes thanks to the ever diligent @iqdoctor .\r\n\r\n## What's Changed\r\n* default retries to 1 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F663\r\n* Feat\u002Fcompact strategies by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F662\r\n* Dev\u002F0.4.48 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F665\r\n* default skills dir, extraneous warning remove by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F666\r\n* fix: Bedrock Agents-As-Tools validation errors by @yarisoy in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F668\r\n* Dev\u002F0.4.49 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F673\r\n* examples: silence npm output for fetch server by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F670\r\n* fix: use app default agent for --message\u002F--prompt-file by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F669\r\n* Add support for Anthropic Beta Streaming API with OpenTelemetry by @floriafz23 in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F650\r\n* fix(acp): prevent duplicated\u002Fstuck tool cards (stable tool_use_id + dedupe) by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F674\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.45...v0.4.49","2026-02-07T17:38:05",{"id":228,"version":229,"summary_zh":230,"released_at":231},315362,"v0.4.45","# fast-agent 0.4.45\r\n\r\n- Full ACP Session List\u002FResume support (note - existing sessions will not be resumable from ACP)\r\n- Session pinning\r\n- Improvements to Agent Card live-reloading and history management (thanks @iqdoctor)\r\n- Kimi K2.5 max output token adjustment\r\n- Improve History Review mode for reloaded sessions\r\n- Custom Headers for Anthropic (thanks @floriafz23 )\r\n- Bedrock Tool Call errors fix (thanks @yarisoy)\r\n- Improvements to parallel tool call display\r\n\r\n## What's Changed\r\n* Bump python-multipart from 0.0.20 to 0.0.22 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F647\r\n* fix: support responses config section by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F648\r\n* Add support for custom headers for Anthropic LLM by @floriafz23 in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F652\r\n* Dev\u002F0.4.44 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F654\r\n* Preserve history on AgentCard reload by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F653\r\n* Feat\u002Fsession list by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F656\r\n* Preserve history on AgentCard reload by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F655\r\n* Reload history when message files change by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F657\r\n* add parallel tool markers to tool display by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F658\r\n* Feat\u002Facp resume by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F659\r\n* fix: Bedrock multi-turn tool calling errors by @yarisoy in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F660\r\n* update message displays for history review, cyclic dependencies, kimi… by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F661\r\n\r\n## New Contributors\r\n* @floriafz23 made their first contribution in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F652\r\n* @yarisoy made their first contribution in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F660\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.43...v0.4.45","2026-01-31T09:37:47",{"id":233,"version":234,"summary_zh":235,"released_at":236},315363,"v0.4.43","## Changes\r\n- kimi 25 (plus instant toggle alias) @evalstate (#646)\r\n\u003Cimg width=\"720\" height=\"276\" alt=\"Screenshot 2026-01-27 120829\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F16ff5180-c2e9-4450-9e11-c882aeb37902\" \u002F>\r\n\r\nValidated Kimi-K2.5 with hugging face inference providers via novita. Structured, Vision, Tools and reasoning switch. Alias for \"instant\" added (moonshots term) -- use with `kimi25?instant=on` to disable thinking. ","2026-01-27T14:04:01",{"id":238,"version":239,"summary_zh":240,"released_at":241},315364,"v0.4.42","## fast-agent 0.4.42\r\n\r\n- OpenAI verbosity setting through model string and TUI\u002FACP (e.g. `Gpt-5.2?verbosity=high&reasoning=low`)\r\n- GLM 4.7 reasoning control (e.g. `glm?reasoning=off`)\r\n- Agent Lifecycle Hooks (see skill from `\u002Fskills add`)\r\n- Anthropic Structured Output support (supports reasoning with structured outputs. supply `structured=tool_use` to force legacy behaviour).\r\n- Fix #644 Azure headers.\r\n- Fix ruamel dependency for main package (from hf-inference-acp).\r\n- Improve error handling\u002Flogging for tool hooks.\r\n\r\n\r\n## What's Changed\r\n* Bump virtualenv from 20.35.4 to 20.36.1 by @dependabot[bot] in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F638\r\n* Feat\u002Fagent start hook by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F639\r\n* allow both tool_use and \"proper\" structured outputs for anthropic by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F641\r\n* refactor cpd (with opus post change) by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F642\r\n* Dev\u002F0.4.41 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F643\r\n* Dev\u002F0.4.42 by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F645\r\n\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.40...v0.4.42","2026-01-27T00:04:46",{"id":243,"version":244,"summary_zh":245,"released_at":246},315365,"v0.4.40","# fast-agent 0.4.40\r\n\r\nThis release note wraps up a huge number of features and improvements made over the last couple of weeks. I hope you enjoy them.\r\n\r\n## `fast-agent` skills\r\n\r\nSkills for modifying and working with `fast-agent` are available by default through `\u002Fskills add`. Use `\u002Fskills registry` to add a registry or select preconfigured (Hugging Face \u002F Anthropic). Repo is [here](https:\u002F\u002Fgithub.com\u002Ffast-agent-ai\u002Fskills\u002F)\r\n\r\n\u003Cimg width=\"360\"  alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F001cb0d1-0fd8-4fb8-8398-a8692b0e6737\" \u002F>\r\n\r\n## Tool Hooks and Agent Lifecycle Hooks\r\n\r\nExtend Agents with simple Python code using the inbuilt hooks. They let you hook Agent\u002FSubagent lifecycle and LLM Loop events, \r\nintercepting and modifying commands, adjusting inputs and outputs, starting containers, designing your own compaction strategies. \r\n\r\nThe following hooks are supported, extendable with simple Python code that gives you access to the execution context. \r\n\r\n**Tool hooks**: \r\n- `before_llm_call`\r\n- `after_llm_call`\r\n- `before_tool_call`\r\n- `after_tool_call`, \r\n- `after_turn_complete`\r\n\r\n**Agent Lifecycle hooks**: \r\n- `on_start`\r\n- `on_shutdown`\r\n\r\nWhen hooks are presented they are indicated with a `◆` next to the message or tool call. \r\n\r\n\u003Cimg width=\"360\"  alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fb6057df7-a189-4c50-91ee-f4f21e38415f\" \u002F>\r\n\r\nCheck the bundled skill to begin customising `fast-agent`! Switch on hot reloading with the `--watch` flag. \r\n\r\nTo create a subagent at runtime, simply use `\u002Fagent \u003Cfilename> --tool` .\r\n\r\n### Example \r\n\r\nAgent Card frontmatter:\r\n\r\n```markdown\r\nname: dev-agent\r\nmodel: codexplan\r\n tool_hooks:\r\n   after_turn_complete: hooks.py:save_history\r\n```\r\n\r\nPython code\r\n\r\n```python\r\n from fast_agent.hooks.hook_context import HookContext\r\n from fast_agent.mcp.prompt_serialization import save_messages\r\n\r\n async def save_history(ctx: HookContext) -> None:\r\n     save_messages(ctx.message_history, \"history.json\")\r\n```\r\n\r\n## User Interface Improvements (a3 design)\r\n\r\n`fast-agent` is unique in being CLI first - integrating perfectly with your terminal and preserving the scrollback buffer.  \r\n\r\n`fast-agent` is has had a visual refresh, improving usability in long tool loops and workflows. Vertical space is much better used, and the stream is optimised for supervising LLM, Tool and subagent streams - highlighting important elements and actions, and enabling interventions where needed. Long gone are the days of monitoring single MCP tools calls!  Forms (`human_input` and MCP Elicitation) are also cleaner, with more content able to placed on the screen.\r\n\r\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F840c6b29-f775-4b53-b619-06c891ce9dca\r\n\r\nOf course, if you prefer a more refined front-end experience try [Toad](https:\u002F\u002Fwww.batrachian.ai\u002F). Simply run `toad acp \"fast-agent-acp\"`. \r\n\r\n### Integrated Shell\r\n\r\nRun shell commands by entering `!` and the command. Shell completion is supported (`CTRL+SPACE`). Enter `!` to start a new shell, and `exit` to return to `fast-agent`. \r\n\r\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fc2d69a78-7241-4a4e-aebe-0767bb1403c7\r\n\r\n### Agent Query \r\n\r\nUse `#` to send a message to an agent, and have the result returned to your input buffer ready for editing. Perfect for getting different model\u002Fagents feedback on plans, or with the `human_input` tool to create an interactive experience - or simply to get concise inputs.\r\n\r\nhttps:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F24ae7bfa-531b-4ee8-bbc7-fa9b86428542\r\n\r\n### Bash output truncation\r\n\r\nBy default, shell output is truncated to 5 lines (configurable with `output_display_lines` under `shell_settings` in config). \r\n\r\nTo review the complete output use the `\u002Fhistory review` command. \r\n\r\n## Sessions and History Management\r\n\r\n`\u002Fhistory rewind` lets you go back to a previous user turn, and place the message at that point in to the input buffer for editing. \r\n\r\nSessions are saved automatically and resumable with the `\u002Fsession resume \u003Csessionid>` command or `--resume` cli flag, and can be forked with `\u002Fsession fork`.  Use `\u002Fsession title \u003Ctitle>` to give them memorable names.\r\n\r\n\u003Cimg width=\"640\"  alt=\"Screenshot 2026-01-24 225448\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fac27185d-8623-4263-a94e-c977bf3e949d\" \u002F>\r\n\r\n## fast-agent environments\r\n\r\nAgent environments (config, skills and agent cards) can be specified with the `--env \u003Cdirectory>` flag. They can also be deployed as MCP Servers (`fast-agent serve` or used with any ACP client (`fast-agent-acp` shortcut).\r\n\r\n## Reasoning Adjustment\r\n\r\nModel reasoning effort can be adjusted with the `\u002Fmodel reasoning` command, and supplied as a request parameter on the model string. \r\n\r\nFor example: \r\n\r\n`model: opus?reasoning=1024`\r\n`model: codexplan?reasoning=xhigh`\r\n`fast-agent --model haiku?reasoning=0`\r\n\r\nExisting configuration options and formats work, but more model settings will be migrated to this format over time.\r\n\r\n## OpenAI Codex Plan support\r\n\r\nUse `fa","2026-01-25T00:18:23",{"id":248,"version":249,"summary_zh":250,"released_at":251},315366,"v0.4.31","## Open Responses and GPT-5.2-codex.\r\n\r\n`fast-agent` has [Open Responses](https:\u002F\u002Fopenresponses.org) Client support. This is in beta until official SDKs etc. are launched. This was added by `fast-agent` using `gpt-5.2-codex` which was launched in `0.4.30`. The `codex` alias now points to this model.\r\n\r\nhttps:\u002F\u002Ffast-agent.ai\u002Fmodels\u002Fllm_providers\u002F\r\n\r\n\u003Cimg width=\"800\"  alt=\"image\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002F20e75ad5-845b-477d-b6b0-3021d3c7172a\" \u002F>\r\n\r\n\r\nJoin the `fast-agent` Discord [here](https:\u002F\u002Fdiscord.gg\u002Fxg5cJ7ndN6) to discuss.\r\n\r\n* 5.2 codex by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F616\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.30...v0.4.31","2026-01-15T22:17:40",{"id":253,"version":254,"summary_zh":255,"released_at":256},315368,"v0.4.27","## What's Changed\r\n\r\n### Toad\u002FAgent Card Examples \r\n\r\nAdded a new quickstart with hackable examples of Agents, Agents as Tools and Skills. Hot reload available (❤️ @iqdoctor  ).\r\n\r\nfast-agent: `fast-agent quickstart toad-examples`\r\nFrom Toad: `ctrl+o`, `Setup` and `\u002Fquickstart` or use the wizard\r\n\r\n### Hash Commands\r\n\r\nSend a message to an agent, and have it's result sent to the Input Buffer of the currently active agent. \r\n\r\n### MCP Client keep-alive\r\n\r\nClient to Server ping healthcheck (thanks @Agent-Hellboy )\r\n\r\n* server: add watch\u002Freload for ACP and MCP by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F594\r\n* mcp tool progress notifications, mcp server hygiene by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F601\r\n* fix \u002Fskills slash command, fast-agent-acp system prompt by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F604\r\n* Fix exit traceback and watch tool files by @iqdoctor in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F597\r\n* Feat\u002Fhash command by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F610\r\n* Feat\u002Ftoad enhance by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F612\r\n* Add optional client ping by @Agent-Hellboy in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F611\r\n* fix\u002Fminor changes, hf inference explorers demos by @evalstate in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F613\r\n\r\n## New Contributors\r\n* @Agent-Hellboy made their first contribution in https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fpull\u002F611\r\n\r\n**Full Changelog**: https:\u002F\u002Fgithub.com\u002Fevalstate\u002Ffast-agent\u002Fcompare\u002Fv0.4.22...v0.4.27","2026-01-11T11:52:23"]