> ## 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.

# Compose AgentOS and A2A RemoteAgents in one Team

> A local Team can coordinate remote members reached through different protocols.

A local Team can coordinate remote members reached through different protocols. Delegating to every member makes both network hops visible in one run.

```python remote_as_team_member.py theme={null}
"""
Compose AgentOS and A2A RemoteAgents in one Team
================================================

A local Team can coordinate remote members reached through different
protocols. Delegating to every member makes both network hops visible in one
run.

Prerequisites: start `servers/agentos_server.py` and `servers/a2a_server.py`; set OPENAI_API_KEY
Run: .venvs/demo/bin/python cookbook/05_agent_os/20_remote/04_remote_as_team_member.py
Try: inspect the two recorded member responses after the Team answer
"""

import asyncio

from agno.agent import RemoteAgent
from agno.models.openai import OpenAIResponses
from agno.team import Team

# ---------------------------------------------------------------------------
# Create Remote Members
# ---------------------------------------------------------------------------

agentos_member = RemoteAgent(
    base_url="http://127.0.0.1:7780",
    agent_id="researcher-agent",
)

a2a_member = RemoteAgent(
    base_url="http://127.0.0.1:7781/a2a/agents/a2a-assistant",
    agent_id="a2a-assistant",
    protocol="a2a",
    a2a_protocol="rest",
)

# ---------------------------------------------------------------------------
# Create Hybrid Team
# ---------------------------------------------------------------------------

hybrid_team = Team(
    id="hybrid-remote-team",
    name="Hybrid Remote Team",
    model=OpenAIResponses(id="gpt-5.5"),
    members=[agentos_member, a2a_member],
    instructions=[
        "Ask every remote member to answer the user's request.",
        "Synthesize their answers and identify which transport reached each member.",
    ],
    delegate_to_all_members=True,
    show_members_responses=True,
    markdown=True,
)

# ---------------------------------------------------------------------------
# Run Hybrid Team
# ---------------------------------------------------------------------------


async def run_hybrid_team() -> None:
    """Run both remote members and verify their responses were retained."""
    response = await hybrid_team.arun(
        "Explain one benefit of composing remote Agents, then calculate 12 times 8.",
    )
    if len(response.member_responses) != 2:
        raise RuntimeError("Expected one response from each remote member")

    print(f"Team run: {response.run_id}")
    print(f"Remote member responses: {len(response.member_responses)}")
    print(response.content)


if __name__ == "__main__":
    asyncio.run(run_hybrid_team())
```

## Run the Example

<Steps>
  <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="Run the example">
    Save the code above as `remote_as_team_member.py`, then run:

    ```bash theme={null}
    python remote_as_team_member.py
    ```
  </Step>
</Steps>

Full source: [cookbook/05\_agent\_os/20\_remote/04\_remote\_as\_team\_member.py](https://github.com/agno-agi/agno/blob/v3.0.4/cookbook/05_agent_os/20_remote/04_remote_as_team_member.py)
