Skip to main content

Python framework for implementing multi-agent systems

Project description

Agentic A2A

A Python framework for developing and deploying complete AI applications that includes:

  • Multi-agent systems according to the Agent2Agent (A2A) protocol
  • MCP tools

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

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.

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

Note: As this is a beta version, the API may change in future releases.

  1. Define an Agent:

    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="Agent for performing arithmetic operations",
     )
     class MathAgent(BaseAgent):
    
         async def execute(self, input:RequestContext) -> Event:
             ...
             out = new_agent_text_message("The result is: ...")
             return out
    
         @skill(
             name="Sum operation", 
             description="Retur result of sum of two numbers",
         )
         async def sum(self, input):
             ...
             return "The result is: ..."
    
  2. Define an MCP Tool:

     from agentic.mcp.core import mcp
     @mcp(
         name="hello_world",
         methods=["GET"],
         path="/hello/{name}",
     )
     def hello_world(name:str) -> str:
         """ Prenota un concerto."""
         return "Hello, " + name + "!"
    
  3. Deploy the Server:

     from agentic.server import AgenticApp
     AgenticApp(scan_root='agents').run()
    
  4. Use the A2A Client:

     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:9999')
    
         data = { "messages": [
                 {'role': 'user', 'content': '...'}
         ]}
         
         result = await client.invoke("/mathAgent", parts=[DataPart(data=data)])
         parser = ResponseParser(result)
         print("RESULT: ", parser.get_parts())
    
     if __name__ == "__main__":
     asyncio.run(main())
    

Architecture

Agentic follows the agent-to-agent (a2a) protocol specification, enabling:

  • Standardized communication between agents
  • Interoperability with other a2a-compliant systems
  • Scalable multi-agent architectures
  • Easy integration with existing AI workflows

Requirements

  • Python 3.8+
  • FastAPI
  • a2a-python SDK
  • httpx (for client functionality)

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agentic_a2a-0.1.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file agentic_a2a-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: agentic_a2a-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for agentic_a2a-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 226777a1028a0a1662d35e3da353632c47f6dddb6abb3b6968b17a031e621df6
MD5 3feb99a40374fd68ff36655106bf001e
BLAKE2b-256 aebb8a515d2bd28077dc695219258094c0a829d4068b8a55ed437c1a359ce27a

See more details on using hashes here.

Provenance

The following attestation bundles were made for agentic_a2a-0.1.2-py3-none-any.whl:

Publisher: publish.yml on DevTurtleBlog/agentic

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page