deepddw
by ccch713
README.md
# Staffwright โ Your Small Team's AI Staff, Self-Hosted
[](LICENSE)
[](https://github.com/ccch713/staffwright/actions/workflows/ci.yml)
[](https://github.com/0xsline/awesome-deepseek-harness#memory--knowledge)
**Staffwright turns one ordinary computer into your team's AI workstation: shared long-term memory, a company knowledge base, document search, and a live office view of your AI at work. Deploy once โ every phone, laptop and tablet on your network reaches it from the browser. No app installs. Up to ~20 people. MIT-licensed.**
*(staff + wright, as in "playwright" โ a maker of staff.)*
- ๐ง **Shared memory** โ cross-session long-term memory, exposed through the official MCP interface and shared by the whole team
- ๐ **Knowledge base** โ ingest and search your docs anytime: industry material, SOPs, research notes
- ๐ **Every device on the network** โ deploy once on one always-on machine; desktops, phones and tablets all connect from the browser
- ๐ **Your hardware** โ data stays on your server and never leaves your LAN
- ๐ฅ๏ธ **Virtual office** โ a pixel-art, view-only visualization of your AI staff at work
Under the hood, Staffwright runs the official **DeepSeek Harness (DSH)** engine untouched โ zero source changes, all integration through DSH's standard MCP interface. Staffwright is the standalone, international-first distribution of the deepDDW project; the DSH-plugin line continues at [ccch713/deepddw](https://github.com/ccch713/deepddw).
> ## โ ๏ธ Read Before Installing
>
> Staffwright implements **its own memory and knowledge-base isolation**. To avoid conflicts or memory confusion:
>
> 1. **Back up** your existing memory and knowledge-base contents (wherever they live in your DSH setup);
> 2. **Uninstall/disable** any other memory or knowledge-base plugins;
> 3. Only then install Staffwright and let it own the memory & knowledge-base stack.
>
> Running it alongside other memory/KB plugins may cause data conflicts or memory mixing between namespaces.
---
## Try It in 60 Seconds
```bash
# 1. On the always-on machine (macOS 14+ / Ubuntu 22+):
git clone https://github.com/ccch713/staffwright.git && cd staffwright
./install.sh --with-dsh # installs the DSH engine automatically if missing,
# then the gateway + DSH MCP bridge
./install.sh --port 8600 # 2. start (runs the test suite first, then serves)
# 3. From any device on the same network:
# http://<server-ip>:8600/ โ the DSH workbench, team-wide
# Phones/tablets: "Add to Home Screen" for an App-like experience
# 4. Add your API key in DSH Settings โ Models (see "Do I need an API key?" below)
# 5. In chat, ask the model to "search the knowledge base" or "remember โฆ"
# โ it auto-invokes the built-in MCP tools
```
**Requirements**: one ordinary computer/server (**8 GB RAM minimum, 16 GB+ recommended**), Python 3.11+, no GPU needed (LLM via cloud API or local Ollama).
## Do I Need an API Key?
Staffwright ships **no keys, no accounts, no lock-in** โ you pick one of three ways to give your staff a brain. Nothing else needs configuring: the gateway, memory, knowledge base and document search work out of the box; the key only powers the chat model.
| Option | Cost | Best for |
|---|---|---|
| **DeepSeek cloud key** | A few dollars a month for a whole small team โ DeepSeek's API is among the cheapest of frontier-grade models | Fastest start: paste one key in DSH Settings โ Models |
| **Local Ollama** (or any OpenAI-compatible endpoint) | Free, offline | Privacy-max / air-gapped networks |
| **Managed relay** *(planned)* | Monthly bundle, zero config | "Just make it work" teams โ opt-in, never a default |
Then hire your first staff member in ~5 minutes from [`roles/`](roles/) โ see below.
**Prefer Docker?**
```bash
cp .env.example .env # set DDW_ACCESS_TOKEN
docker compose -f deepddw-compose.yml up -d --build
# โ http://<host>:8500/
```
### Windows (standalone exe)
A Windows build is produced automatically by CI โ download `deepddw-windows.zip` (legacy artifact name) from the latest **Actions โ Artifacts**:
```bash
deepddw-windows/deepddw.exe # unzip anywhere, no Python/Node needed
# optional: set DDW_DATA_DIR / DDW_ACCESS_TOKEN
# starts on 0.0.0.0:8500 โ open http://<host>:8500/health
```
Upgrades: replace the folder with a newer zip โ your data (under `%USERPROFILE%\.deepddw`) is untouched. See `docs/windows-packaging.md`.
---
## Why Staffwright?
Most AI-assistant setups stop at "chat in a browser tab". Staffwright is a **complete workstation**:
| Typical self-hosted assistant | Staffwright |
|---|---|
| ๐ Bound to one machine, or one browser profile | โ
**LAN-wide access**: deploy once; every device on the network connects |
| ๐ง No memory between sessions | โ
Long-term memory write/search โ the assistant accumulates context |
| ๐ No knowledge base | โ
Ingest & search your own docs, SOPs and notes, callable from chat |
| ๐ค Single-user mindset | โ
**Team mode**: multi-user accounts, team memory distillation, workspace isolation, incognito sessions, retrieval health |
| ๐ถ๏ธ Opaque backend | โ
**Virtual office**: watch every subsystem at work โ view-only by design |
**In one sentence**: turn a "personal AI toy" into a tool a small team actually runs its daily AI workflow on โ fully packaged, easy to deploy, low maintenance, up to ~20 people.
> **Rule of thumb**: one instance per team of โค20 people on one network. If your scenario fits in one room, one floor, or one VPN, Staffwright fits you.
---
## What's Inside
| Capability | What you get |
|---|---|
| ๐ง Memory | Cross-session long-term memory; results ranked by relevance (layer weight ร hit count ร freshness) |
| ๐ Knowledge base | Ingest & search; session โ document auto-ingest; hybrid retrieval (SQLite FTS5 + optional LanceDB vectors, RRF fusion) |
| ๐ Document search | Optional SearXNG aggregate search service |
| ๐ Multi-device gateway | Device identity & online registry, live status panel, rate limiting, session resume across devices |
| ๐ฅ Team features | Multi-user accounts, team distillation (deduplicated shared team memory), workspace isolation, scope promote, incognito |
| ๐ DSH integration | Official MCP interface (`streamable-http`) โ DSH UI, settings and model config stay 100% official |
| ๐ฅ๏ธ Virtual office | Real-activity pixel-art visualization; failures raise a banner; day digest importance-weighted |
| ๐ Ops | One-click backup/restore, optional TLS, Docker one-command deploy, version/upgrade check, Windows exe |
## Ready-Made AI Staff โ Pick a Role, Not a Blank Prompt
Installing is not the finish line; a new AI hire needs a job description. Staffwright ships **role packs** distilled from real small-business deployments, so a new team goes *install โ pick a role โ useful in under an hour*:
| Role pack | Hires as | Headline workflows |
|---|---|---|
| [`front-desk`](roles/front-desk/) | receptionist | FAQ from KB, appointment reminders & no-show reduction, missed-call text-back, review requests |
| [`lead-follower`](roles/lead-follower/) | sales development rep | instant first response, missed-call text-back, 0/1/3/7-day follow-up cadence |
| [`ecommerce-ops`](roles/ecommerce-ops/) | ops assistant | customer-reply drafts, review responses, listing polish, daily digest |
| [`listing-writer`](roles/listing-writer/) | real-estate assistant | platform-ready listings, lead qualification, viewing scheduling |
| [`office-admin`](roles/office-admin/) | chief-of-staff assistant | daily digest, meeting notes โ KB, invoice triage |
| [`librarian`](roles/librarian/) | knowledge curator | KB ingestion & curation, retrieval health, gap reports |
The field-tested deployments behind these packs โ dental clinic, e-commerce shop, real-estate agency โ are documented in [`docs/playbooks.md`](docs/playbooks.md).
---
## How It Works
```
๐ฑ Phone / ๐ป Desktop / ๐ฑ Tablet / ๐ฅ๏ธ Laptop โ any device on the network
โ (browser access, no app install)
โผ
Staffwright Gateway (one server on your network)
โโ /dsh/* proxy โ DSH engine (official UI, model config & chat untouched)
โโ /api/* proxy โ DSH RPC/API
โโ /api/v1/* Staffwright capabilities: Knowledge Base / Memory / Docs / LLM config
โ
โ DSH official MCP client (streamable-http)
โผ
Staffwright MCP tools (auto-invoked by the model)
โโ mcp__deepddw__ddw_kb_search knowledge base search
โโ mcp__deepddw__ddw_memory_put write memory
โโ mcp__deepddw__ddw_memory_search search memory
โโ mcp__deepddw__ddw_docs_portal_search document search
```
**Integration = DSH standard MCP** โ zero intrusion, zero changes to DSH source. (Tool names keep the internal `deepddw` codename; a rename pass is on the roadmap.)
---
## Virtual Office
Open `/ui/office.html` and watch your Staffwright at work: every subsystem is a pixel-art staff member โ the gateway doorman waves devices in, the chat receptionist types away, the memory butler files notes, the librarian shelves new docs, the meter clerk bills LLM calls. Real activity drives the animations (no fake loops: 30 minutes without events โ back to idle); failures raise a banner; the day's digest is importance-weighted. Fully programmatic rendering โ zero third-party art assets, zero runtime dependencies. **View-only by design**: the API exposes nothing but job titles and whitelisted count phrases โ never document contents, memory values, or chat transcripts.
---
## Security & Privacy
| Capability | Description |
|-----------|-------------|
| ๐ Local-only data | Knowledge base & memory stay on your server, never leave the network |
| ๐ LAN password-free | Optional (opt-in): LAN requests skip the token โ **OFF by default** (`DDW_LAN_BYPASS=1`; trusted LANs only) |
| ๐ External access | Optional token gate (short-code supported); unauthorized โ 401 |
| ๐ก๏ธ DSH secure binding | DSH stays bound to localhost; the gateway exposes it โ official security design preserved |
| ๐งพ Audit-friendly | View-only office API, whitelisted phrases only; backup/restore with validated integrity checks |
---
## Roadmap
Only items actually planned or already delivered are listed.
**Delivered highlights** (full history in git log):
- Multi-device on LAN โ device registry, status panel, rate limiting, SQLite WAL concurrency (up to 20 devices, load-tested: P95 โค 126 ms, 0% errors)
- Workspace isolation ยท cross-device session resume ยท optional TLS ยท backup/restore API ยท version/upgrade check
- Docker one-command deployment (verified end-to-end) ยท Windows exe via CI
- Session โ document auto-ingest ยท hybrid vector search ยท memory relevance ranking
- Organization binding (optional `bindcode-v1` plugin) โ act as the enterprise backend for assistant apps; HMAC-signed short-lived bind codes; member tokens never touch the admin API
- Virtual office (view-only activity visualization)
**Planned:**
- [ ] Scheduled staff routines โ cron-driven roles (watch this space)
- [ ] One-line `curl โฆ | bash` installer
- [ ] Full English documentation pass (some docs/UI strings still reference the legacy `deepddw` codename)
- [ ] Managed cloud (overseas regions)
- [ ] Optional managed relay for model tokens โ zero-config keys for teams who want them; strictly opt-in, BYO-key stays the default
- [ ] Community Discord
---
## Commercial & Support
**Staffwright is free and fully featured forever.** Open source is the product โ there are no feature gates and no "Pro-only" paywalls in this repository.
Paid convenience tiers (managed cloud hosting, enterprise collaboration: SSO, audit logs, private-deployment support) are being prepared for international availability. In the meantime: questions, deployment help and enterprise inquiries โ [GitHub Discussions](https://github.com/ccch713/staffwright/discussions) or open an issue.
---
## Community
- ๐ฌ [Discussions](https://github.com/ccch713/staffwright/discussions) โ questions, show & tell, deployment help
- ๐ [Issues](https://github.com/ccch713/staffwright/issues) โ bug reports & feature requests
- ๐ค Contributing: see [CONTRIBUTING.md](CONTRIBUTING.md)
---
## License
| Component | License |
|-----------|---------|
| Staffwright (gateway, memory, knowledge base, docs portal, office) | MIT |
| DeepSeek Harness (DSH engine, source untouched) | MIT |
| SearXNG (optional aggregate search) | AGPL-3.0 (server-side HTTP, exemption assessed) |
See [`NOTICE`](NOTICE) for full third-party attribution.
This server cannot be deployed
Maintenance
ActivityActive
ResponsivenessNo issues