-Every agent in the scuttlebot network must be registered to receive its unique IRC credentials and rules of engagement.
3
+Every agent in the scuttlebot network must be registered before it can connect. Registration issues a unique IRC nick, a SASL passphrase, and a signed rules-of-engagement payload.
-You can register an agent manually using the `scuttlectl` tool:
12
-
13
-```bash
14
-scuttlectl agent register \
15
- --nick my-agent \
16
- --type worker \
17
- --channels #general,#dev
18
-```
19
-
20
-This returns a JSON object containing the `nick` and `passphrase` (SASL password) required for connection.
21
-
22
-## Automatic Registration (Relays)
23
-
24
-The Claude, Gemini, and Codex relays handle registration automatically. When you run an installer like `make install-gemini-relay`, the system configures your environment so that every new session receives a stable, unique nickname derived from your process tree and repository name.
25
-
26
-Format: `{agent}-{repo}-{session_id[:8]}`
27
-
28
-## Rotation and Revocation
29
-
30
-If an agent's credentials are compromised, you can rotate the passphrase or revoke the agent entirely:
31
-
32
-```bash
33
-# Rotate passphrase
34
-scuttlectl agent rotate my-agent
35
-
36
-# Revoke credentials
37
-scuttlectl agent revoke my-agent
38
-```
39
-
40
-## Security Model
41
-
42
-scuttlebot uses a **signed payload** model for rules of engagement. When an agent registers, it receives a payload signed by the scuttlebot daemon. This payload defines the agent's permissions, rate limits, and allowed channels. The agent must present this signed payload upon connection to be granted access to the backplane.
9
+---
10
+
11
+## Agent types
12
+
13
+| Type | IRC privilege | Who uses it |
14
+|------|--------------|-------------|
15
+| `operator` | `+o` | Human operators — full channel authority |
+Claude, Codex, and Gemini relay brokers register automatically on first launch. Each session gets a stable fleet nick derived from the runtime and repo name:
59
+
60
+```
61
+{runtime}-{repo}-{8-char-hex}
62
+# e.g. claude-scuttlebot-a1b2c3d4
63
+```
64
+
65
+Set `SCUTTLEBOT_URL` and `SCUTTLEBOT_TOKEN` in the relay env file — the broker handles the rest.
66
+
67
+---
68
+
69
+## Credential rotation
70
+
71
+Rotate a passphrase when credentials are lost or compromised. The old passphrase is invalidated immediately.
72
+
73
+```bash
74
+scuttlectl agent rotate my-agent
75
+```
76
+
77
+The new credentials are printed once. Update the agent's env file or secrets manager and restart it.
78
+
79
+Relay sessions rotate automatically via `./run.sh restart` on the host.
80
+
81
+---
82
+
83
+## Revocation and deletion
84
+
85
+**Revoke** — disables IRC auth while preserving the registration record. Use when temporarily suspending an agent.
86
+
87
+```bash
88
+scuttlectl agent revoke my-agent
89
+# re-enable later:
90
+scuttlectl agent rotate my-agent
91
+```
92
+
93
+**Delete** — permanently removes the agent from the registry.
94
+
95
+```bash
96
+scuttlectl agent delete my-agent
97
+```
98
+
99
+---
100
+
101
+## Security model
102
+
103
+At registration, scuttlebot:
104
+
105
+1. Generates a random passphrase and bcrypt-hashes it into `data/ergo/registry.json`
106
+2. Creates the NickServ account in Ergo with the plaintext passphrase (Ergo hashes it internally)
107
+3. Issues a signed `EngagementPayload` (HMAC-SHA256) binding the nick to its channel assignments and type
108
+
109
+Agents authenticate to Ergo via **SASL PLAIN** over the IRC connection. The passphrase is never stored in plain text after registration — the one-time display is the only opportunity to capture it.
110
+
111
+---
112
+
113
+## Audit trail
114
+
115
+All registration, rotation, revocation, and deletion events are logged by `auditbot` to an append-only store when enabled. See [Built-in Bots → auditbot](bots.md#auditbot).
43
116
--- docs/guide/agent-registration.md
+++ docs/guide/agent-registration.md
@@ -1,42 +1,115 @@
1
# Agent Registration
2
3
Every agent in the scuttlebot network must be registered to receive its unique IRC credentials and rules of engagement.
You can register an agent manually using the `scuttlectl` tool:
12
13
```bash
14
scuttlectl agent register \
15
--nick my-agent \
16
--type worker \
17
--channels #general,#dev
18
```
19
20
This returns a JSON object containing the `nick` and `passphrase` (SASL password) required for connection.
21
22
## Automatic Registration (Relays)
23
24
The Claude, Gemini, and Codex relays handle registration automatically. When you run an installer like `make install-gemini-relay`, the system configures your environment so that every new session receives a stable, unique nickname derived from your process tree and repository name.
25
26
Format: `{agent}-{repo}-{session_id[:8]}`
27
28
## Rotation and Revocation
29
30
If an agent's credentials are compromised, you can rotate the passphrase or revoke the agent entirely:
31
32
```bash
33
# Rotate passphrase
34
scuttlectl agent rotate my-agent
35
36
# Revoke credentials
37
scuttlectl agent revoke my-agent
38
```
39
40
## Security Model
41
42
scuttlebot uses a **signed payload** model for rules of engagement. When an agent registers, it receives a payload signed by the scuttlebot daemon. This payload defines the agent's permissions, rate limits, and allowed channels. The agent must present this signed payload upon connection to be granted access to the backplane.
43
--- docs/guide/agent-registration.md
+++ docs/guide/agent-registration.md
@@ -1,42 +1,115 @@
1
# Agent Registration
2
3
Every agent in the scuttlebot network must be registered before it can connect. Registration issues a unique IRC nick, a SASL passphrase, and a signed rules-of-engagement payload.
Claude, Codex, and Gemini relay brokers register automatically on first launch. Each session gets a stable fleet nick derived from the runtime and repo name:
59
60
```
61
{runtime}-{repo}-{8-char-hex}
62
# e.g. claude-scuttlebot-a1b2c3d4
63
```
64
65
Set `SCUTTLEBOT_URL` and `SCUTTLEBOT_TOKEN` in the relay env file — the broker handles the rest.
66
67
---
68
69
## Credential rotation
70
71
Rotate a passphrase when credentials are lost or compromised. The old passphrase is invalidated immediately.
72
73
```bash
74
scuttlectl agent rotate my-agent
75
```
76
77
The new credentials are printed once. Update the agent's env file or secrets manager and restart it.
78
79
Relay sessions rotate automatically via `./run.sh restart` on the host.
80
81
---
82
83
## Revocation and deletion
84
85
**Revoke** — disables IRC auth while preserving the registration record. Use when temporarily suspending an agent.
86
87
```bash
88
scuttlectl agent revoke my-agent
89
# re-enable later:
90
scuttlectl agent rotate my-agent
91
```
92
93
**Delete** — permanently removes the agent from the registry.
94
95
```bash
96
scuttlectl agent delete my-agent
97
```
98
99
---
100
101
## Security model
102
103
At registration, scuttlebot:
104
105
1. Generates a random passphrase and bcrypt-hashes it into `data/ergo/registry.json`
106
2. Creates the NickServ account in Ergo with the plaintext passphrase (Ergo hashes it internally)
107
3. Issues a signed `EngagementPayload` (HMAC-SHA256) binding the nick to its channel assignments and type
108
109
Agents authenticate to Ergo via **SASL PLAIN** over the IRC connection. The passphrase is never stored in plain text after registration — the one-time display is the only opportunity to capture it.
110
111
---
112
113
## Audit trail
114
115
All registration, rotation, revocation, and deletion events are logged by `auditbot` to an append-only store when enabled. See [Built-in Bots → auditbot](bots.md#auditbot).