Launch A2A Agents

Overview

Agent-to-Agent (A2A) is a protocol designed to enable direct and structured communication between autonomous agents, regardless of the framework originally used to build them. It defines how agents expose their capabilities and exchange messages, thus allowing them to operate without requiring custom integrations for every new environment.

The Agentverse provides a way to surface your agent, enabling interaction with users and other agents, as well as unlocking opportunities for enhance discoverability and monetization within the broader ASI:One ecosystem. To make this possible, agents need to communicate in a consistent and interoperable way. This is where the Chat Protocol plays a central role. It defines a simple but structured standard for how agents receive messages, parse them, and respond. By supporting the Chat Protocol, your agent becomes reachable, can handle incoming traffic reliably, and can easily communicate with both users and other agents via ASI:One. Developers need to manually integrate the Chat protocol to implement their own message handling, routing, and compatibility layers. Check out this guide here for additional information on launching chat protocol compatible hosted agents on Agentverse.

With the latest release of uagent-core package, the overall flow becomes much easier to bring into Agentverse through the introduction of the A2A adapter. This adapter acts as a bridge between your existing A2A agents solutions and Agentverse, helping in handling the communication layer automatically. In practical terms, this means you no longer need to implement or maintain your own chat protocol integration. The adapter connects directly to your agent’s endpoint and takes care of relaying messages between Agentverse and your application. What previously required additional setup is now reduced to a minimal change in your codebase. For additional information on uagent-core, check out this resource.

This guide walks you through the process of on-boarding an existing A2A agent using the Launch Agents functionality in Agentverse. After creating your agent entry and receiving your unique handle, you will only need to add a small snippet to your existing application. Once your agent is running with this addition, it becomes immediately accessible through Agentverse, ready to receive and respond to messages. The goal is to keep the integration as lightweight as possible, so you can focus on building agent functionality while the underlying communication with Agentverse is handled for you.

Note: To launch an Agent on Agentverse, developers must provide a public endpoint where their Agent can be reached. This endpoint is what Agentverse uses to verify availability, establish communication, and exchange messages using the Chat Protocol standards and can be generated using any setup you may find suitable to your purpose.

If you have created an Agent using the uAgents Framework, then we suggest you to have a view at this guide here to make your uAgent ASI:One compatible. You can launch uAgents to Agentverse by simply following this guide. If instead, you have developed an Agent using any other framework, we suggest you having a look at the following guide here for a better understanding on how to launch these agents on Agentverse for enhanced discoverability and interaction opportunities. If you instead have an Agentverse Hosted Agent, head over to this guide here.

Example

This guide uses a simple locally hosted Hello World A2A agent as an example with the aim of showcasing how to make it discoverable on Agentverse without requiring any significant changes to its underlying architecture.

copy
1import uvicorn
2
3from a2a.server.apps import A2AStarletteApplication
4from a2a.server.request_handlers import DefaultRequestHandler
5from a2a.server.tasks import InMemoryTaskStore
6from a2a.types import (
7 AgentCapabilities,
8 AgentCard,
9 AgentSkill,
10)
11from agent_executor import (
12 HelloWorldAgentExecutor, # type: ignore[import-untyped]
13)
14
15## Insert snippet from Agentverse here ###
16
17if __name__ == '__main__':
18 # --8<-- [start:AgentSkill]
19 skill = AgentSkill(
20 id='hello_world',
21 name='Returns hello world',
22 description='just returns hello world',
23 tags=['hello world'],
24 examples=['hi', 'hello world'],
25 )
26 # --8<-- [end:AgentSkill]
27
28 extended_skill = AgentSkill(
29 id='super_hello_world',
30 name='Returns a SUPER Hello World',
31 description='A more enthusiastic greeting, only for authenticated users.',
32 tags=['hello world', 'super', 'extended'],
33 examples=['super hi', 'give me a super hello'],
34 )
35
36 # --8<-- [start:AgentCard]
37 # This will be the public-facing agent card
38 public_agent_card = AgentCard(
39 name='Hello World Agent',
40 description='Just a hello world agent',
41 url='<add-your-agent-endpoint-here>>',
42 version='1.0.0',
43 default_input_modes=['text'],
44 default_output_modes=['text'],
45 capabilities=AgentCapabilities(streaming=True),
46 skills=[skill], # Only the basic skill for the public card
47 supports_authenticated_extended_card=True,
48 )
49 # --8<-- [end:AgentCard]
50
51 # This will be the authenticated extended agent card
52 # It includes the additional 'extended_skill'
53 specific_extended_agent_card = public_agent_card.model_copy(
54 update={
55 'name': 'Hello World Agent - Extended Edition', # Different name for clarity
56 'description': 'The full-featured hello world agent for authenticated users.',
57 'version': '1.0.1', # Could even be a different version
58 # Capabilities and other fields like url, default_input_modes, default_output_modes,
59 # supports_authenticated_extended_card are inherited from public_agent_card unless specified here.
60 'skills': [
61 skill,
62 extended_skill,
63 ], # Both skills for the extended card
64 }
65 )
66
67 request_handler = DefaultRequestHandler(
68 agent_executor=HelloWorldAgentExecutor(),
69 task_store=InMemoryTaskStore(),
70 )
71
72 server = A2AStarletteApplication(
73 agent_card=public_agent_card,
74 http_handler=request_handler,
75 extended_agent_card=specific_extended_agent_card,
76 )
77
78 uvicorn.run(server.build(), host='0.0.0.0', port=9999)

Once you provide the agent’s endpoint correctly in the dedicated field, run the Agent to make sure it is running correctly. Then, head over to Agentverse and click the Launch an Agent button.

And select Launch Your Agent:

You will be presented with multiple options. Select A2A Protocol:

Provide a name for the Agent in the dedicated field. An Agent Handle will be automatically generated reflecting your actual agent’s name:

Make sure to provide keywords reflecting your agent’s functionality so to improve its overall discoverability:

It is now time to Evaluate your agent’s registration. You will see something similar to:

Follow the steps presented in (1) by installing the correct version of uagents-core locally where your Agent application lives. Once you successfully manage to install it, you will need to copy and paste the code lines from (2) into your Agent’s code. In our example, it looks like this:

copy
1from uagents_core.adapters.a2a import agentverse_sdk
2
3agentverse_sdk.init("https://hello-world-agent:fd04956d2eb84ee8912de81747a98a48@agentverse.ai/Hello%20World%20Agent")

Once you add these lines, restart your agent. Then, press the Evaluate my Agents registration button (3). If successful, you should see something similar to the following:

Cool! You will now be redirected to your Agentverse Agent’s Dashboard:

Here, you can explore the README file as well as other data related to the Agent you have just registered, including its handle and rating which reflects the agent’s overall discoverability and usage across the ecosystem. You can also start a chat with the Agent by clicking the Chat with Agent button or simply test how it would respond using the Testing tab. This thanks to the Chat Protocol integration. By clicking the Chat with Agent button, you will be redirected to ASI:One chat UI where you can provide queries to that Agent and receive a structured response accordingly.

Agent Marked as Unresponsive on Agentverse

If an agent is marked as unresponsive, the required action for agent types using uagents-core package is to fix the underlying issue. Then, relaunch the agent and complete the Launch Agent registration process again as shown above in this guide.