RemoteTeam allows you to run teams that are hosted on a remote AgentOS instance. It provides the same interface as a local team, making it easy to integrate remote teams into your applications.
Installation
Basic Usage
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url | str | Required | Base URL of the remote AgentOS instance (e.g., "http://localhost:7777") |
team_id | str | Required | ID of the remote team to execute |
timeout | float | 300.0 | Request timeout in seconds |
config_ttl | float | 300.0 | Time-to-live for cached configuration in seconds |
Properties
id
Returns the team ID.
name
Returns the team’s name from the remote configuration.
description
Returns the team’s description from the remote configuration.
role
Returns the team’s role from the remote configuration.
tools
Returns the team’s tools as a list of dictionaries.
db
Returns a RemoteDb instance if the team has a database configured.
knowledge
Returns a RemoteKnowledge instance if the team has knowledge configured.
Methods
arun
Execute the remote team asynchronously.
| Parameter | Type | Default | Description |
|---|---|---|---|
input | str | List | Dict | Message | BaseModel | Required | The input message for the team |
stream | bool | False | Whether to stream the response |
user_id | Optional[str] | None | User ID for the run |
session_id | Optional[str] | None | Session ID for context persistence |
session_state | Optional[Dict] | None | Session state dictionary |
images | Optional[Sequence[Image]] | None | Images to include |
audio | Optional[Sequence[Audio]] | None | Audio to include |
videos | Optional[Sequence[Video]] | None | Videos to include |
files | Optional[Sequence[File]] | None | Files to include |
stream_events | Optional[bool] | None | Whether to stream events |
retries | Optional[int] | None | Number of retries |
knowledge_filters | Optional[Dict] | None | Filters for knowledge search |
add_history_to_context | Optional[bool] | None | Add history to context |
dependencies | Optional[Dict] | None | Dependencies dictionary |
metadata | Optional[Dict] | None | Metadata dictionary |
auth_token | Optional[str] | None | JWT token for authentication |
TeamRunOutputwhenstream=FalseAsyncIterator[TeamRunOutputEvent]whenstream=True
cancel_run
Cancel a running team execution.
| Parameter | Type | Default | Description |
|---|---|---|---|
run_id | str | Required | ID of the run to cancel |
auth_token | Optional[str] | None | JWT token for authentication |
bool - True if successfully cancelled
get_team_config
Get the team configuration from the remote server (always fetches fresh).
TeamResponse
refresh_config
Force refresh the cached team configuration.
TeamResponse
Using in AgentOS Gateway
Remote teams can be registered in a local AgentOS to create a gateway:Streaming Example
Error Handling
Authentication
For authenticated AgentOS instances, pass theauth_token parameter: