Skip to main content
This guide walks you through integrating the Agent-to-Agent (A2A) Protocol v0.3.0 with your Tyler agents, enabling multi-agent coordination and delegation across different platforms.
Use A2A when one agent delegates to or exposes another agent. Use MCP for external tools, services, and data sources.
💻 Code Examples

A2A Server

Expose a Tyler agent via A2A

A2A Client

Connect to remote A2A agents

Multi-Agent

Coordinate multiple A2A agents

Prerequisites

Before starting, ensure you have:
  • Tyler installed and working
  • Basic understanding of Tyler agents
  • Python 3.11+ environment

Installation

Tyler includes A2A support out of the box:
The A2A integration is fully supported in Tyler. All dependencies are included automatically.

Part 1: Connecting to Remote A2A Agents (Client Mode)

Step 1: Create an A2A Adapter

Step 2: Connect to Remote Agents

Step 3: Create Tyler Agent with Delegation Tools

Step 4: Use the Coordinating Agent

Part 2: Exposing Tyler Agents via A2A (Server Mode)

Step 1: Create a Specialized Tyler Agent

Step 2: Create A2A Server with Authentication

Step 3: Start the A2A Server

Part 3: Working with Part Types

Sending Files to Remote Agents

Sending Structured Data

Part 4: Working with Artifacts

Retrieving Task Artifacts

Part 5: Context-Based Task Grouping

Part 6: Push Notifications for Long-Running Tasks

Configuring Push Notifications

Handling Webhook Events

Part 7: Advanced Multi-Agent Patterns

Creating Agent Networks

Task Streaming and Monitoring

Tyler’s A2A server supports both streaming and non-streaming request modes:

Non-Streaming (message/send)

For simple requests where you want to wait for the complete response:

Real-Time Streaming (message/stream)

When clients call message/stream, they receive response tokens as they’re generated by the LLM via Server-Sent Events (SSE):
For local coordinating agents, you can also stream using Tyler’s native streaming:

Part 8: Production Considerations

Security and Authentication

Error Handling and Resilience

Troubleshooting

Common Issues

Problem: Getting import errors when using A2A features.Solution: A2A SDK is included with Tyler. Ensure you have the latest version:
Problem: Cannot connect to remote A2A agents.Solutions:
  • Verify the agent URL is correct and accessible
  • Check network connectivity and firewall settings
  • Ensure the remote agent is running and healthy
  • Verify authentication credentials if required
Problem: Webhook notifications are not being received.Solutions:
  • Verify webhook URL is accessible from the agent’s network
  • Check that the URL uses HTTPS (required for security)
  • Ensure webhook server returns 2xx status codes
  • Verify HMAC signature validation if using secrets
Problem: Cannot retrieve artifacts from completed tasks.Solutions:
  • Ensure task has actually completed
  • Check that the remote agent supports artifacts
  • Verify connection is still active

Best Practices Summary

A2A Integration Best Practices

Connection Management
  • Always handle connection failures gracefully
  • Implement health checks for connected agents
  • Use connection pooling for high-throughput scenarios
Task Delegation
  • Be specific in task descriptions for remote agents
  • Use context IDs to group related tasks
  • Monitor task progress with push notifications for long-running tasks
  • Retrieve and process artifacts for structured results
Security
  • Always use HTTPS in production
  • Implement proper authentication and authorization
  • Use HMAC signing for webhook verification
  • Validate agent cards and capabilities
Performance
  • Monitor delegation latency and success rates
  • Use streaming for long-running tasks
  • Implement caching where appropriate
Error Handling
  • Plan for network failures and agent unavailability
  • Log delegation attempts and outcomes
  • Provide meaningful error messages to users

Next steps

Now that you have A2A integration working, explore these advanced topics:

A2A Concepts

Deep dive into A2A protocol concepts

Multi-Agent Patterns

Advanced agent delegation patterns

A2A Specification

Official A2A Protocol v0.3.0 specification

Production Deployment

Deploy A2A agents to production