RemoteAgent provides an asynchronous network interface to an agent hosted by AgentOS or an A2A-compatible server. Use arun() for streaming or non-streaming execution. The AgentOS protocol also supports acontinue_run() and acancel_run(). Synchronous Agent methods such as run() and print_response() are unavailable.
Installation
Basic Usage
Parameters
Properties
id
Returns the agent ID.
name
Returns the agent’s name from the remote configuration.
description
Returns the agent’s description from the remote configuration.
role
Returns the agent’s role from the remote configuration. Unlike the other accessors, role is a method, so call it.
tools
In Agno v3.0.4, the tools property returns None for the normal AgentOS response shape. Read the materialized tool list from the remote configuration instead:
db
Returns a RemoteDb instance if the agent has a database configured.
knowledge
Returns a RemoteKnowledge instance if the agent has knowledge configured.
Methods
arun
Execute the remote agent asynchronously.
Returns:
RunOutputwhenstream=FalseAsyncIterator[RunOutputEvent]whenstream=True
acontinue_run
Continue a paused AgentOS run with completed requirements.
Returns:
RunOutputwhenstream=FalseAsyncIterator[RunOutputEvent]whenstream=True
acancel_run
Cancel a running AgentOS execution.
Returns:
bool - True if successfully cancelled
get_agent_config
Get the agent configuration from the remote server (always fetches fresh).
AgentResponse
refresh_config
Force refresh the cached agent configuration.
Optional[AgentResponse] (None when using the A2A protocol)
A2A Protocol Support
RemoteAgent can connect to any A2A-compatible server using the protocol="a2a" parameter:
Connecting to Agno A2A Servers
Connecting to Google ADK
Google ADK uses JSON-RPC mode. Seta2a_protocol="json-rpc":
Protocol Options
The A2A protocol supports streaming and non-streaming
arun() calls. Run continuation and cancellation require the AgentOS protocol.Using in AgentOS Gateway
Remote agents can be registered in a local AgentOS to create a gateway:Error Handling
Authentication
For authenticated AgentOS instances, pass theauth_token parameter:
auth_token applies to run, continuation, and cancellation calls. Configuration and property fetches do not accept a token.