1 Star 1 Fork 0

Gitee 极速下载/mcp-agent

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
此仓库是为了提升国内下载速度的镜像仓库,每日同步一次。 原始仓库: https://github.com/lastmile-ai/mcp-agent
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README

MCP Swarm Agent

mcp-agent implements OpenAI's Swarm pattern for multi-agent workflows, but in a way that can be used with any model provider.

This example is taken from the Swarm repo, and shown to work with MCP servers and Anthropic models (and can of course also work with OpenAI models).

This example demonstrates a multi-agent setup for handling different customer service requests in an airline context using the Swarm framework. The agents can triage requests, handle flight modifications, cancellations, and lost baggage cases.

https://github.com/user-attachments/assets/b314d75d-7945-4de6-965b-7f21eb14a8bd

Agents

  1. Triage Agent: Determines the type of request and transfers to the appropriate agent.
  2. Flight Modification Agent: Handles requests related to flight modifications, further triaging them into:
    • Flight Cancel Agent: Manages flight cancellation requests.
    • Flight Change Agent: Manages flight change requests.
  3. Lost Baggage Agent: Handles lost baggage inquiries.

1 App set up

First, clone the repo and navigate to the workflow swarm example:

git clone https://github.com/lastmile-ai/mcp-agent.git
cd mcp-agent/examples/workflows/workflow_swarm

Install uv (if you don’t have it):

pip install uv

Sync mcp-agent project dependencies:

uv sync

Install requirements specific to this example:

uv pip install -r requirements.txt

2 Set up environment variables

Copy and configure your secrets and env variables:

cp mcp_agent.secrets.yaml.example mcp_agent.secrets.yaml

Then open mcp_agent.secrets.yaml and add your api key for your preferred LLM.

3 Run locally

Run your MCP Agent app:

uv run main.py
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/mirrors/mcp-agent.git
git@gitee.com:mirrors/mcp-agent.git
mirrors
mcp-agent
mcp-agent
main

搜索帮助