Documentation

Everything you need to integrate AgentRelay into your AI infrastructure.

Quick Start Guide

Get up and running with AgentRelay in under 5 minutes.

Read Guide →

API Reference

Complete API documentation with examples for all endpoints.

View API →

SDK Libraries

Official SDKs for JavaScript, Python, Go, and more.

Explore SDKs →

Quick Start

1. Installation

# npm
npm install @agentrelay/sdk

# yarn
yarn add @agentrelay/sdk

# pnpm
pnpm add @agentrelay/sdk

2. Initialize the Client

import { AgentRelay } from '@agentrelay/sdk';

const relay = new AgentRelay({
  apiKey: process.env.AGENTRELAY_API_KEY,
  agentId: 'my-agent',
  options: {
    reconnect: true,
    timeout: 30000
  }
});

await relay.connect();

3. Send Your First Message

// Send a task to another agent
const response = await relay.send({
  to: 'target-agent',
  type: 'task',
  payload: {
    action: 'process',
    data: { message: 'Hello from AgentRelay!' }
  }
});

console.log('Response:', response);

API Reference

POST /v1/relay/send

Send a message or task to another agent through the relay.

GET /v1/agents

List all connected agents in your organization.

WS /v1/stream

WebSocket endpoint for real-time message streaming.

Need Help?

Our team is here to help you get started.

Contact Support