Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions web/content/docs/7.1.1/observer.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,15 @@ https://agentrelay.com/observer?key=<workspace_key>

The TypeScript SDK exposes this directly as `relay.observerUrl` once the workspace key is available.

<Note>
Do not do this on a current release. A workspace key is an administrative
credential — it can send messages, spawn agents, and change workspace
settings — and a URL query string is not a safe place for one. Current
versions provide `agent-relay observer`, which mints a scoped, expiring,
read-only observer token and builds the link from that instead. See the
current [Observer docs](https://agentrelay.com/docs/observer).
</Note>

## When to use it

Use Observer when you want visibility without control. If you need to chat, spawn agents, or manage the workspace interactively, use [Relay Dashboard](/docs/relay-dashboard).
Expand Down
101 changes: 101 additions & 0 deletions web/content/docs/observer.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
---
title: 'Observer'
metaTitle: 'Observer: Watch Agent Relay Traffic in Real Time'
description: 'Share a read-only, expiring link so a human can follow an Agent Relay workspace live — messages, agent activity, and handoffs — without joining the run or handling a workspace key.'
---

Observer is a read-only view of a live workspace. Use it to let a human follow
agent conversations, handoffs, and progress without joining the run as a
participant.

## What it shows

- Messages as they move through the workspace
- Agent activity and delivery updates in real time
- A shareable live view for anyone who should watch but not participate

## Get an observer link

```bash
agent-relay observer
```

That prints a URL you can share:

```text
https://agentrelay.com/observer?key=ot_live_...
```

The command mints a scoped **observer token** (`ot_live_...`) and builds the
link from it. By default the token expires in 24 hours and excludes agent DMs.

Narrow or widen it as needed:

```bash
agent-relay observer --channels build,review # only these channels
agent-relay observer --include-dms # include agent DMs
agent-relay observer --expires 7d # longer-lived link
agent-relay observer --json # token metadata + URL as JSON
```

Manage tokens you have handed out:

```bash
agent-relay observer list # id, status, expiry (token material is never shown)
agent-relay observer revoke <id> # cut off a link immediately
```

An orchestrating agent can do the same through the Agent Relay MCP server with
the `get_observer_url` tool, so a lead can hand you a link without shelling out.

## Never share a workspace key

A workspace key (`rk_live_...`) is an **administrative** credential: it can send
messages, spawn and remove agents, and change workspace settings. Do not put one
in an observer URL, a chat message, or a terminal transcript. Query strings end
up in browser history, referrer headers, and proxy logs.

An observer token is the credential built for this job:

| | Workspace key (`rk_live_`) | Observer token (`ot_live_`) |
| --- | --- | --- |
| Read messages and activity | yes | yes |
| Send messages, spawn agents, administer | yes | **no** |
| Expires | no | yes |
| Revocable individually | no | yes |
| Scopable to channels | no | yes |

The realtime endpoint enforces this: it rejects a workspace key outright and
accepts only an observer token carrying the `stream:read` scope.

## Self-hosted and staging

Point the command at a different observer deployment with `--observer-url`, or
set `RELAY_OBSERVER_URL`:

```bash
agent-relay observer --observer-url https://observer.relaycast.dev
```

## When to use it

Use Observer when you want visibility without control. To chat, spawn agents, or
manage the workspace interactively, use the
[Relay Dashboard](/docs/relay-dashboard) instead.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: On the new current Observer page, the “When to use it” link to /docs/relay-dashboard doesn’t resolve within the current docs. Relay Dashboard is only present in the v7.1.1 archive, so /docs/relay-dashboard is not in currentDocsSlugs and the router redirects readers to the archived /docs/7.1.1/relay-dashboard page. Since the rest of this PR is about serving current docs (and every other link on this page resolves within current docs), consider either adding a current Relay Dashboard page/slug or removing/linking elsewhere so the new page doesn’t quietly route readers to archived content.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/content/docs/observer.mdx, line 84:

<comment>On the new current Observer page, the “When to use it” link to `/docs/relay-dashboard` doesn’t resolve within the current docs. Relay Dashboard is only present in the v7.1.1 archive, so `/docs/relay-dashboard` is not in currentDocsSlugs and the router redirects readers to the archived `/docs/7.1.1/relay-dashboard` page. Since the rest of this PR is about serving current docs (and every other link on this page resolves within current docs), consider either adding a current Relay Dashboard page/slug or removing/linking elsewhere so the new page doesn’t quietly route readers to archived content.</comment>

<file context>
@@ -0,0 +1,101 @@
+
+Use Observer when you want visibility without control. To chat, spawn agents, or
+manage the workspace interactively, use the
+[Relay Dashboard](/docs/relay-dashboard) instead.
+
+## Related docs
</file context>


## Related docs

<CardGroup cols={2}>
<Card title="Authentication" href="/docs/authentication">
The credential types Agent Relay issues and what each one can do.
</Card>
<Card title="Agent Relay MCP" href="/docs/agent-relay-mcp">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This card claims the Agent Relay MCP page documents get_observer_url, but that page doesn't currently list this tool, its inputs, or output. Readers following this link will find no reference for the newly advertised MCP tool. Either add get_observer_url to agent-relay-mcp.mdx or remove this claim.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/content/docs/observer.mdx, line 92:

<comment>This card claims the Agent Relay MCP page documents `get_observer_url`, but that page doesn't currently list this tool, its inputs, or output. Readers following this link will find no reference for the newly advertised MCP tool. Either add `get_observer_url` to agent-relay-mcp.mdx or remove this claim.</comment>

<file context>
@@ -0,0 +1,101 @@
+  <Card title="Authentication" href="/docs/authentication">
+    The credential types Agent Relay issues and what each one can do.
+  </Card>
+  <Card title="Agent Relay MCP" href="/docs/agent-relay-mcp">
+    Includes `get_observer_url` for orchestrating agents.
+  </Card>
</file context>

Includes `get_observer_url` for orchestrating agents.
Comment on lines +92 to +93

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Document the promised MCP observer tool

The linked agent-relay-mcp.mdx inventory does not mention get_observer_url, its inputs, or its output, despite this card promising that it does. An MCP user following the link has no usable reference for invoking the newly advertised tool, so add it to that page or stop describing the destination as containing it.

Useful? React with 👍 / 👎.

</Card>
<Card title="CLI reference" href="/docs/reference-cli">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: This card states the CLI reference includes the observer command, but reference-cli.mdx doesn't document it or its flags (--channels, --include-dms, --expires, etc.). Update the CLI reference alongside this page, or remove the claim that it covers Observer.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At web/content/docs/observer.mdx, line 95:

<comment>This card states the CLI reference includes the `observer` command, but reference-cli.mdx doesn't document it or its flags (--channels, --include-dms, --expires, etc.). Update the CLI reference alongside this page, or remove the claim that it covers Observer.</comment>

<file context>
@@ -0,0 +1,101 @@
+  <Card title="Agent Relay MCP" href="/docs/agent-relay-mcp">
+    Includes `get_observer_url` for orchestrating agents.
+  </Card>
+  <Card title="CLI reference" href="/docs/reference-cli">
+    Every `agent-relay` command, including `observer`.
+  </Card>
</file context>

Every `agent-relay` command, including `observer`.
Comment on lines +95 to +96

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Add Observer to the linked CLI reference

The linked reference-cli.mdx page describes itself as the complete command matrix but contains no observer command or any of the flags shown here. Readers following this card therefore cannot find the promised reference syntax; update the CLI reference alongside this page or remove the claim that it includes Observer.

Useful? React with 👍 / 👎.

</Card>
<Card title="Quickstart" href="/docs/quickstart">
Start a workspace and get agents talking.
</Card>
</CardGroup>
1 change: 1 addition & 0 deletions web/lib/docs-nav.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ export const docsNav: NavGroup[] = [
items: [
{ title: 'TypeScript SDK', slug: 'typescript-sdk' },
{ title: 'Agent Relay MCP', slug: 'agent-relay-mcp' },
{ title: 'Observer', slug: 'observer' },
],
},
{
Expand Down
Loading