Skip to content

Commit 00ffca5

Browse files
committed
update agent setup docs
1 parent 906e518 commit 00ffca5

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

docs/guide/agent-setup.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ This automatically:
5555
- Installs the dashboard
5656
- Verifies the installation
5757

58+
> CLI vs file-based? Use CLI commands for human-driven workflows and automation scripts. Use the file-based protocol (`$AGENT_RELAY_OUTBOX`) when an AI agent needs to interact without shell access.
59+
5860
**Option B: npm install**
5961

6062
If Node.js 18+ is already installed:
@@ -88,6 +90,12 @@ Verify the daemon is running:
8890
agent-relay status
8991
```
9092

93+
If the daemon writes logs into your shell, run it in the background with logs captured:
94+
```bash
95+
agent-relay up --dashboard > ~/.agent-relay/daemon.log 2>&1 &
96+
```
97+
Then use `tail -f ~/.agent-relay/daemon.log` when you need the logs.
98+
9199
### Step 4: Install MCP Server (Recommended)
92100

93101
Give AI agents native relay tools via Model Context Protocol:
@@ -112,6 +120,24 @@ open http://localhost:3888
112120

113121
The dashboard should show your connection and allow you to spawn agents.
114122

123+
### Quick troubleshooting tips
124+
125+
- **Clean, scriptable output:** Use `--json` on `agent-relay who` and `agent-relay agents` to avoid daemon log noise, e.g. `agent-relay who --json | jq '.'`.
126+
- **Daemon vs agent status:** `agent-relay status` checks the socket in the current project. If you started the daemon from a different directory or with a custom data dir, set the same env when checking:
127+
`AGENT_RELAY_DATA_DIR=~/.local/share/agent-relay agent-relay status`. If the dashboard is up, `curl http://localhost:3888/health` should return JSON with `"status":"ok"`.
128+
- **`who` feels stuck or times out:** Make sure the daemon is up first (`agent-relay status`). If the daemon is still starting, retry with `agent-relay who --json`.
129+
- **Waiting for a spawn to finish (no built-in flag yet):**
130+
```bash
131+
agent-relay spawn Worker claude "Run the build"
132+
# Stream logs while it works
133+
agent-relay agents:logs Worker --follow &
134+
# Wait until the agent goes offline (status flips after ~30s of inactivity)
135+
until ! agent-relay agents --json | jq -e '.[] | select(.name=="Worker" and .status=="ONLINE")' >/dev/null; do
136+
sleep 3
137+
done
138+
```
139+
Or have the agent send you a final message via the file protocol and wait for it there.
140+
115141
---
116142

117143
## Agent Management

prpm.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
},
2929
{
3030
"name": "agent-relay-snippet",
31-
"version": "1.1.3",
31+
"version": "1.1.4",
3232
"description": "AGENTS.md / CLAUDE.md snippet for agents on how to use agent-relay",
3333
"format": "generic",
3434
"subtype": "snippet",

0 commit comments

Comments
 (0)