Catalog PyPI
PACKAGE EXPLORERView in registry

ai-agent2agent

PyPI

A Python library for Agent-to-Agent communication

Versions collected1
Direct dependencies7From release 0.1.1
Last observed21 Oct, 09:50 UTC

README

Version 0.1.1 documentation

AI Agent2Agent

A Python library for Agent-to-Agent communication.

Installation

pip install ai_agent2agent

Usage

Client

from agent2agent import A2AClient, A2ACardResolver

# Initialize client
client = A2AClient(url="https://your-agent-endpoint.com", api_key="your-api-key")

# Example: Send a task to an agent
response = client.send_task(
    message={
        "role": "user",
        "parts": [{"type": "text", "text": "Hello, Agent!"}]
    }
)

# Print the task ID
print(f"Task ID: {response.id}")

Server

from agent2agent import A2AServer, InMemoryTaskManager

# Initialize server with an in-memory task manager
task_manager = InMemoryTaskManager()
server = A2AServer(task_manager=task_manager)

# Register handler for tasks
@server.handle_task
async def handle_task(task):
    # Process the task
    return {
        "role": "agent",
        "parts": [{"type": "text", "text": "Task completed!"}]
    }

# Run the server (depends on your web framework)

Features

  • Client-server architecture for agent communication
  • Support for various message types (text, files, data)
  • Task management with different states
  • In-memory caching
  • Push notification support

License

MIT

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.123 Apr 20257

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
your-username/ai_agent2agent

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 09:50 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:b4892d18f96e287cda915ad800723c11cf6ad5549e132127bf36ddb9c4cd858c