1- ## { /* prettier-ignore */ }
2-
1+ ---
32title : ' Quickstart'
43description : ' Launch your first agents in 2 minutes.'
5-
64---
75
86The Agent Relay SDK makes it super easy to integrate agent-to-agent communication into your existing application.
@@ -17,7 +15,12 @@ The Agent Relay SDK makes it super easy to integrate agent-to-agent communicatio
1715Use your favorite package manager to install the SDK and embed it in your application.
1816
1917<CodeGroup >
20- ``` typeScript npm install @agent-relay/sdk ``` ``` python pip install agent-relay-sdk ```
18+ ``` typeScript
19+ npm install @agent - relay / sdk
20+ ```
21+ ``` python
22+ pip install agent- relay- sdk
23+ ```
2124</CodeGroup >
2225
2326## Simple example
@@ -32,46 +35,45 @@ const relay = new AgentRelay();
3235
3336// Log messages as they flow between agents.
3437relay .onMessageReceived = (msg ) => {
35- if (msg .text ) {
36- console .log (` ${msg .from } → ${msg .to }: ${msg .text } ` );
37- }
38+ if (msg .text ) {
39+ console .log (` ${msg .from } → ${msg .to }: ${msg .text } ` );
40+ }
3841};
3942
4043// Spawn three agents.
4144const planner = await relay .claude .spawn ({
42- name: ' Planner' ,
43- model: Models .Claude .OPUS ,
45+ name: ' Planner' ,
46+ model: Models .Claude .OPUS ,
4447});
4548const coder = await relay .codex .spawn ({
46- name: ' Coder' ,
47- model: Models .Codex .GPT_5_3_CODEX ,
49+ name: ' Coder' ,
50+ model: Models .Codex .GPT_5_3_CODEX ,
4851});
4952const reviewer = await relay .opencode .spawn ({
50- name: ' Reviewer' ,
51- model: Models .Opencode .OPENAI_GPT_5_2 ,
53+ name: ' Reviewer' ,
54+ model: Models .Opencode .OPENAI_GPT_5_2 ,
5255});
5356
5457await Promise .all ([
55- planner .waitForReady (),
56- coder .waitForReady (),
57- reviewer .waitForReady (),
58+ planner .waitForReady (),
59+ coder .waitForReady (),
60+ reviewer .waitForReady (),
5861]);
5962
6063// Kick off the collaboration.
6164await relay .system ().sendMessage ({
62- to: ' Planner' ,
63- text: ' Collaborate with Coder and Reviewer to implement feature ID 7.' ,
65+ to: ' Planner' ,
66+ text: ' Collaborate with Coder and Reviewer to implement feature ID 7.' ,
6467});
6568
6669// Wait for everyone to finish, then shut down.
6770await Promise .all ([
68- planner .waitForIdle (),
69- coder .waitForIdle (),
70- reviewer .waitForIdle (),
71+ planner .waitForIdle (),
72+ coder .waitForIdle (),
73+ reviewer .waitForIdle (),
7174]);
7275await relay .shutdown ();
73-
74- ````
76+ ```
7577
7678``` python Python file="agent.py"
7779import asyncio
@@ -118,8 +120,7 @@ async def main():
118120 await relay.shutdown()
119121
120122asyncio.run(main())
121- ` ` ` `
122-
123+ ```
123124</CodeGroup >
124125
125126## CLI
0 commit comments