MCP ExplorerExplorer

A2a In Action

@huangjia2019on 9 months ago
3 MIT
FreeCommunity
AI Systems
#a2a#a2a-mcp#a2a-protocol#ai#llm#mcp
I cloned the A2A official repository and modified it to create practical code examples for beginners. Let's all get started with A2A!

Overview

What is A2a In Action

a2a-in-action is a modified clone of the official A2A project, designed as a practical code example for beginners to learn about A2A functionalities.

Use cases

Use cases include demonstrating A2A capabilities through sample agents, creating CLI applications for task execution, and developing web applications that interact with multiple agents.

How to use

To use a2a-in-action, clone the repository, ensure you have Python 3.13 or higher and UV installed, then run the sample agents and host applications as described in the README.

Key features

Key features include a common codebase for A2A communication over HTTP, multiple sample agents in various frameworks, and host applications that demonstrate task completion and orchestration.

Where to use

a2a-in-action can be used in educational settings for teaching A2A concepts, as well as in development environments for testing and prototyping A2A applications.

Content

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.

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers