a2a-in-action

我从A2A官方克隆下来,并加以修改的A2A实战代码示例,用于初学者入门教学,大家一起来A2A吧。

GitHub Stars

45

User Rating

Not Rated

Favorites

0

Views

8

Forks

28

Issues

1

README
极客时间专栏学习之旅

👉 点击进入专栏介绍页


本专栏自上线两周以来,已有近3000位同学加入学习之旅。欢迎你一同开启知识探索之门!

极客时间

Sample Code

This code is used to demonstrate A2A capabilities as the spec progresses.\ Samples are divided into 3 sub directories:

  • Common
    Common code that all sample agents and apps use to speak A2A over HTTP.

  • Agents
    Sample agents written in multiple frameworks that perform example tasks with tools. These all use the common A2AServer.

  • Hosts
    Host applications that use the A2AClient. Includes a CLI which shows simple task completion with a single agent, a mesop web application that can speak to multiple agents, and an orchestrator agent that delegates tasks to one of multiple remote A2A agents.

Prerequisites
  • Python 3.13 or higher
  • UV
Running the Samples

Run one (or more) agent A2A server and one of the host applications.

The following example will run the langgraph agent with the python CLI host:

  1. Navigate to the agent directory:
    cd samples/python/agents/langgraph
    
  2. Run an agent:
    uv run .
    
  3. In another terminal, navigate to the CLI directory:
    cd samples/python/hosts/cli
    
  4. Run the example client
    uv run .
    

NOTE:
This is sample code and not production-quality libraries.