Skip to content

Commit 65ad543

Browse files
khaliqgantclaude
andauthored
On the relay docs and quickstart tweak (#694)
* on the erlay docs and quickstart * fix formatting * fix: quickstart code formatting and indentation Add prettier-ignore to prevent linter from stripping indentation inside code blocks. Break long lines for narrow docs column. Filter empty messages in onMessageReceived callback. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * fix: exclude docs from prettier to preserve code block indentation Prettier was stripping indentation inside MDX code blocks on commit, making quickstart examples unreadable. Added web/content/docs/ to .prettierignore. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: remove spec files moved to separate PR (#697) The exec-deny and interactive-cloud-sessions specs don't belong in this docs/quickstart improvement PR. Moved to #697 for separate discussion. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * chore: revert unrelated cloud-api-url changes These changes belong to the fix/cloud-api-url-path branch, not this PR. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 63e6f73 commit 65ad543

10 files changed

Lines changed: 217 additions & 58 deletions

File tree

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ bin/
44
target/
55
*.lock
66
packages/*/dist/
7+
web/content/docs/

docs/cli-on-the-relay.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# On the relay
2+
3+
Launch an agent into the sandboxed relay environment, preview permissions, and shut the services down.
4+
5+
`agent-relay on` is the CLI entry point for running an agent inside the relay sandbox, with mounted services and permission-aware workspace access.
6+
7+
## Launch an agent
8+
9+
```bash
10+
agent-relay on codex --agent reviewer -- --model gpt-5.4
11+
```
12+
13+
Common options:
14+
15+
- `--agent <name>` sets the relay identity name.
16+
- `--workspace <id>` joins an existing relay workspace.
17+
- `--port-auth <port>` overrides the Relayauth port.
18+
- `--port-file <port>` overrides the Relayfile port.
19+
- any extra args after `--` are passed through to the underlying CLI.
20+
21+
## Preview or diagnose the environment
22+
23+
```bash
24+
agent-relay on --scan
25+
agent-relay on --doctor
26+
```
27+
28+
- `--scan` previews what the agent will be able to see before launch.
29+
- `--doctor` checks prerequisites and exits without starting a session.
30+
31+
## Stop relay services
32+
33+
```bash
34+
agent-relay off
35+
```
36+
37+
Use `off` when you are done with the mounted relay environment and want a clean shutdown.
38+
39+
## File visibility with dotfiles
40+
41+
Place `.agentignore` and `.agentreadonly` files in the project root to control what the agent sees. Both use gitignore-style glob syntax (one pattern per line, `#` for comments). `.agentignore` hides files entirely; `.agentreadonly` makes them visible but not writable.
42+
43+
```text
44+
# .agentignore
45+
.env*
46+
secrets/**
47+
```
48+
49+
```text
50+
# .agentreadonly
51+
docs/**
52+
README.md
53+
```
54+
55+
For per-agent rules, prefix with the agent name: `.reviewer.agentignore`, `.writer.agentreadonly`.
56+
57+
Dotfiles are loaded automatically and applied before YAML-level permissions. Use `--scan` to preview what the agent will see. See [Permissions](permissions.md) for full details.
58+
59+
> **Note:** `.agentignore` does **not** inherit from `.gitignore`. The relay automatically skips `.git`, `node_modules`, and `.relay` regardless of your dotfiles.
60+
61+
## Isolation model
62+
63+
`agent-relay on` copies your project into a mount directory and sets the agent's working directory to it. This controls what the agent starts with and what gets synced back, but agents run as normal child processes on your machine — they can navigate outside the mount directory.
64+
65+
For true sandboxed execution, use [cloud mode](cli-cloud-commands.md). Cloud runs spin up an **ephemeral Daytona container** per workflow — each agent gets isolated filesystem, process, and network boundaries with no setup required. Secrets are excluded from the upload automatically, and the container is destroyed when the run completes.
66+
67+
| | Local (`on`) | Cloud |
68+
| ---------- | ---------------------- | -------------------------- |
69+
| Filesystem | Copy-based (escapable) | Container-isolated |
70+
| Process | Bare child process | Container process |
71+
| Network | Unrestricted | Container network policies |
72+
| Setup | None | None |
73+
74+
## See also
75+
76+
- [CLI Overview](cli-overview.md) — Full map of the CLI command surface.
77+
- [Cloud commands](cli-cloud-commands.md) — Run workflows remotely instead of entering the sandbox yourself.
78+
- [Authentication](authentication.md) — Understand the auth service used by relay-aware environments.
79+
- [File sharing](file-sharing.md) — Shared filesystem concepts used by the relay environment.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,6 @@
105105
"postbuild": "chmod +x dist/src/cli/bootstrap.js dist/src/cli/index.js && npm run build:cjs",
106106
"prepack": "if [ -d node_modules ]; then npm run build; else echo '⚠ node_modules not found, skipping prepack build'; fi",
107107
"dev:watch": "tsc -w",
108-
"docs": "cd ./docs && npx mintlify dev",
109108
"watch:start": "npm run build && concurrently -k \"npm run dev:watch\" \"node --watch dist/src/cli/index.js start dashboard.js claude\"",
110109
"watch:start:cli-tools": "npm run build && bash ./scripts/watch-cli-tools.sh",
111110
"watch:start:claude": "npm run watch:start:cli-tools -- --tool=claude",
@@ -131,7 +130,6 @@
131130
"syncpack": "syncpack list-mismatches",
132131
"audit:deps": "node scripts/audit-bundled-deps.mjs",
133132
"clean": "rm -rf dist && find packages -maxdepth 2 -name dist -type d -exec rm -rf {} + 2>/dev/null || true",
134-
"docs:dev": "cd docs && npm run dev",
135133
"hooks:install": "./scripts/hooks/install.sh",
136134
"format": "prettier --write .",
137135
"format:check": "prettier --check .",
@@ -142,7 +140,8 @@
142140
"codegen:models:ts": "node packages/shared/codegen-ts.mjs",
143141
"codegen:models:py": "node packages/shared/codegen-py.mjs",
144142
"prepare": "node scripts/prepare-husky.cjs",
145-
"dev:web": "cd web && ../node_modules/.bin/sst dev"
143+
"dev:web": "cd web && ../node_modules/.bin/sst dev",
144+
"web": "cd web && npm run dev"
146145
},
147146
"lint-staged": {
148147
"*.{ts,tsx}": [

web/app/docs/[slug]/page.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ import { CodeGroup } from '../../../components/docs/CodeGroup';
1313
import { DocsPageActions } from '../../../components/docs/DocsPageActions';
1414
import { HighlightedPre } from '../../../components/docs/HighlightedCode';
1515
import { Note } from '../../../components/docs/Note';
16+
import { Warning } from '../../../components/docs/Warning';
1617
import { SpawnOptionsTable } from '../../../components/docs/SpawnOptionsTable';
1718
import { TableOfContents } from '../../../components/docs/TableOfContents';
1819
import styles from '../../../components/docs/docs.module.css';
@@ -48,6 +49,7 @@ const components = {
4849
CardGroup,
4950
BannerLink,
5051
Note,
52+
Warning,
5153
SpawnOptionsTable,
5254
pre: HighlightedPre,
5355
h2: HeadingWithId(2),

web/components/docs/Warning.tsx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
import type { ReactNode } from 'react';
2+
3+
import styles from './docs.module.css';
4+
5+
interface WarningProps {
6+
children: ReactNode;
7+
}
8+
9+
export function Warning({ children }: WarningProps) {
10+
return <div className={styles.warning}>{children}</div>;
11+
}

web/components/docs/docs.module.css

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,19 @@
757757
.note p:first-child { margin-top: 0; }
758758
.note p:last-child { margin-bottom: 0; }
759759

760+
.warning {
761+
margin: 1rem 0;
762+
padding: 0.85rem 1rem;
763+
border-left: 3px solid var(--warning, #e5a00d);
764+
border-radius: 0 0.5rem 0.5rem 0;
765+
background: color-mix(in srgb, var(--warning, #e5a00d) 8%, var(--bg));
766+
font-size: 0.92rem;
767+
color: var(--fg-muted);
768+
}
769+
.warning p { margin: 0.3rem 0; }
770+
.warning p:first-child { margin-top: 0; }
771+
.warning p:last-child { margin-bottom: 0; }
772+
760773
/* ── Responsive ── */
761774

762775
@media (max-width: 1100px) {

web/content/docs/cli-on-the-relay.mdx

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,44 @@ agent-relay off
3737

3838
Use `off` when you are done with the mounted relay environment and want a clean shutdown.
3939

40+
## File visibility with dotfiles
41+
42+
Place `.agentignore` and `.agentreadonly` files in the project root to control what the agent sees. Both use gitignore-style glob syntax (one pattern per line, `#` for comments). `.agentignore` hides files entirely; `.agentreadonly` makes them visible but not writable.
43+
44+
```text
45+
# .agentignore
46+
.env*
47+
secrets/**
48+
```
49+
50+
```text
51+
# .agentreadonly
52+
docs/**
53+
README.md
54+
```
55+
56+
For per-agent rules, prefix with the agent name: `.reviewer.agentignore`, `.writer.agentreadonly`.
57+
58+
Dotfiles are loaded automatically and applied before YAML-level permissions. Use `--scan` to preview what the agent will see. See [Permissions](/docs/permissions) for full details.
59+
60+
<Note>
61+
`.agentignore` does **not** inherit from `.gitignore`. The relay automatically skips `.git`, `node_modules`,
62+
and `.relay` regardless of your dotfiles.
63+
</Note>
64+
65+
## Isolation model
66+
67+
`agent-relay on` copies your project into a mount directory and sets the agent's working directory to it. This controls what the agent starts with and what gets synced back, but agents run as normal child processes on your machine — they can navigate outside the mount directory.
68+
69+
For true sandboxed execution, use [cloud mode](/docs/cli-cloud-commands). Cloud runs spin up an **ephemeral Daytona container** per workflow — each agent gets isolated filesystem, process, and network boundaries with no setup required. Secrets are excluded from the upload automatically, and the container is destroyed when the run completes.
70+
71+
| | Local (`on`) | Cloud |
72+
| ---------- | ---------------------- | -------------------------- |
73+
| Filesystem | Copy-based (escapable) | Container-isolated |
74+
| Process | Bare child process | Container process |
75+
| Network | Unrestricted | Container network policies |
76+
| Setup | None | None |
77+
4078
## See also
4179

4280
<CardGroup cols={2}>

web/content/docs/introduction.mdx

Lines changed: 29 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,90 @@
11
---
22
title: 'Introduction'
3-
description: 'Let Claude Code, Codex & other agents talk to each other directly, in real-time.'
3+
description: 'Let Claude Code, Codex, OpenCode & other agents talk to each other directly, in real-time.'
44
---
55

66
It's like Slack, but built specifically for agents.
77

88
<Note>
9-
Agent Relay is _**not a custom harness**_. You can use your existing agent setup with Claude Code (or your
10-
other favorite AI tool) and get them "on the relay" so they can talk directly to each other.
9+
Agent Relay is _**not a custom harness**_. You can use your existing agent setup with Claude Code (or your
10+
other favorite AI tool) and get them "on the relay" so they can talk directly to each other.
1111
</Note>
1212

13-
1413
## How it Works
15-
Agent Relay starts a service that can spawn or release agent instances via PTY. The service listens for messages,
16-
buffers them and injects them into the agent's stdin when appropriate.
1714

18-
Agents respond with calls to the CLI or MCP.
15+
Agent Relay starts a service that can spawn or release agent instances via PTY. The service listens for messages,
16+
buffers them and injects them into the agent's stdin when appropriate.
17+
18+
Agents respond with calls to the CLI or MCP.
1919

2020
Any tool that can run in a terminal can be used as an agent in Agent Relay.
2121

22-
Our SDK makes it very easy to control and add deterministic rails to your agents collaboration.
22+
Our SDK makes it very easy to control and add deterministic rails to your agents collaboration.
23+
2324
<BannerLink href="/docs/quickstart" icon="rocket">
2425
Jump into the quickstart and launch your first agents in 2 minutes
2526
</BannerLink>
2627

2728
### Distributed Mode
28-
By default, Agent Relay is configured to be run in a distributed friendly mode. Messages are sent through a hosted
29-
messaging service that can be accessed by any agent with the same workspace key.
29+
30+
By default, Agent Relay is configured to be run in a distributed friendly mode. Messages are sent through a hosted
31+
messaging service that can be accessed by any agent with the same workspace key.
3032

3133
This makes it very easy to use agent
32-
relay with multiple agents in different environments *without any additional setup*.
34+
relay with multiple agents in different environments _without any additional setup_.
3335

34-
We also provide helpful tools to view and replay messages from the relay workspace in real-time.
36+
We also provide helpful tools to view and replay messages from the relay workspace in real-time.
3537

3638
### Local Mode
39+
3740
Agent Relay can be run completely locally without any distributed cloud features. Some use cases may prefer this mode
3841
when dealing with sensitive data or accessing the public network may be restricted.
3942

4043
See [Local Mode](/docs/local-mode) for more details.
4144

4245
## Primitives
46+
4347
Agent Relay is built on top of a set of primitives that are designed to be used together.
4448

4549
### Messaging
46-
Messaging is the core coordination layer. Agents, humans, and systems can send real-time messages in channels, direct messages,
47-
and threads so work can be handed off, reviewed, and tracked without building a custom transport layer yourself. Emoji
48-
reactions are also supported.
50+
51+
Messaging is the core coordination layer. Agents, humans, and systems can send real-time messages in channels, direct messages, threads, and reactions
52+
so work can be handed off, reviewed, and tracked without building a custom transport layer yourself.
4953

5054
Use it for task assignment, status updates, review loops, and any workflow where one participant needs to tell another what to
5155
do next. Read more in [Sending messages](/docs/sending-messages), [Channels](/docs/channels), and [DMs](/docs/dms).
5256

5357
### Files
54-
Agent Relay provides a shared filesystem layer. It gives agents one place to read, write, watch, and coordinate files
58+
59+
Agent Relay provides a shared filesystem layer. It gives agents one place to read, write, watch, and coordinate files
5560
so several workers can operate on the same state without building their own storage and sync plumbing first.
5661

5762
Use it when messaging alone is not enough and the agents need shared volumes, realtime change events, file locks, metadata, or
5863
path-level permissions. Read more in [File sharing](/docs/file-sharing).
5964

6065
### Authentication
66+
6167
Authentication handles identity, authorization, and policy. Relayauth gives agents scoped credentials and lets humans keep
6268
control over what those agents are allowed to access or do.
6369

6470
Use it when agents need to call protected APIs, operate under workspace-level permissions, or follow approval and budget rules.
6571
Read more in [Authentication](/docs/authentication).
6672

6773
### Scheduling
68-
Scheduling is the time-based layer. Agent Relay provides a scheduling primitive that lets agents wake up on a schedule,
74+
75+
Scheduling is the time-based layer. Agent Relay provides a scheduling primitive that lets agents wake up on a schedule,
6976
run recurring jobs, and deliver events or webhooks without waiting for a live human prompt.
7077

7178
Use it for nightly maintenance, periodic reports, recurring review queues, and other workflows that should run automatically.
7279
Read more in [Scheduling](/docs/scheduling).
7380

7481
## Open Source
82+
7583
### License
84+
7685
Agent Relay is open source under the Apache 2.0 license.
86+
7787
### Contributions Welcome!
78-
Please open an issue or pull request if you have any ideas or suggestions, we are very interested in supporting new use
88+
89+
Please open an issue or pull request if you have any ideas or suggestions, we are very interested in supporting new use
7990
cases and integrations.

0 commit comments

Comments
 (0)