Skip to main content

Overview

A2ARemoteTeam wraps a remote team endpoint behind the standard Team interface, enabling seamless integration with local orchestration.

Quick Start

import { A2ARemoteTeam } from "@radaros/core";

const remoteTeam = new A2ARemoteTeam({
  url: "https://api.example.com",
  name: "research-team",
  headers: { Authorization: "Bearer token" },
});

const output = await remoteTeam.run("Analyze market trends");
console.log(output.text);

Streaming

for await (const chunk of remoteTeam.stream("Research competitors")) {
  if (chunk.type === "text") process.stdout.write(chunk.text);
}

Configuration

OptionTypeDefaultDescription
urlstringrequiredBase URL of the remote server
namestring"remote-team"Team name (used in URL path)
headersRecord<string, string>Custom headers (e.g. auth)
timeoutMsnumber120000Request timeout

URL Mapping

  • run()POST {url}/teams/{name}/run
  • stream()POST {url}/teams/{name}/stream (SSE)