> ## Documentation Index
> Fetch the complete documentation index at: https://docs.agno.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Basic Client Usage

> Connect to an AgentOS instance and perform basic operations

<Steps>
  <Step title="Create a Python file">
    ```python basic_client.py theme={null}
    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())
    ```
  </Step>

  <Snippet file="create-venv-step.mdx" />

  <Step title="Install dependencies">
    ```bash theme={null}
    uv pip install -U agno openai
    ```
  </Step>

  <Step title="Export your OpenAI API key">
    <CodeGroup>
      ```bash Mac/Linux theme={null}
      export OPENAI_API_KEY="your_openai_api_key_here"
      ```

      ```bash Windows theme={null}
      $Env:OPENAI_API_KEY="your_openai_api_key_here"
      ```
    </CodeGroup>
  </Step>

  <Step title="Start an AgentOS Server">
    Make sure you have an AgentOS server running on port 7777. See [Creating Your First OS](/agent-os/run-your-os) for setup instructions.
  </Step>

  <Step title="Run the Client">
    <CodeGroup>
      ```bash Mac theme={null}
      python basic_client.py
      ```

      ```bash Windows theme={null}
      python basic_client.py
      ```
    </CodeGroup>
  </Step>
</Steps>
