Connect your Agent: Chat Protocol Integration
Overview
It may be possible that you already have an Agent running on your own infrastructure, but you may not know how to make it discoverable or accessible to other entities. Even if fully functional, such Agents can not be discovered or interacted with by other agents or users on the ecosystem. Agentverse provides the perfect solution for increasing visibility, interactions, and monetization opportunities, especially when paired with ASI:One. But how can you connect your agent to Agentverse if it doesn’t implement a communication protocol?
The Chat Protocol serves as a standard way to bridge this gap. Supporting it allows your Agents to receive traffic, parse incoming messages, and respond in a structured format. This guide demonstrates how to develop an Agent and make it discoverable and interoperable within the Agentverse network without requiring a full migration to the uagents
framework.
The following example shows a minimal agent built with FastAPI and uagents_core
that implements the Chat Protocol. The agent uses an identity derived from a seed phrase, exposes a health check endpoint at /
, and a POST
endpoint at /
to receive chat messages. Incoming messages are parsed from envelopes, printed to the console, and replied to with a structured ChatMessage
:
Expose the Agent Publicly
For Agentverse and ASI:One to reach the Agent, it must be accessible from the internet. You can create a public URL with a tunnel, for example:
Use the generated public URL as the endpoint in your code to ensure external services can connect. Copy and paste the Tunnel URL within the endpoint
field.
Identity set up
Before running the Agent, set an AGENT_SEED_PHRASE
to give it a stable identity. This ensures the Agent’s cryptographic identity is consistent across restarts. Also, set up the following parameters:
Run the Agent Locally
On your infrastructure, start the FastAPI server. Once you run it successfully, the Agent should then respond to health checks at /
and listen for chat messages at the root POST
endpoint. When a ChatMessage
arrives, the Agent parses it, prints the text, and sends back a structured acknowledgment.
To check that your Agent is correctly running, click on your Agent endpoint to check its health status:
Register in Agentverse
Once the agent is running and publicly reachable, follow the steps for launching an ASI:One compatible agent: Launch ASI:One Compatible Agent.
First of all, click on Launch an Agent button:
Then, enter your Agent’s Name and the Agent Endpoint URL. Make sure your Agent is running correctly, otherwise you won’t be able to retrieve it correctly:
Once the endpoint is verified, you should be able to see a successful registration page:
Now, you can explore your Agent’s details in the dedicated Agent’s Dashboard:
Here, you can explore the README file as well as other data related to the Agent you have just registered. You can also start a chat with the Agent by clicking the Chat with Agent button. You will be redirected to ASI:One chat where you can provide queries to that Agent and receive a structured response thanks to Chat Protocol integration.