Skip to main content

Agentic A2A

⚠️ Beta Version: This framework is currently in active development and is considered a beta release. Features may change, and some functionality may be unstable.

A Python framework for developing and deploying complete AI applications based on the following protocols:

  • Agent2Agent (A2A)
  • Model Context Protocol (MCP)

Table of contents

Overview

Agentic is a powerful framework that simplifies the creation of multi-agent systems by leveraging the a2a protocol. Built on top of FastAPI and the a2a-sdk, Agentic enables developers to easily define, deploy, and manage multiple AI agents. Agentic also allows the creation of tools according to the MCP standard. The MCP system is built on top of FastApiMCP.

Generally speaking, an Agentic application is a FastAPI application in all respects. It is therefore possible to exploit all the potential of the original framework with the addition of some utilities that simplify the implementation. For example, agentic provides a decorators system that simplifies the configuration of resources.

Key Features

  • Simple Agent Definition: Use @agent and @skill decorators to define agents and their capabilities with minimal boilerplate code
  • Multi-Agent Server: Deploy multiple agents on the same server instance
  • A2A Protocol Support: Built-in support for agent-to-agent communication using the standardized a2a protocol
  • FastAPI Integration: Leverages FastAPI's performance and features for robust web service deployment
  • A2A Client: Included client for easy interaction with deployed agents
  • MCP Tools: Use @mcp decorator to expose tools according to the MCP standard

Development Status

This project is currently in beta development. We are actively working on:

  • Stabilizing the core API
  • Adding comprehensive documentation
  • Implementing additional features

Feedback and contributions are highly appreciated as we work towards a stable release.

Getting Started

Project structure:

- app
-- agents
--- init.py
--- hello_agent.py
-- tools
--- init.py
--- hello_tool.py
main.py

Deploy the Server:

Create the main.py file with the following content:

from agentic.server import AgenticApp
AgenticApp(title="Agentic", root_package='app', port=8080).run()

The 'app' package should contain the agents and tools (see below).
You can define sub-packages to organize your agents and tools (you must define the init.py file in each package). At the server start, the server will automatically discover all agents and tools.
Run the app with:

python main.py

The app will start by default on "http://localhost:8080".
You can see the APIs documentation at "http://localhost:8080/docs".

A2A

Define an Agent:

Create the hello_agent.py file with the following content:

from agentic.a2a.core import agent, skill, BaseAgent
from a2a.server.agent_execution import RequestContext
from a2a.utils import new_agent_text_message
from a2a.server.events import Event

@agent(
    description="Hello World Agent",
)
class HelloAgent(BaseAgent):

    async def execute(self, input:RequestContext) -> Event:
        out = new_agent_text_message("Hello World!")
        return out

    @skill(
        name="say_hello", 
        description="Say hello to someone by name",
    )
    async def say_hello(self, name):
        ...
        return "Hello " + name + "!"

Use the A2A Client:

To test the server, you can use the A2A client. Here's an example of how to use the client to interact with the server:

import asyncio
from agentic.a2a.client import ClientA2A
from agentic.a2a.utility import ResponseParser
from a2a.types import DataPart

async def main():
    client = ClientA2A(url='http://localhost:8080')

    data = { "messages": [
            {'role': 'user', 'content': 'Hello!'},
    ]}
    
    result = await client.invoke("/helloagent", parts=[DataPart(data=data)])
    parser = ResponseParser(result)
    print("RESULT: ", parser.get_parts())

if __name__ == "__main__":
    asyncio.run(main())

MCP

Define an MCP Tool:

Create the hello_tool.py file with the following content:

from agentic.mcp.core import mcp

@mcp(
    methods=["GET"],
    tags=["hello"],
    path="/hello/{name}",
)
def hello_world(name:str) -> str:
    """ Hello World MCP tool """
    return "Hello, " + name + "!"

Integration with external MCP client:

The MCP server can be integrated with any MCP client such as Cloude Desktop. To connect the client with the remote server you need to use mcp-proxy. To install the proxy you can use uv:

uv tool install mcp-proxy

Below is an example for claude_desktop_config.json:

{
    "mcpServers": {
        "mytool": {
            "command": "uv",
            "args": ["tool", "run", "mcp-proxy", "http://localhost:8080/mcp"]
        }
    }
}

Contributing

As this is a beta project, contributions are especially welcome! Please feel free to:

  • Report bugs and issues
  • Suggest new features
  • Submit pull requests
  • Provide feedback on the API design

Links

Tutorials

Related fonts

Release files for agentic-a2a 0.1.13

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for agentic-a2a 0.1.13
File Interpreter ABI Platform
agentic_a2a-0.1.13-py3-none-any.whl Python 3 none any Details

Release files / agentic_a2a-0.1.13-py3-none-any.whl

Download URL agentic_a2a-0.1.13-py3-none-any.whl
Size 10.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1c98eda9e7e44d3ea51c986606556cfb56d67273c0525af5d47245b990727896
BLAKE2b-256 checksum
How to use checksums
e82f4fcaf81e09d69886a5a6804d52b30e157bc588a1578d811ac3b09dbb3e7a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 29, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.13 This release

1 release file

0.1.12

1 release file

0.1.11

1 release file

0.1.10

1 release file

0.1.9

1 release file

0.1.8

1 release file

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page