Skip to main content
1

Create a Python file

touch basic_client.py
2

Add the following code to your Python file

basic_client.py
import asyncio

from agno.client import AgentOSClient


async def main():
    # Connect to AgentOS
    client = AgentOSClient(base_url="http://localhost:7777")
    
    # Get AgentOS configuration
    config = await client.aget_config()
    print(f"Connected to: {config.name or config.os_id}")
    print(f"Available agents: {[a.id for a in (config.agents or [])]}")
    print(f"Available teams: {[t.id for t in (config.teams or [])]}")
    print(f"Available workflows: {[w.id for w in (config.workflows or [])]}")

    # Get details about a specific agent
    if config.agents:
        agent_id = config.agents[0].id
        agent = await client.aget_agent(agent_id)
        print("\nAgent Details:")
        print(f"  Name: {agent.name}")
        print(f"  Model: {agent.model}")
        print(f"  Tools: {len(agent.tools or [])}")


if __name__ == "__main__":
    asyncio.run(main())
3

Create a virtual environment

Open the Terminal and create a python virtual environment.
python3 -m venv .venv
source .venv/bin/activate
4

Install libraries

pip install -U agno openai
5

Export your OpenAI API key

export OPENAI_API_KEY="your_openai_api_key_here"
6

Start an AgentOS Server

Make sure you have an AgentOS server running on port 7777. See Creating Your First OS for setup instructions.
7

Run the Client

python basic_client.py