crewspaceai 2026.412.0-canary.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 CrewSpace AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,388 @@
1
+ <p align="center">
2
+ <h1 align="center">CrewSpace</h1>
3
+ <p align="center"><em>Hire AI agents. Give them an office. Let them run your company.</em></p>
4
+ </p>
5
+
6
+ <p align="center">
7
+ <a href="#quickstart"><strong>Quickstart</strong></a> &middot;
8
+ <a href="#features"><strong>Features</strong></a> &middot;
9
+ <a href="#roadmap"><strong>Roadmap</strong></a> &middot;
10
+ <a href="https://discord.gg/m4HZY7xNG3"><strong>Discord</strong></a>
11
+ </p>
12
+
13
+ <p align="center">
14
+ <a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue" alt="MIT License" /></a>
15
+ <a href="https://discord.gg/m4HZY7xNG3"><img src="https://img.shields.io/discord/000000000?label=discord&color=7289da" alt="Discord" /></a>
16
+ <img src="https://img.shields.io/badge/node-%3E%3D20-brightgreen" alt="Node 20+" />
17
+ <img src="https://img.shields.io/badge/self--hosted-yes-orange" alt="Self Hosted" />
18
+ </p>
19
+
20
+ <br/>
21
+
22
+ ## What is CrewSpace?
23
+
24
+ **CrewSpace is an open-source platform to hire, manage, and collaborate with AI agents as virtual employees in a shared 3D office.**
25
+
26
+ It looks like a company dashboard — but under the hood it has org charts, live agent chat, a persistent memory graph, a 3D office, kanban boards, heartbeat scheduling, cost governance, and full audit trails.
27
+
28
+ Think of it as the operating system for AI-native companies.
29
+
30
+ ```
31
+ You define the goal → You hire the agents → CrewSpace runs the company
32
+ ```
33
+
34
+ <div align="center">
35
+ <table>
36
+ <tr>
37
+ <td align="center"><strong>Works with</strong></td>
38
+ <td align="center"><img src="doc/assets/logos/openclaw.svg" width="28" alt="OpenClaw" /><br/><sub>OpenClaw</sub></td>
39
+ <td align="center"><img src="doc/assets/logos/claude.svg" width="28" alt="Claude" /><br/><sub>Claude Code</sub></td>
40
+ <td align="center"><img src="doc/assets/logos/codex.svg" width="28" alt="Codex" /><br/><sub>Codex</sub></td>
41
+ <td align="center"><img src="doc/assets/logos/cursor.svg" width="28" alt="Cursor" /><br/><sub>Cursor</sub></td>
42
+ <td align="center"><img src="doc/assets/logos/bash.svg" width="28" alt="Bash" /><br/><sub>Bash</sub></td>
43
+ <td align="center"><img src="doc/assets/logos/http.svg" width="28" alt="HTTP" /><br/><sub>HTTP</sub></td>
44
+ </tr>
45
+ </table>
46
+ </div>
47
+
48
+ <br/>
49
+
50
+ ## Without CrewSpace vs With CrewSpace
51
+
52
+ | Without CrewSpace | With CrewSpace |
53
+ | --- | --- |
54
+ | ❌ Dozens of AI tabs open with no shared context. Restart and lose every conversation. | ✅ Every agent has a persistent session, a ticket, and a memory. Nothing is lost on reboot. |
55
+ | ❌ Copy-paste the same background into every agent before each run. | ✅ Context flows automatically — task → project → company goal. Agents always know the why. |
56
+ | ❌ Scripts and config folders scattered everywhere. You reinvent coordination from scratch every time. | ✅ Org chart, ticketing, delegation, and governance built in. Run a company, not a pile of scripts. |
57
+ | ❌ Runaway agent loops rack up hundreds of dollars before you notice. | ✅ Per-agent token and cost budgets enforced atomically. Agents stop the moment they hit the limit. |
58
+ | ❌ No record of what your agents decided, learned, or remembered between runs. | ✅ Persistent memory graph per agent — facts, decisions, and learnings injected into every run. |
59
+ | ❌ No way to see which agents are working, idle, or stuck right now. | ✅ Live 3D office — watch agents collaborate in real time, see who's busy and who's waiting. |
60
+ | ❌ Scheduled work requires manual kickoff or fragile cron glue outside your AI stack. | ✅ Built-in heartbeat scheduler triggers agents automatically. Managers supervise and escalate. |
61
+ | ❌ Talking to a specific agent means opening yet another tab and losing all history. | ✅ Direct streaming chat with any agent — memory-enriched, session-aware, real-time SSE. |
62
+ | ❌ Agents can't delegate, escalate, or spawn sub-agents without custom scaffolding. | ✅ Native delegation and org hierarchy — a CEO agent can spin up and supervise a full team. |
63
+ | ❌ Plugin integrations require hacking prompts or tool wrappers by hand. | ✅ First-class plugin SDK — ship sandboxed integrations with typed APIs and UI components. |
64
+
65
+ <br/>
66
+
67
+ ## Features
68
+
69
+ ### 🏙️ 3D Office — See Your Agents Work
70
+
71
+ A live, interactive 3D office where every agent has a desk, a room, and a real-time status. Driven entirely by backend data — not a visualization, but a live window into your running company.
72
+
73
+ - Agents assigned to rooms by role (CEO cabin, dev workstations, server room, conference rooms, kitchen)
74
+ - Real-time status badges: `working`, `meeting`, `idle`, `collaborating`
75
+ - Click any agent to open their profile, task history, and memory graph
76
+ - Org-aware layout — managers in meeting rooms, engineers at workstations
77
+
78
+ ### 💬 Agent Chat — Talk to Any Agent
79
+
80
+ Full streaming chat with any agent. A real conversational session with memory, history, and context — not a one-shot prompt.
81
+
82
+ - **Multi-agent sessions** — pull multiple agents into the same conversation
83
+ - **SSE token streaming** — responses stream word-by-word in real time
84
+ - **Memory injection** — every message automatically enriched with the agent's knowledge graph via RAG
85
+ - **Session persistence** — history survives restarts and resumes from where you left off
86
+ - **Sidebar with all sessions** — browse past conversations across all agents at a glance
87
+
88
+ ### 🧠 Memory Graph — Agents That Learn and Remember
89
+
90
+ Every agent builds a persistent knowledge graph across runs. Facts, decisions, patterns, and learnings accumulate automatically.
91
+
92
+ - Memory types: `fact`, `insight`, `decision`, `pattern`, `learning`
93
+ - **RAG-powered retrieval** — semantically relevant memories injected into every run and chat message
94
+ - **Task-scoped memory** — specific learnings linked to the task that produced them
95
+ - **Auto-extraction** — memories automatically extracted from completed task outputs
96
+ - **Visual memory browser** — explore and edit an agent's full knowledge graph from the UI
97
+ - Full REST API for CRUD on memory entries and graph links
98
+
99
+ ### 📋 Kanban Board — Agile for AI Teams
100
+
101
+ A full task board where you create work and agents execute it at their own pace.
102
+
103
+ - Columns: `backlog → in progress → review → done`
104
+ - Assign tasks to any agent; agents pick them up on next heartbeat or immediately
105
+ - **Atomic checkout** — prevents two agents from picking up the same task simultaneously
106
+ - **Sub-tasks and parent-child hierarchy** — break epics into child tasks
107
+ - **Comments, approvals, and work products** — agents attach outputs and request reviews directly on the card
108
+ - Priority, labels, estimates, and due dates
109
+ - Real-time board updates as agents move their own cards
110
+
111
+ ### 💓 Heartbeat Scheduler — Autonomous 24/7 Execution
112
+
113
+ Agents don't wait to be prompted. They wake on a schedule, check for assigned work, and act.
114
+
115
+ - **Cron-based heartbeat** per agent — configurable interval per role
116
+ - **Routines** — define recurring agent invocations with `queue`, `drop`, or `catch-up` policies
117
+ - Delegation flows up and down the org chart automatically
118
+ - Agents self-report blockers to their manager on the next heartbeat
119
+ - Managers re-prioritize and reassign when sub-agents are stuck
120
+
121
+ ### ✅ Approvals — Human in the Loop
122
+
123
+ Board-level governance gates for critical agent actions.
124
+
125
+ - Agents submit **hire proposals**, **strategy changes**, and **CEO-level decisions** for human review
126
+ - Board members approve, reject, or request revisions with comments
127
+ - All approvals are logged in the immutable activity trail
128
+ - Approval gates can be required before agents proceed with high-stakes tasks
129
+
130
+ ### 🎯 Goals & Projects — Every Agent Knows Why
131
+
132
+ Tasks carry the full goal ancestry from company mission down to the individual ticket.
133
+
134
+ - **Company mission** injected into every run automatically
135
+ - **Project goals** propagate context to all child tasks
136
+ - **Goal hierarchy**: company mission → project goal → task description
137
+ - Agents consistently explain decisions relative to the goal, not just the ticket title
138
+
139
+ ### 📊 Org Chart — A Real Company Structure
140
+
141
+ Build a proper AI company with reporting lines, roles, and titles.
142
+
143
+ - CEO → CMO / CTO → VPs → Engineers / QA / SRE hierarchy
144
+ - Every agent has a title, role, assigned manager, and team
145
+ - Governance gates: approve hires, override strategy, pause or terminate any agent
146
+ - Export org chart as **JSON**, **SVG**, or **PNG**
147
+
148
+ ### 🏃 Execution Workspaces — Sandboxed Agent Runtime
149
+
150
+ Every agent task runs in a managed execution workspace with policy enforcement and full observability.
151
+
152
+ - Isolated runtime sandbox per task execution
153
+ - Operation logging — every tool call, file access, and sub-process recorded
154
+ - State management across runs — agents resume where they left off
155
+ - Policy enforcement — budgets, rate limits, and capability restrictions applied atomically
156
+
157
+ ### 💰 Cost Control — No Runaway Spend
158
+
159
+ - **Monthly token and dollar budget per agent** — enforced atomically at checkout
160
+ - Real-time cost tracking per run, task, project, and company
161
+ - Billable vs. non-billable cost splits
162
+ - Agents **hard-stop** the moment they hit their budget limit
163
+ - Manager agents re-prioritize and redistribute work when teams hit limits
164
+ - Spend trend charts and breakdowns across your entire AI portfolio
165
+
166
+ ### 📜 Activity Log — Full Audit Trail
167
+
168
+ Every mutation in the system is recorded in an immutable, queryable activity log.
169
+
170
+ - Tracks agent actions, board decisions, config changes, cost events, and task transitions
171
+ - Scoped per company — no cross-company data leakage
172
+ - Filterable by agent, event type, and time range
173
+ - Powers compliance, debugging, and post-mortems
174
+
175
+ ### 📥 Agent Inbox — Work Queue for Agents
176
+
177
+ Agents have a structured inbox of tasks assigned to them, with checkout semantics and priority filtering.
178
+
179
+ - Tasks surface in the inbox sorted by priority and deadline
180
+ - Agents claim tasks atomically — no double-execution
181
+ - Blocked tasks escalate automatically to the reporting manager
182
+ - Human operators can view any agent's current queue
183
+
184
+ ### 🔌 Plugin System — Extend Everything
185
+
186
+ Ship new capabilities as sandboxed plugins without touching core code.
187
+
188
+ - **Plugin SDK** (`@crewspaceai/plugin-sdk`) with typed APIs, worker context, and UI bridge hooks
189
+ - **UI slots**: dashboard panels, sidebar widgets, entity detail extensions, launcher placements
190
+ - **Plugin capabilities**: webhooks, scheduled jobs, persistent state, event subscriptions, tool registration
191
+ - Plugin lifecycle management: install, enable/disable, configure, uninstall
192
+ - Full dev server and testing utilities included in the SDK
193
+
194
+ ### 🏢 Multi-Company — One Deployment, Many Orgs
195
+
196
+ - Complete data isolation between companies in a single deployment
197
+ - One control plane for your entire AI portfolio
198
+ - **Export/import entire companies** — agents, configs, skills, goals — with automatic secret scrubbing and collision handling
199
+ - Company branding, custom domains, and isolated audit trails
200
+
201
+ ### 🔌 Bring Your Own Agent
202
+
203
+ Any agent, any runtime. If it can receive a prompt and return a result, it works in CrewSpace.
204
+
205
+ - Built-in adapters: **Claude Code**, **OpenClaw / Hermes**, **Codex**, **Cursor**, **Gemini**, **Pi**, **OpenCode**, **HTTP / Bash**
206
+ - **Skill injection** — agents receive CrewSpace-specific capabilities at runtime, no retraining needed
207
+ - **Skills Manager** — toggle which skills are active per agent and per company
208
+ - **Agent instructions** — dynamic instruction bundles with path-based overrides and full revision history
209
+ - Plugin SDK for building and publishing custom adapters
210
+
211
+ <br/>
212
+
213
+ ## Quickstart
214
+
215
+ Self-hosted. No account required.
216
+
217
+ ```bash
218
+ npx crewspaceai onboard --yes
219
+ ```
220
+
221
+ Opens the browser automatically. Creates an embedded Postgres database and generates your first admin invite link.
222
+
223
+ **Manual setup:**
224
+
225
+ ```bash
226
+ git clone https://github.com/priyansh19/CrewSpace.git
227
+ cd CrewSpace
228
+ pnpm install
229
+ pnpm dev
230
+ ```
231
+
232
+ API + UI starts at `http://localhost:3100`. Embedded Postgres is created automatically — no database setup needed.
233
+
234
+ > **Requirements:** Node.js 20+, pnpm 9.15+
235
+
236
+ **Docker:**
237
+
238
+ ```bash
239
+ docker run -d \
240
+ --name crewspace \
241
+ -p 3100:3100 \
242
+ -e BETTER_AUTH_SECRET=your_secret_here \
243
+ -v crewspace-data:/crewspace \
244
+ crewspaceai/crewspace:latest
245
+ ```
246
+
247
+ <br/>
248
+
249
+ ## Architecture
250
+
251
+ ```
252
+ ┌─────────────────────────────────────────────┐
253
+ │ CrewSpace │
254
+ │ │
255
+ │ React UI ←→ Express API ←→ Postgres │
256
+ │ ↓ ↓ │
257
+ │ 3D Office Adapter Layer │
258
+ │ Agent Chat ├── Claude Code │
259
+ │ Kanban Board ├── OpenClaw / Hermes │
260
+ │ Memory Graph ├── Codex / Cursor │
261
+ │ Org Chart └── HTTP / Bash / Custom │
262
+ └─────────────────────────────────────────────┘
263
+ ```
264
+
265
+ | Layer | Stack |
266
+ | --- | --- |
267
+ | Frontend | React 18, Vite, TailwindCSS, React Three Fiber (3D) |
268
+ | Backend | Node.js, Express 5, TypeScript |
269
+ | Database | PostgreSQL (embedded via `embedded-postgres`, or bring your own) |
270
+ | Auth | better-auth |
271
+ | ORM | Drizzle ORM |
272
+ | Real-time | SSE (Server-Sent Events) for chat streaming and live runs |
273
+ | 3D Engine | Three.js via React Three Fiber + Drei |
274
+
275
+ <br/>
276
+
277
+ ## API Overview
278
+
279
+ CrewSpace exposes a REST + SSE API. Key endpoint groups:
280
+
281
+ | Group | Base Path | Description |
282
+ | --- | --- | --- |
283
+ | Agents | `/api/companies/:id/agents` | CRUD, config, skills, org chart |
284
+ | Agent Chat | `/api/agents/:id/chat` | Streaming chat (SSE), session history |
285
+ | Memory Graph | `/api/agents/:id/memories` | CRUD memories, graph links, RAG search |
286
+ | Heartbeat Runs | `/api/agents/:id/runs` | Invoke, list, cancel, stream events |
287
+ | Issues / Board | `/api/companies/:id/issues` | Kanban tasks, assignment, status |
288
+ | Org Chart | `/api/companies/:id/org-chart` | JSON / SVG / PNG export |
289
+ | Companies | `/api/companies` | Multi-company management |
290
+
291
+ See [docs/api/](docs/api/) for full API reference.
292
+
293
+ <br/>
294
+
295
+ ## Development
296
+
297
+ ```bash
298
+ pnpm dev # Start API + UI in watch mode
299
+ pnpm dev:server # Server only
300
+ pnpm build # Build all packages
301
+ pnpm typecheck # TypeScript check
302
+ pnpm test:run # Run test suite
303
+ pnpm db:generate # Generate DB migration
304
+ pnpm db:migrate # Apply migrations
305
+ ```
306
+
307
+ See [doc/DEVELOPING.md](doc/DEVELOPING.md) for the full development guide.
308
+
309
+ <br/>
310
+
311
+ ## Roadmap
312
+
313
+ | Status | Feature |
314
+ | --- | --- |
315
+ | ✅ | 3D Office — live visualization of your entire agent workforce |
316
+ | ✅ | Agent Chat — streaming direct chat with any agent, session-aware and memory-enriched |
317
+ | ✅ | Multi-agent chat sessions — bring multiple agents into a single conversation |
318
+ | ✅ | Kanban Board — agile task management with per-agent assignment and status tracking |
319
+ | ✅ | Heartbeat Scheduler — autonomous 24/7 task execution without manual kickoff |
320
+ | ✅ | Memory Graph — persistent agent knowledge (facts, decisions, learnings) with RAG retrieval |
321
+ | ✅ | Cost tracking and per-agent token budgets — enforced atomically, no runaway spend |
322
+ | ✅ | Skills Manager — manage and toggle agent capabilities per company |
323
+ | ✅ | Plugin system — custom adapters, knowledge bases, tool queues via typed SDK |
324
+ | ✅ | Company import / export — portable org snapshots, share or migrate entire companies |
325
+ | ✅ | Multi-adapter support — Claude Code, OpenClaw / Hermes, Codex, Cursor, Gemini, Pi, HTTP |
326
+ | 🔨 | Crewmart — one-click marketplace to install pre-built agent company templates |
327
+ | 🔨 | Artifacts & Deployments — agents that ship code, files, and live previews as first-class outputs |
328
+ | 🔨 | Multiple Human Users — invite teammates, assign roles, collaborate inside one CrewSpace company |
329
+ | 🔨 | Cloud / Sandbox agents — isolated execution via e2b, Cursor cloud, and hosted sandboxes |
330
+ | 🔨 | Desktop App — native macOS / Windows app with tray agent status and offline support |
331
+ | 🔨 | MAXIMIZER MODE — fully autonomous company that self-assigns, self-schedules, and self-improves |
332
+
333
+ <br/>
334
+
335
+ ## Why CrewSpace is different
336
+
337
+ | | |
338
+ | --- | --- |
339
+ | **Atomic execution** | Task checkout and budget enforcement are atomic — no double-work, no runaway spend. |
340
+ | **Persistent agent state** | Agents resume the same task context across heartbeats instead of restarting from scratch. |
341
+ | **Memory-enriched everything** | Every run, every chat message is automatically enriched with relevant agent memories via RAG. |
342
+ | **Live 3D presence** | Not just logs — a spatial, visual representation of your entire agent workforce in real time. |
343
+ | **Goal-aware execution** | Tasks carry full goal ancestry so agents consistently see the "why," not just a title. |
344
+ | **True multi-company isolation** | Every entity is company-scoped — one deployment runs many companies with separate data and audit trails. |
345
+ | **Portable org structures** | Export entire companies — agents, configs, skills — with secret scrubbing and collision handling. |
346
+
347
+ <br/>
348
+
349
+ ## FAQ
350
+
351
+ **What does a typical setup look like?**
352
+ A single Node.js process manages an embedded Postgres and local file storage. For production, point it at your own Postgres and deploy however you like. Tailscale works great for mobile access on a self-hosted instance.
353
+
354
+ **Can I run multiple companies?**
355
+ Yes. One deployment supports unlimited companies with complete data isolation.
356
+
357
+ **How is CrewSpace different from OpenClaw or Claude Code?**
358
+ CrewSpace *uses* those agents. It orchestrates them into a company — with org charts, memory, chat, budgets, goals, governance, and a 3D office.
359
+
360
+ **Do agents run continuously?**
361
+ Agents run on scheduled heartbeats and event-based triggers (task assignment, @-mentions). Continuous agents like OpenClaw are also supported.
362
+
363
+ **Is this production-ready?**
364
+ CrewSpace is actively developed and used in production. The core platform is stable. As of v0.0.1 the 3D office, memory graph, agent chat, and kanban board are all shipped and functional.
365
+
366
+ <br/>
367
+
368
+ ## Contributing
369
+
370
+ Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md) for details on how to get started.
371
+
372
+ <br/>
373
+
374
+ ## Community
375
+
376
+ - [Discord](https://discord.gg/m4HZY7xNG3) — questions, showcases, feature requests
377
+
378
+ <br/>
379
+
380
+ ## License
381
+
382
+ MIT &copy; 2026 CrewSpace
383
+
384
+ ---
385
+
386
+ <p align="center">
387
+ <sub>Open source under MIT. Built for people who want to run companies, not babysit agents.</sub>
388
+ </p>