Clients

Python clients for connecting to agent servers

Agno provides Python clients for programmatic access to agent servers. These clients enable you to run agents, manage sessions, and integrate AI capabilities into your applications.

Available Clients

Choosing a Client

ClientUse Case
AgentOSClientConnect to Agno AgentOS instances with full feature access (sessions, knowledge, memories, traces)
A2AClientConnect to a compatible A2A REST or JSON-RPC server for cross-framework agent communication

Prerequisites

Install uv pip install -U "agno[os]" in the client environment. The AgentOS examples below connect to the Remote Execution quickstart server, which registers assistant-agent on port 7778. Follow that guide's server dependency and model-key setup first. Provider credentials belong in the server process.

The local quickstart is unauthenticated; protected servers require a bearer header on each request. Session-management operations additionally require a database registered with the server.

Quick Comparison

AgentOSClient

Best for connecting to Agno AgentOS instances where you need full access to all features:

import asyncio

from agno.client import AgentOSClient

async def main():
    client = AgentOSClient(base_url="http://localhost:7778")

    config = await client.aget_config()
    result = await client.run_agent(agent_id="assistant-agent", message="Hello!")

asyncio.run(main())

For session CRUD with a database-backed server, follow Session Management.

A2AClient

These are alternative endpoints. Start the Agno A2A server for the first call. The Google ADK call requires a separately deployed JSON-RPC server on port 8001; see A2A Client.

import asyncio

from agno.client.a2a import A2AClient

async def main():
    # Connect to an Agno A2A endpoint
    client = A2AClient("http://localhost:7777/a2a/agents/my_agent")
    result = await client.send_message(message="Hello!")

    # Or connect to Google ADK
    client = A2AClient("http://localhost:8001/", protocol="json-rpc")
    result = await client.send_message(message="Hello!")

asyncio.run(main())