slackhive 0.1.23 → 0.1.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +153 -461
- package/dist/commands/init.js +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
|
|
5
5
|
# SlackHive
|
|
6
6
|
|
|
7
|
-
### Build
|
|
7
|
+
### Build your AI-first company on Slack
|
|
8
|
+
#### Deploy and orchestrate Claude Code agents as your teammates
|
|
8
9
|
|
|
9
10
|
[](LICENSE)
|
|
10
11
|
[](https://www.npmjs.com/package/slackhive)
|
|
@@ -12,10 +13,10 @@
|
|
|
12
13
|
[](https://nodejs.org)
|
|
13
14
|
[](https://www.typescriptlang.org)
|
|
14
15
|
[](https://docs.docker.com/compose)
|
|
15
|
-
[](https://slackhive.mintlify.app)
|
|
17
|
+
[](https://github.com/pelago-labs/slackhive/actions/workflows/audit.yml)
|
|
17
18
|
|
|
18
|
-
[Quick Start](#-quick-start) · [Features](#-features) · [Architecture](#-architecture) · [
|
|
19
|
+
[**Documentation**](https://slackhive.mintlify.app) · [Quick Start](#-quick-start) · [Features](#-features) · [Architecture](#-architecture) · [Contributing](#-contributing)
|
|
19
20
|
|
|
20
21
|
</div>
|
|
21
22
|
|
|
@@ -23,127 +24,37 @@
|
|
|
23
24
|
|
|
24
25
|
## Why SlackHive?
|
|
25
26
|
|
|
26
|
-
|
|
27
|
+
Your Slack workspace is where your team already lives. Every question, decision, and escalation happens there. SlackHive makes that workspace a mix of **people and agents** — side by side, in the same channels, in the same threads.
|
|
27
28
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
Inspired by how engineering teams actually collaborate in Slack, we built a platform where:
|
|
31
|
-
|
|
32
|
-
- **Each agent is a Slack bot** with its own identity, skills, and memory
|
|
33
|
-
- **A Boss Agent** knows the entire team and delegates work by @mentioning the right specialist
|
|
34
|
-
- **Every agent learns** — memories from conversations are persisted and loaded on the next start
|
|
35
|
-
- **Everything is configurable** from a clean web UI — no code changes needed to add agents, assign tools, or edit behavior
|
|
36
|
-
|
|
37
|
-
Whether you're building an internal AI ops team, a customer support squad, or a research group — SlackHive gives you the infrastructure to make it happen.
|
|
38
|
-
|
|
39
|
-
<details>
|
|
40
|
-
<summary><b>See it in action</b></summary>
|
|
29
|
+
These aren't chatbots you switch to. They're colleagues you @mention. Each agent connects to the tools your team already uses — Notion, Jira, GitHub, Figma, your database, your analytics stack. **Anyone on the team can create one.** No engineers, no platform team — if you can describe what you need, you can deploy it in minutes.
|
|
41
30
|
|
|
42
31
|
```
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
32
|
+
CEO: @data-analyst revenue is down 8% this week, can you dig in?
|
|
33
|
+
DataBot: [queries Redshift across 6 dimensions]
|
|
34
|
+
Found it — enterprise churn spiked Tuesday after the pricing change.
|
|
35
|
+
3 accounts, $42k ARR at risk.
|
|
36
|
+
|
|
37
|
+
Engineer: @devops the checkout service is throwing 500s
|
|
38
|
+
DevOps: [reads logs, identifies root cause, opens PR]
|
|
39
|
+
Memory leak in the payment processor pool. PR #847 is up with the fix.
|
|
40
|
+
|
|
41
|
+
PM: @designer mock up a simpler onboarding flow
|
|
42
|
+
Designer: [creates Figma frames via MCP]
|
|
43
|
+
Done — 3 variants in Figma. Which direction do you want to take?
|
|
48
44
|
```
|
|
49
45
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
</details>
|
|
53
|
-
|
|
54
|
-
---
|
|
55
|
-
|
|
56
|
-
## ✨ Features
|
|
57
|
-
|
|
58
|
-
### Core Platform
|
|
59
|
-
|
|
60
|
-
| Feature | Description |
|
|
61
|
-
|---------|-------------|
|
|
62
|
-
| 👑 **Boss Agent** | Orchestrator bot that knows every specialist and delegates by @mention in threads |
|
|
63
|
-
| 🧠 **Agent Memory** | Agents learn from every conversation — memories auto-synced to Postgres |
|
|
64
|
-
| 🔌 **MCP Server Catalog** | Add tool servers once, assign to any agent — Redshift, GitHub, custom APIs |
|
|
65
|
-
| 🧵 **Thread Context** | Tagged agents fetch full thread history — zero context loss in handoffs |
|
|
66
|
-
| 💾 **Session Persistence** | Slack thread ↔ Claude session mapping survives restarts |
|
|
67
|
-
| 🔁 **Hot Reload** | Edit anything in the UI → agent picks up changes in seconds via Redis pub/sub |
|
|
68
|
-
|
|
69
|
-
### Web UI
|
|
70
|
-
|
|
71
|
-
| Feature | Description |
|
|
72
|
-
|---------|-------------|
|
|
73
|
-
| 🧙 **Onboarding Wizard** | Guided flow: identity → Slack app → tokens → MCPs & skills (skipped for boss) → review |
|
|
74
|
-
| 📝 **Skill Editor** | In-browser editor for agent markdown skills with file tree and categories |
|
|
75
|
-
| 🔐 **Tool Permissions** | Per-agent allowlist/denylist for Claude Code SDK tools |
|
|
76
|
-
| 📊 **Live Logs** | SSE-streamed Docker log output per agent with level filters and search |
|
|
77
|
-
| ⚙️ **Settings** | Configurable branding (app name, logo, tagline), dashboard title, user management |
|
|
78
|
-
| 🧠 **Memory Viewer** | Browse, inspect, and delete agent memories grouped by type |
|
|
79
|
-
| 📄 **CLAUDE.md Viewer** | Read and edit the compiled system prompt sent to each agent |
|
|
80
|
-
| 📐 **Collapsible Sidebar** | Clean sidebar with live agent roster, status dots, and collapse toggle |
|
|
81
|
-
| 📱 **Responsive Design** | Mobile-friendly layout with hamburger menu, overlay sidebar, fluid grids |
|
|
82
|
-
| 🔒 **Auth & RBAC** | Login page, superadmin via env vars, 4 roles (superadmin/admin/editor/viewer) |
|
|
83
|
-
| 👥 **User Management** | Create users with admin, editor, or viewer roles from Settings |
|
|
84
|
-
| 🏢 **Agent Hierarchy** | Multi-boss support — agents can report to multiple bosses, each boss manages its own team |
|
|
85
|
-
| ⏰ **Scheduled Jobs** | Cron-based recurring tasks executed by the boss agent, with run history |
|
|
86
|
-
|
|
87
|
-
### Agent Capabilities
|
|
88
|
-
|
|
89
|
-
- **Slack Block Kit formatting** — markdown tables rendered as native Slack table blocks, headings, code blocks
|
|
90
|
-
- **Streaming responses** — tool use labels, progress indicators, and rich formatted output
|
|
91
|
-
- **MCP tool integration** — stdio, SSE, and HTTP transports supported
|
|
92
|
-
- **Customizable personas** — each agent has its own personality and behavior
|
|
93
|
-
- **Skill system** — modular markdown files organized by category with sort ordering
|
|
94
|
-
- **Auto-generated boss registry** — each boss gets a team roster compiled from agents that report to it
|
|
95
|
-
- **Memory system injected into CLAUDE.md** — agents know how to write and organize memories
|
|
96
|
-
- **Multi-boss hierarchy** — `reports_to` is a UUID array; an agent can report to multiple bosses
|
|
97
|
-
|
|
98
|
-
---
|
|
99
|
-
|
|
100
|
-
## 🏗 Architecture
|
|
46
|
+
Tag a specialist directly when you know who to ask. Or tag `@boss` when you're not sure — Boss finds the right specialist, delegates, and summarizes the result:
|
|
101
47
|
|
|
102
48
|
```
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
│ │
|
|
111
|
-
│ ┌─────────────────┐ publish events ┌─────────────────┐ │
|
|
112
|
-
│ │ Web UI │ ──────────────► │ Redis 7 │ │
|
|
113
|
-
│ │ Next.js 15 │ │ pub/sub │ │
|
|
114
|
-
│ │ :3000 │ └────────┬────────┘ │
|
|
115
|
-
│ │ │ │ subscribe │
|
|
116
|
-
│ │ • Dashboard │ read/write ┌───────▼────────┐ │
|
|
117
|
-
│ │ • Agent config │ ◄───────────────► │ Runner │ │
|
|
118
|
-
│ │ • Skill editor │ │ │ │
|
|
119
|
-
│ │ • MCP catalog │ │ AgentRunner │ │
|
|
120
|
-
│ │ • Memory viewer│ │ ├─ Boss │ │
|
|
121
|
-
│ │ • Live logs │ │ ├─ DataBot │ │
|
|
122
|
-
│ │ • Settings │ │ ├─ Writer │ │
|
|
123
|
-
│ └─────────────────┘ │ └─ ... │ │
|
|
124
|
-
│ │ └───────┬────────┘ │
|
|
125
|
-
│ │ read/write │ │
|
|
126
|
-
│ ▼ ▼ │
|
|
127
|
-
│ ┌─────────────────────────────────────────────────────┐ │
|
|
128
|
-
│ │ PostgreSQL 16 │ │
|
|
129
|
-
│ │ │ │
|
|
130
|
-
│ │ agents · skills · memories · permissions │ │
|
|
131
|
-
│ │ mcp_servers · agent_mcps · sessions │ │
|
|
132
|
-
│ │ settings · users · scheduled_jobs · job_runs │ │
|
|
133
|
-
│ └─────────────────────────────────────────────────────┘ │
|
|
134
|
-
└─────────────────────────────────────────────────────────────┘
|
|
49
|
+
You: @boss can you analyze last week's conversion funnel?
|
|
50
|
+
Boss: That's right up @data-analyst's alley 👇
|
|
51
|
+
@data-analyst — conversion funnel analysis for last week.
|
|
52
|
+
When you're done, please tag @boss.
|
|
53
|
+
DataBot: Conversions up 12% WoW, checkout completion jumped 3×. @boss — done!
|
|
54
|
+
Boss: Conversions are up 12% WoW. The win was checkout — 3× completion rate.
|
|
55
|
+
Want me to pull a channel or cohort breakdown?
|
|
135
56
|
```
|
|
136
57
|
|
|
137
|
-
**How it flows:**
|
|
138
|
-
|
|
139
|
-
1. **User** messages an agent (or `@boss`) in Slack
|
|
140
|
-
2. **Runner** receives the event via Bolt Socket Mode
|
|
141
|
-
3. **Claude Code SDK** processes the message with the agent's compiled `CLAUDE.md`
|
|
142
|
-
4. Agent may use **MCP tools** (Redshift queries, GitHub API, etc.) during processing
|
|
143
|
-
5. **Response** is formatted as Slack Block Kit and posted to the thread
|
|
144
|
-
6. **Memory files** written during the session are detected by `MemoryWatcher` and synced to Postgres
|
|
145
|
-
7. On next conversation, the agent starts with all accumulated **learned knowledge**
|
|
146
|
-
|
|
147
58
|
---
|
|
148
59
|
|
|
149
60
|
## 🚀 Quick Start
|
|
@@ -155,63 +66,10 @@ npm install -g slackhive
|
|
|
155
66
|
slackhive init
|
|
156
67
|
```
|
|
157
68
|
|
|
158
|
-
The CLI will:
|
|
159
|
-
1. Check prerequisites (Docker, Docker Compose, Git)
|
|
160
|
-
2. Clone the repository
|
|
161
|
-
3. Walk you through configuration (API key, admin credentials)
|
|
162
|
-
4. Start all services automatically
|
|
163
|
-
|
|
164
|
-
### Option B: Manual setup
|
|
165
|
-
|
|
166
|
-
#### Prerequisites
|
|
167
|
-
|
|
168
|
-
- [Docker](https://docs.docker.com/get-docker/) + [Docker Compose](https://docs.docker.com/compose/)
|
|
169
|
-
- An [Anthropic API key](https://console.anthropic.com/) (`ANTHROPIC_API_KEY`)
|
|
170
|
-
|
|
171
|
-
#### 1. Clone & configure
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
git clone https://github.com/amansrivastava17/slackhive.git
|
|
175
|
-
cd slackhive
|
|
176
|
-
cp .env.example .env
|
|
177
|
-
```
|
|
178
|
-
|
|
179
|
-
Edit `.env` with your Anthropic API key and credentials:
|
|
180
|
-
|
|
181
|
-
```env
|
|
182
|
-
ANTHROPIC_API_KEY=sk-ant-...
|
|
183
|
-
ADMIN_USERNAME=admin
|
|
184
|
-
ADMIN_PASSWORD=changeme
|
|
185
|
-
POSTGRES_PASSWORD=slackhive
|
|
186
|
-
```
|
|
187
|
-
|
|
188
|
-
#### 2. Start everything
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
docker compose up -d --build
|
|
192
|
-
```
|
|
193
|
-
|
|
194
|
-
This launches all four services:
|
|
195
|
-
|
|
196
|
-
| Service | Port | Description |
|
|
197
|
-
|---------|------|-------------|
|
|
198
|
-
| **Web UI** | `localhost:3001` | Dashboard and agent management |
|
|
199
|
-
| **Runner** | — | Manages all Slack bot connections |
|
|
200
|
-
| **PostgreSQL** | `localhost:5432` | Persistent storage |
|
|
201
|
-
| **Redis** | `localhost:6379` | Event pub/sub for hot reload |
|
|
202
|
-
|
|
203
|
-
#### 3. Open the dashboard
|
|
204
|
-
|
|
205
|
-
```
|
|
206
|
-
http://localhost:3001
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
Login with your admin credentials and create your first agent.
|
|
69
|
+
The CLI will check prerequisites (Docker, Git), clone the repo, walk you through configuration, and start all services automatically. Open `http://localhost:3001` and create your first agent.
|
|
210
70
|
|
|
211
71
|
### CLI Commands
|
|
212
72
|
|
|
213
|
-
After installing with `npm install -g slackhive`:
|
|
214
|
-
|
|
215
73
|
| Command | Description |
|
|
216
74
|
|---------|-------------|
|
|
217
75
|
| `slackhive init` | Clone, configure, and start SlackHive |
|
|
@@ -221,362 +79,196 @@ After installing with `npm install -g slackhive`:
|
|
|
221
79
|
| `slackhive logs` | Tail runner logs |
|
|
222
80
|
| `slackhive update` | Pull latest changes and rebuild |
|
|
223
81
|
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
## 🔑 Claude Code Authentication
|
|
227
|
-
|
|
228
|
-
SlackHive supports two authentication modes for the Claude Code SDK. Choose the one that fits your setup.
|
|
229
|
-
|
|
230
|
-
### Option 1: API Key (pay-per-use)
|
|
231
|
-
|
|
232
|
-
Best for: teams, production, predictable billing.
|
|
233
|
-
|
|
234
|
-
Set your Anthropic API key in `.env`:
|
|
235
|
-
|
|
236
|
-
```env
|
|
237
|
-
ANTHROPIC_API_KEY=sk-ant-api03-...
|
|
238
|
-
```
|
|
239
|
-
|
|
240
|
-
That's it. Every agent will use this key. You're billed per token via the [Anthropic API](https://console.anthropic.com/).
|
|
241
|
-
|
|
242
|
-
### Option 2: Claude Code Subscription (Max plan)
|
|
243
|
-
|
|
244
|
-
Best for: individual developers, Claude Pro/Max subscribers ($100–$200/month unlimited).
|
|
245
|
-
|
|
246
|
-
If you have a Claude Max subscription with Claude Code access:
|
|
82
|
+
### Option B: Manual setup
|
|
247
83
|
|
|
248
|
-
**
|
|
84
|
+
**Prerequisites:** [Docker](https://docs.docker.com/get-docker/) + [Docker Compose](https://docs.docker.com/compose/), Node.js ≥ 20
|
|
249
85
|
|
|
250
86
|
```bash
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
This opens a browser for OAuth and saves credentials to `~/.claude/`.
|
|
255
|
-
|
|
256
|
-
**Step 2 — Mount credentials into the runner container:**
|
|
257
|
-
|
|
258
|
-
The `docker-compose.yml` runner service needs access to your host's Claude credentials. Add these volume mounts if not already present:
|
|
259
|
-
|
|
260
|
-
```yaml
|
|
261
|
-
runner:
|
|
262
|
-
volumes:
|
|
263
|
-
- ~/.claude:/root/.claude # Auth credentials
|
|
264
|
-
- /tmp/agents:/tmp/agents # Agent working dirs
|
|
87
|
+
git clone https://github.com/pelago-labs/slackhive.git
|
|
88
|
+
cd slackhive
|
|
89
|
+
cp .env.example .env
|
|
265
90
|
```
|
|
266
91
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
Make sure `ANTHROPIC_API_KEY` is **not** set in `.env`. When no API key is present, the SDK falls back to the subscription credentials from `~/.claude/`.
|
|
92
|
+
Edit `.env` with your credentials:
|
|
270
93
|
|
|
271
94
|
```env
|
|
272
|
-
|
|
95
|
+
ANTHROPIC_API_KEY=sk-ant-... # or use Claude Pro/Max subscription
|
|
96
|
+
ADMIN_USERNAME=admin
|
|
97
|
+
ADMIN_PASSWORD=changeme
|
|
98
|
+
POSTGRES_PASSWORD=slackhive
|
|
99
|
+
ENV_SECRET_KEY= # generate: openssl rand -hex 32
|
|
273
100
|
```
|
|
274
101
|
|
|
275
|
-
**Step 4 — Restart:**
|
|
276
|
-
|
|
277
102
|
```bash
|
|
278
|
-
|
|
279
|
-
# or: docker compose up -d --build runner
|
|
103
|
+
docker compose up -d --build
|
|
280
104
|
```
|
|
281
105
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
| | API Key | Subscription |
|
|
285
|
-
|---|---------|-------------|
|
|
286
|
-
| **Billing** | Per-token (pay what you use) | Flat monthly ($100/$200) |
|
|
287
|
-
| **Setup** | Just paste the key | Run `claude login` on host |
|
|
288
|
-
| **Best for** | Teams, CI/CD, production | Solo devs, prototyping |
|
|
289
|
-
| **Rate limits** | API tier limits | Subscription fair-use limits |
|
|
290
|
-
| **Multiple agents** | All share one key | All share one subscription |
|
|
106
|
+
Open `http://localhost:3001`, log in, and create your first agent.
|
|
291
107
|
|
|
292
|
-
>
|
|
108
|
+
> Full setup guide → [slackhive.mintlify.app/quickstart](https://slackhive.mintlify.app/quickstart)
|
|
293
109
|
|
|
294
110
|
---
|
|
295
111
|
|
|
296
|
-
##
|
|
297
|
-
|
|
298
|
-
Click **New Agent** from the dashboard and follow the wizard:
|
|
299
|
-
|
|
300
|
-
### Step 1 — Identity
|
|
301
|
-
Set the agent's name, slug (e.g., `data-bot`), persona, and description. Toggle **Boss** if this agent should orchestrate others — boss agents skip the MCPs & Skills step since their `CLAUDE.md` is auto-generated. For specialist agents, select which boss(es) they report to.
|
|
302
|
-
|
|
303
|
-
### Step 2 — Slack App Setup
|
|
304
|
-
The platform generates a `slack-app-manifest.json`. Create a Slack app from this manifest:
|
|
305
|
-
|
|
306
|
-
1. Go to [api.slack.com/apps](https://api.slack.com/apps) → **Create New App** → **From a manifest**
|
|
307
|
-
2. Paste the generated JSON
|
|
308
|
-
3. **Install to Workspace** → copy the **Bot Token** (`xoxb-...`)
|
|
309
|
-
4. **Socket Mode** → Enable → generate the **App-Level Token** (`xapp-...`)
|
|
310
|
-
5. **Basic Information** → copy the **Signing Secret**
|
|
311
|
-
6. Paste all three back in the wizard
|
|
312
|
-
|
|
313
|
-
### Step 3 — Permissions
|
|
314
|
-
Configure which Claude Code SDK tools the agent can use. Quick-add buttons for common tools like `Read`, `Write`, `Bash`, `WebFetch`.
|
|
315
|
-
|
|
316
|
-
### Step 4 — MCPs
|
|
317
|
-
Select MCP servers from the platform catalog to give your agent access to external tools (databases, APIs, etc.).
|
|
318
|
-
|
|
319
|
-
### Step 5 — Skills
|
|
320
|
-
Choose a starter template or start blank. Skills are modular markdown files that compose the agent's `CLAUDE.md` system prompt.
|
|
321
|
-
|
|
322
|
-
The agent starts automatically and connects to Slack.
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## 👑 Boss Agents
|
|
327
|
-
|
|
328
|
-
Create one or more agents with the **Boss** toggle enabled. Each boss gets its own `CLAUDE.md` team registry listing the agents that report to it:
|
|
329
|
-
|
|
330
|
-
```markdown
|
|
331
|
-
## Your Team
|
|
332
|
-
|
|
333
|
-
- **DataBot** (<@U12345678>) — Data warehouse NLQ, Redshift queries, business metrics
|
|
334
|
-
- **Writer** (<@U87654321>) — Content generation, Slack summaries, announcements
|
|
335
|
-
```
|
|
336
|
-
|
|
337
|
-
The registry **auto-regenerates** for every boss whenever you add, update, or delete an agent — no manual maintenance needed.
|
|
338
|
-
|
|
339
|
-
You can have **multiple boss agents** for different domains or teams. When creating a specialist agent, check the bosses it should report to — it will appear in each selected boss's registry. A specialist can report to more than one boss.
|
|
112
|
+
## ✨ Features
|
|
340
113
|
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
114
|
+
### 🤖 Real AI Agents — Not Chatbots
|
|
115
|
+
|
|
116
|
+
Every agent is a full **Claude Code** agent — with tools, memory, identity, and instructions. When you @mention one in Slack, you're running a real AI agent that can use tools, take action, and get smarter over time.
|
|
117
|
+
|
|
118
|
+
| | |
|
|
119
|
+
|---|---|
|
|
120
|
+
| 🧠 **Persistent Memory** | Agents write memories during conversations — feedback, user context, project state. Synced to Postgres, injected on next start. They don't forget. |
|
|
121
|
+
| 🔌 **MCP Tool Integration** | Connect any MCP server (Redshift, GitHub, Notion, Figma, custom APIs) — stdio, SSE, or HTTP transports. |
|
|
122
|
+
| 📝 **Inline TypeScript MCPs** | Paste TypeScript source directly into the UI — no deployment needed. The runner compiles and executes it. |
|
|
123
|
+
| 🧵 **Full Thread Context** | Agents fetch the entire Slack thread on every invocation — zero context lost in handoffs. |
|
|
124
|
+
| 💾 **Session Continuity** | Slack thread ↔ Claude session mapping survives restarts. Pick up exactly where you left off. |
|
|
125
|
+
| 🔐 **Encrypted Secret Store** | API keys encrypted at rest (AES-256). MCPs reference secrets by name — raw values never touch the API or UI. |
|
|
126
|
+
| 🔁 **Hot Reload** | Edit instructions, skills, or tools and the agent picks up changes within seconds. No restart needed. |
|
|
127
|
+
|
|
128
|
+
### 👑 Boss + Specialist Hierarchy
|
|
129
|
+
|
|
130
|
+
| | |
|
|
131
|
+
|---|---|
|
|
132
|
+
| 👑 **Boss Orchestration** | Boss reads your message, finds the right specialist, delegates by @mention in the same thread, and summarizes the result. |
|
|
133
|
+
| 🏢 **Multi-Boss Support** | Run multiple Boss agents for different domains (engineering, data, support). Specialists can report to more than one boss. |
|
|
134
|
+
| 📋 **Auto-Generated Registries** | Every Boss gets a live team roster auto-regenerated whenever the team changes. No manual maintenance. |
|
|
135
|
+
| 🛠 **Skills** | Markdown files deployed as Claude Code slash commands. Give agents SQL rules, writing guidelines, or domain playbooks. |
|
|
136
|
+
| ⏰ **Scheduled Jobs** | Cron-based recurring tasks — daily reports, weekly digests, monitoring alerts — posted to any Slack channel or DM. |
|
|
137
|
+
|
|
138
|
+
### ⚙️ Platform
|
|
139
|
+
|
|
140
|
+
| | |
|
|
141
|
+
|---|---|
|
|
142
|
+
| 🧙 **Onboarding Wizard** | 5-step guided setup: identity → Slack app → credentials → tools & skills → review. |
|
|
143
|
+
| 🕓 **Version Control** | Every save auto-snapshots the full agent state. Browse history with line-level diffs, restore any version in one click. |
|
|
144
|
+
| 🔒 **Auth & RBAC** | 4 roles (superadmin / admin / editor / viewer), HMAC-signed sessions, per-agent write access grants. No external auth provider needed. |
|
|
145
|
+
| 🚦 **Channel Restrictions** | Lock agents to specific Slack channels. Bot auto-leaves uninvited channels with a notice. |
|
|
146
|
+
| 📊 **Live Logs** | SSE-streamed log output per agent — with level filters and search. |
|
|
147
|
+
| 🧠 **Memory Viewer** | Browse, inspect, and delete agent memories by type — feedback, user, project, reference. |
|
|
348
148
|
|
|
349
149
|
---
|
|
350
150
|
|
|
351
|
-
##
|
|
352
|
-
|
|
353
|
-
Every conversation is an opportunity for the agent to learn. This is the **primary design goal** of the platform.
|
|
151
|
+
## 🏗 Architecture
|
|
354
152
|
|
|
355
153
|
```
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
154
|
+
Slack Workspace (@boss, @data-bot, @writer, ...)
|
|
155
|
+
│ Socket Mode (Bolt)
|
|
156
|
+
▼
|
|
157
|
+
┌──────────────────────────────────────────────────┐
|
|
158
|
+
│ Docker Compose │
|
|
159
|
+
│ │
|
|
160
|
+
│ Web (Next.js) ──── Redis ────► Runner │
|
|
161
|
+
│ │ │ │
|
|
162
|
+
│ └──────── PostgreSQL ──────┘ │
|
|
163
|
+
└──────────────────────────────────────────────────┘
|
|
362
164
|
```
|
|
363
165
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
|
367
|
-
|
|
368
|
-
|
|
|
369
|
-
|
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
Scheduled jobs let the boss agent run recurring tasks on a cron schedule and post results to Slack.
|
|
380
|
-
|
|
381
|
-
### How it works
|
|
382
|
-
|
|
383
|
-
1. Create a job from the **Jobs** page in the web UI
|
|
384
|
-
2. Set a **prompt** (what to tell the boss), **schedule** (cron expression), and **target** (channel or DM)
|
|
385
|
-
3. The runner's `JobScheduler` fires on schedule and sends the prompt to the boss agent
|
|
386
|
-
4. Boss processes it like any normal message — may delegate to specialists, run MCP tools, etc.
|
|
387
|
-
5. Result is posted to the target Slack channel or DM
|
|
388
|
-
6. Run history (status, output, duration) is tracked and visible in the UI
|
|
389
|
-
|
|
390
|
-
### Example
|
|
391
|
-
|
|
392
|
-
| Field | Value |
|
|
393
|
-
|-------|-------|
|
|
394
|
-
| **Name** | Daily Booking Report |
|
|
395
|
-
| **Prompt** | Generate a summary of yesterday's bookings with key metrics |
|
|
396
|
-
| **Schedule** | `0 8 * * *` (daily at 8:00 AM) |
|
|
397
|
-
| **Target** | `#analytics` channel |
|
|
398
|
-
|
|
399
|
-
The UI includes schedule presets (hourly, daily, weekdays, weekly) and shows cron expressions in human-readable form.
|
|
400
|
-
|
|
401
|
-
### Job run states
|
|
402
|
-
|
|
403
|
-
| Status | Meaning |
|
|
404
|
-
|--------|---------|
|
|
405
|
-
| **Running** | Job is currently executing |
|
|
406
|
-
| **Success** | Completed and result posted to Slack |
|
|
407
|
-
| **Error** | Failed — boss not running, Claude error, or Slack API failure |
|
|
166
|
+
| Service | Description |
|
|
167
|
+
|---------|-------------|
|
|
168
|
+
| **Web** (Next.js 15) | Dashboard — create agents, edit skills, view logs, manage users |
|
|
169
|
+
| **Runner** (Node.js) | Hosts all agent processes and Slack connections |
|
|
170
|
+
| **PostgreSQL** | Stores agents, memories, skills, sessions, users, history |
|
|
171
|
+
| **Redis** | Delivers hot-reload events from Web to Runner instantly |
|
|
172
|
+
|
|
173
|
+
**How a message flows:**
|
|
174
|
+
1. User @mentions an agent in Slack
|
|
175
|
+
2. Runner receives the event via Bolt Socket Mode
|
|
176
|
+
3. Claude Code processes the message with the agent's compiled `CLAUDE.md`
|
|
177
|
+
4. Agent uses MCP tools if needed (Redshift, GitHub, Notion, etc.)
|
|
178
|
+
5. Response is formatted as Slack Block Kit and posted to the thread
|
|
179
|
+
6. Memory files written during the session are synced to Postgres
|
|
180
|
+
7. Next conversation starts with all accumulated knowledge
|
|
408
181
|
|
|
409
182
|
---
|
|
410
183
|
|
|
411
|
-
##
|
|
412
|
-
|
|
413
|
-
SlackHive ships with a simple but effective auth system — no external auth provider needed.
|
|
414
|
-
|
|
415
|
-
### How it works
|
|
416
|
-
|
|
417
|
-
- **Superadmin** is configured via environment variables (`ADMIN_USERNAME` / `ADMIN_PASSWORD`) — never stored in the database
|
|
418
|
-
- **Sessions** use HMAC-signed cookies (no JWTs, no session table)
|
|
419
|
-
- **Middleware** protects all routes — unauthenticated requests redirect to `/login`
|
|
420
|
-
|
|
421
|
-
### Roles
|
|
422
|
-
|
|
423
|
-
| Role | View | Create/edit agents | Manage jobs | Settings | Manage users |
|
|
424
|
-
|------|------|-------------------|-------------|----------|-------------|
|
|
425
|
-
| **Superadmin** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
426
|
-
| **Admin** | ✅ | ✅ | ✅ | ✅ | ✅ |
|
|
427
|
-
| **Editor** | ✅ | ✅ | ✅ | ✅ | ❌ |
|
|
428
|
-
| **Viewer** | ✅ | ❌ | ❌ | ❌ | ❌ |
|
|
429
|
-
|
|
430
|
-
- **Superadmin**: configured via env vars, never stored in DB
|
|
431
|
-
- **Admin**: full access — can create users with any role
|
|
432
|
-
- **Editor**: can create/edit agents, jobs, MCPs, skills, settings — but cannot manage users
|
|
433
|
-
- **Viewer**: read-only access to everything
|
|
434
|
-
|
|
435
|
-
All permissions are enforced server-side via API route guards, not just hidden in the UI.
|
|
184
|
+
## 🔑 Claude Code Authentication
|
|
436
185
|
|
|
437
|
-
|
|
186
|
+
Two options — use whichever fits your setup:
|
|
438
187
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
| Transport | Use Case | Config |
|
|
444
|
-
|-----------|----------|--------|
|
|
445
|
-
| `stdio` | Local subprocess | `command`, `args`, `env` |
|
|
446
|
-
| `sse` | Remote SSE endpoint | `url`, `headers` |
|
|
447
|
-
| `http` | Remote HTTP endpoint | `url`, `headers` |
|
|
448
|
-
|
|
449
|
-
**Example — Redshift MCP:**
|
|
450
|
-
|
|
451
|
-
```json
|
|
452
|
-
{
|
|
453
|
-
"name": "redshift-mcp",
|
|
454
|
-
"type": "stdio",
|
|
455
|
-
"description": "Read-only Redshift query access",
|
|
456
|
-
"config": {
|
|
457
|
-
"command": "node",
|
|
458
|
-
"args": ["/path/to/redshift-mcp-server/dist/index.js"],
|
|
459
|
-
"env": { "DATABASE_URL": "redshift://user:pass@host:5439/db" }
|
|
460
|
-
}
|
|
461
|
-
}
|
|
188
|
+
**Option A — API Key**
|
|
189
|
+
```env
|
|
190
|
+
ANTHROPIC_API_KEY=sk-ant-api03-...
|
|
462
191
|
```
|
|
192
|
+
Billed per token via the Anthropic API. Best for teams and production.
|
|
463
193
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
## 📁 Project Structure
|
|
469
|
-
|
|
470
|
-
```
|
|
471
|
-
slackhive/
|
|
472
|
-
├── apps/
|
|
473
|
-
│ ├── web/ # Next.js 15 — Web UI + API
|
|
474
|
-
│ │ └── src/
|
|
475
|
-
│ │ ├── app/ # Pages, API routes, settings
|
|
476
|
-
│ │ └── lib/
|
|
477
|
-
│ │ ├── db.ts # Postgres + Redis client
|
|
478
|
-
│ │ ├── auth.ts # HMAC cookie sessions, bcrypt
|
|
479
|
-
│ │ ├── auth-context.tsx # Client-side auth React context
|
|
480
|
-
│ │ ├── api-guard.ts # Role guard for API routes
|
|
481
|
-
│ │ ├── boss-registry.ts # Auto-generated boss team registry
|
|
482
|
-
│ │ ├── slack-manifest.ts
|
|
483
|
-
│ │ └── skill-templates.ts
|
|
484
|
-
│ │
|
|
485
|
-
│ └── runner/ # Agent runner service
|
|
486
|
-
│ └── src/
|
|
487
|
-
│ ├── agent-runner.ts # Lifecycle manager
|
|
488
|
-
│ ├── claude-handler.ts # Claude Code SDK integration
|
|
489
|
-
│ ├── slack-handler.ts # Slack Bolt + Block Kit formatting
|
|
490
|
-
│ ├── compile-claude-md.ts # Skills + memories → CLAUDE.md
|
|
491
|
-
│ ├── memory-watcher.ts # fs.watch → DB sync (learning)
|
|
492
|
-
│ ├── job-scheduler.ts # Cron-based scheduled job executor
|
|
493
|
-
│ └── logger.ts # Structured logging
|
|
494
|
-
│
|
|
495
|
-
├── packages/
|
|
496
|
-
│ └── shared/ # Shared TypeScript types + DB schema
|
|
497
|
-
│
|
|
498
|
-
├── docker-compose.yml
|
|
499
|
-
├── scripts/dev.sh
|
|
500
|
-
└── .env.example
|
|
194
|
+
**Option B — Claude Pro or Max Subscription**
|
|
195
|
+
```bash
|
|
196
|
+
claude login # run on host machine, saves credentials to ~/.claude/
|
|
501
197
|
```
|
|
198
|
+
Mount `~/.claude` into the runner container and leave `ANTHROPIC_API_KEY` unset. Best for individual developers.
|
|
502
199
|
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
## 🛠 Tech Stack
|
|
506
|
-
|
|
507
|
-
| Layer | Technology |
|
|
508
|
-
|-------|-----------|
|
|
509
|
-
| **Language** | TypeScript 5.x throughout |
|
|
510
|
-
| **Web UI** | Next.js 15 (App Router), React 19 |
|
|
511
|
-
| **AI Runtime** | Claude Code SDK (`@anthropic-ai/claude-agent-sdk`) |
|
|
512
|
-
| **Slack** | Bolt SDK (Socket Mode) |
|
|
513
|
-
| **Database** | PostgreSQL 16 |
|
|
514
|
-
| **Pub/Sub** | Redis 7 |
|
|
515
|
-
| **Infrastructure** | Docker Compose |
|
|
200
|
+
> Full guide → [slackhive.mintlify.app/configuration/env-vars](https://slackhive.mintlify.app/configuration/env-vars)
|
|
516
201
|
|
|
517
202
|
---
|
|
518
203
|
|
|
519
204
|
## 🔮 Roadmap
|
|
520
205
|
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
- [
|
|
524
|
-
- [
|
|
525
|
-
- [x]
|
|
526
|
-
- [
|
|
527
|
-
- [ ]
|
|
528
|
-
- [ ]
|
|
529
|
-
- [ ]
|
|
530
|
-
- [ ]
|
|
531
|
-
- [ ]
|
|
532
|
-
- [ ]
|
|
533
|
-
|
|
534
|
-
|
|
206
|
+
- [x] Boss orchestration + auto-generated team registries
|
|
207
|
+
- [x] Persistent memory system
|
|
208
|
+
- [x] Scheduled jobs
|
|
209
|
+
- [x] Version control with diff view
|
|
210
|
+
- [x] Encrypted environment variables
|
|
211
|
+
- [x] Channel restrictions
|
|
212
|
+
- [ ] Multi-workspace support
|
|
213
|
+
- [ ] Webhook triggers (GitHub, Jira, PagerDuty → agent actions)
|
|
214
|
+
- [ ] Agent-to-agent direct messaging
|
|
215
|
+
- [ ] Analytics dashboard
|
|
216
|
+
- [ ] Custom tool builder (no MCP server needed)
|
|
217
|
+
- [ ] Agent templates marketplace
|
|
218
|
+
- [ ] RAG integration — connect agents to document stores
|
|
219
|
+
|
|
220
|
+
Have an idea? [Open an issue](https://github.com/pelago-labs/slackhive/issues)
|
|
535
221
|
|
|
536
222
|
---
|
|
537
223
|
|
|
538
224
|
## 🤝 Contributing
|
|
539
225
|
|
|
540
|
-
Contributions are very welcome! This project is in active development.
|
|
541
|
-
|
|
542
226
|
```bash
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
cd slackhive
|
|
546
|
-
npm install
|
|
227
|
+
git clone https://github.com/pelago-labs/slackhive.git
|
|
228
|
+
cd slackhive && npm install
|
|
547
229
|
|
|
548
230
|
# Start infra
|
|
549
231
|
docker compose up postgres redis -d
|
|
550
232
|
|
|
551
|
-
# Run
|
|
233
|
+
# Run locally
|
|
552
234
|
cd apps/web && npm run dev # http://localhost:3000
|
|
553
|
-
cd apps/runner && npm run dev
|
|
235
|
+
cd apps/runner && npm run dev
|
|
554
236
|
```
|
|
555
237
|
|
|
556
|
-
|
|
238
|
+
Open an issue before submitting large PRs so we can align on the approach.
|
|
557
239
|
|
|
558
240
|
---
|
|
559
241
|
|
|
560
|
-
##
|
|
242
|
+
## 👥 Contributors
|
|
561
243
|
|
|
562
|
-
|
|
244
|
+
<a href="https://github.com/pelago-labs/slackhive/graphs/contributors">
|
|
245
|
+
<img src="https://contrib.rocks/image?repo=pelago-labs/slackhive" alt="Contributors" />
|
|
246
|
+
</a>
|
|
247
|
+
|
|
248
|
+
---
|
|
249
|
+
|
|
250
|
+
## ⭐ Star History
|
|
563
251
|
|
|
564
|
-
<a href="https://star-history.com/#
|
|
252
|
+
<a href="https://star-history.com/#pelago-labs/slackhive&Date">
|
|
565
253
|
<picture>
|
|
566
|
-
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=
|
|
567
|
-
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=
|
|
568
|
-
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=
|
|
254
|
+
<source media="(prefers-color-scheme: dark)" srcset="https://api.star-history.com/svg?repos=pelago-labs/slackhive&type=Date&theme=dark" />
|
|
255
|
+
<source media="(prefers-color-scheme: light)" srcset="https://api.star-history.com/svg?repos=pelago-labs/slackhive&type=Date" />
|
|
256
|
+
<img alt="Star History Chart" src="https://api.star-history.com/svg?repos=pelago-labs/slackhive&type=Date" width="600" />
|
|
569
257
|
</picture>
|
|
570
258
|
</a>
|
|
571
259
|
|
|
572
260
|
---
|
|
573
261
|
|
|
574
|
-
##
|
|
262
|
+
## 🔒 Security
|
|
575
263
|
|
|
576
|
-
|
|
264
|
+
Report vulnerabilities to **[aman@pelago.co](mailto:aman@pelago.co)** — please don't open public issues for security bugs. We respond within 48 hours.
|
|
577
265
|
|
|
578
266
|
---
|
|
579
267
|
|
|
268
|
+
## 📄 License
|
|
269
|
+
|
|
270
|
+
MIT © 2026 [Pelago Labs](https://github.com/pelago-labs)
|
|
271
|
+
|
|
580
272
|
<div align="center">
|
|
581
|
-
<sub>Built with Claude Code
|
|
273
|
+
<sub>Built with Claude Code, Slack Bolt, and a lot of ☕</sub>
|
|
582
274
|
</div>
|
package/dist/commands/init.js
CHANGED
|
@@ -15,7 +15,7 @@ const path_1 = require("path");
|
|
|
15
15
|
const chalk_1 = __importDefault(require("chalk"));
|
|
16
16
|
const ora_1 = __importDefault(require("ora"));
|
|
17
17
|
const prompts_1 = __importDefault(require("prompts"));
|
|
18
|
-
const REPO_URL = 'https://github.com/
|
|
18
|
+
const REPO_URL = 'https://github.com/pelago-labs/slackhive.git';
|
|
19
19
|
/**
|
|
20
20
|
* Runs `slackhive init` — interactive setup wizard.
|
|
21
21
|
*
|
|
@@ -62,7 +62,7 @@ async function init(opts) {
|
|
|
62
62
|
else {
|
|
63
63
|
const spinner = (0, ora_1.default)(' Cloning repository...').start();
|
|
64
64
|
try {
|
|
65
|
-
(0, child_process_1.execSync)(`git clone ${REPO_URL} "${dir}"`, { stdio: 'ignore' });
|
|
65
|
+
(0, child_process_1.execSync)(`git clone --depth 1 ${REPO_URL} "${dir}"`, { stdio: 'ignore' });
|
|
66
66
|
spinner.succeed('Repository cloned');
|
|
67
67
|
}
|
|
68
68
|
catch {
|