> ๐Ÿšš **Project update ยท ้กน็›ฎ่ฟ›ๅฑ•** โ€” The standalone small-team product now lives at **[Staffwright](https://github.com/ccch713/staffwright)**: same engine, complete product packaging, international-first. This repository continues as the deepDDW **DSH-plugin line** (memory & knowledge base for DeepSeek Harness). > > ็‹ฌ็ซ‹็š„ๅฐๅ›ข้˜Ÿไบงๅ“็บฟๅทฒ่ฟ็งป่‡ณ **[Staffwright](https://github.com/ccch713/staffwright)**๏ผˆๅŒไธ€ๅผ•ๆ“Žใ€ๅฎŒๆ•ดไบงๅ“ๅŒ–ใ€้ขๅ‘ๅ›ฝ้™…ๅธ‚ๅœบ๏ผ‰ใ€‚ๆœฌไป“ๅบ“็ปง็ปญไฝœไธบ deepDDW ็š„ **DSH ๆ’ไปถ็บฟ**๏ผˆDeepSeek Harness ็š„่ฎฐๅฟ†ไธŽ็Ÿฅ่ฏ†ๅบ“๏ผ‰็ปดๆŠคใ€‚ # deepDDW โ€” Memory & Knowledge Base for DeepSeek Harness, Reachable from Any Device on Your LAN [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Listed in awesome-deepseek-harness](https://img.shields.io/badge/awesome--deepseek--harness-Listed-blue)](https://github.com/0xsline/awesome-deepseek-harness#memory--knowledge) [![CI](https://github.com/ccch713/deepddw/actions/workflows/ci.yml/badge.svg)](https://github.com/ccch713/deepddw/actions/workflows/ci.yml) > **English** ยท [็ฎ€ไฝ“ไธญๆ–‡](README.zh-CN.md) **deepDDW gives DeepSeek Harness (DSH) the three pieces it's missing โ€” memory, a knowledge base, and document search โ€” and makes all of it reachable from *any* device on your LAN. No app install. No DSH source changes.** - ๐Ÿง  **Memory** โ€” cross-session long-term memory, write/search via DSH's official MCP interface - ๐Ÿ“š **Knowledge base** โ€” ingest & search your docs (industry docs, SOPs, research notes) anytime - ๐ŸŒ **LAN-wide multi-device** โ€” deploy once; phones, laptops and tablets on the same network all use the same DSH workbench **Try it in 60 seconds:** ```bash npm i -g @deepseek-ai/dsh # 1. install official DSH on the server git clone https://github.com/ccch713/deepddw.git && cd deepddw ./install.sh --with-dsh # 2. install deepDDW ./install.sh --port 8600 # 3. start # 4. from any device on your LAN: open http://:8600/ (phone: scan the QR to auto-pair) ``` > ๐Ÿ“ธ *Screenshot: phone / tablet accessing the workbench (coming soon).* **Status**: v0.8.0 ยท MIT ยท CI (pytest + ruff) โœ… ยท DSH for Teams โ€” multi-user, LAN multi-device, memory & KB with team distillation ยท migration import/export, scope promote, incognito, retrieval health ยท org binding server (bindcode-v1, optional) ยท **virtual office (view-only activity visualization)** ยท [Listed in awesome-deepseek-harness](https://github.com/0xsline/awesome-deepseek-harness#memory--knowledge) ยท Roadmap below > ## โš ๏ธ IMPORTANT โ€” Read Before Installing > > deepDDW implements **its own memory and knowledge-base isolation**. To avoid conflicts or memory confusion, **before installing**: > > 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 you have installed; > 3. Only then install deepDDW and let it own the memory & knowledge-base stack. > > Running deepDDW alongside other memory/KB plugins may cause **data conflicts or memory mixing** between namespaces. You have been warned. โš ๏ธ --- ## Why deepDDW? Most DSH extensions give you memory *alone*. deepDDW is a **complete workstation** โ€” memory + knowledge base + document search + **LAN-wide multi-device access**: | Official DSH limitation | deepDDW solution | |------------------------|------------------| | ๐Ÿ”’ **Local-only access** | โœ… **LAN-wide access**: deploy once on a server; desktops, laptops, phones and tablets on the same network all connect | | ๐Ÿง  **No memory** | โœ… Long-term memory write/search โ€” conversation experience is accumulated | | ๐Ÿ“š **No knowledge base** | โœ… Knowledge base search/ingest โ€” industry docs, SOPs, research notes, callable anytime | **In one sentence**: turn a "personal toy" into a tool a small team can actually use โ€” **fully packaged, easy to deploy, low maintenance, ready for small businesses** (up to ~20 people) for their daily AI workflow. deepDDW distills lessons from real-world enterprise deployments into the DSH ecosystem as open source (MIT). ## Which Scenario Fits You? deepDDW is built for **individuals, families, departments and small businesses โ€” roughly up to 20 people and 20 devices on one LAN**. Find your scenario: | Scenario | Typical setup | What you get | |---|---|---| | ๐Ÿง‘โ€๐Ÿ’ป **Individual ยท multi-device** | One person; laptop + phone + tablet | Deploy once on any always-on machine you own (NAS / mini host / old PC): every device of yours shares the same memory & knowledge base, and the data never leaves your hardware. Don't want to run anything? **Pro Cloud** hosts it for you with managed multi-device sync and daily backups. | | ๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘ง **Family ยท multi-person, multi-device** | A household; one server, several members | "Deploy once, the whole family can use it." Each member gets an independent account with a private memory namespace; **family distillation** merges everyone's recent highlights into a shared family space (rule-based dedup โ€” works even without an LLM key). | | ๐Ÿข **Department-level** | One department (โ‰ค20 people) inside a larger organization | Run deepDDW as your department workbench. Optionally enable the **bindcode-v1 org backend**: staff apps bind with a scan code, the server becomes the org backend for the assistant โ€” while each member keeps personal mode (their own models, on-device memory) and can switch back at any time, unbinding deletes nothing. | | ๐Ÿช **Small business** | A company of up to ~20 people running daily AI workflows | **Team mode**: multi-user accounts, team distillation (LLM-refined, deduplicated shared team memory), scope promote, incognito sessions, retrieval health โ€” all in the open-source build. Need SSO, audit logs or private-deployment support on top? That's the Enterprise tier (see [Commercial & Support](#commercial--support)). | **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, deepDDW fits you. --- ## How It Works (Technical Path) ``` ๐Ÿ“ฑ Phone / ๐Ÿ’ป Desktop / ๐Ÿ“ฑ Tablet / ๐Ÿ–ฅ๏ธ Laptop โ€” any device on the LAN โ”‚ (browser access, no App install) โ–ผ deepDDW Gateway (one server on the LAN) โ”œโ”€ /dsh/* proxy โ†’ DSH engine (official UI, model config & chat untouched) โ”œโ”€ /api/* proxy โ†’ DSH RPC/API โ””โ”€ /api/v1/* deepDDW capabilities: Knowledge Base / Memory / Docs / LLM config โ”‚ โ”‚ DSH official MCP client (streamable-http) โ–ผ deepDDW 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**: DSH natively supports MCP clients; deepDDW exposes a standard `streamable-http` endpoint โ€” **zero intrusion, zero changes to DSH source**. The UI, settings and model configuration all remain official. --- ## Virtual Office (0.8.0) Open `/ui/office.html` and watch your deepDDW 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 min without events โ†’ back to idle), failures raise a banner, and 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. ## Why Does It Work on Your LAN? The official DSH listens on `localhost` only (for security), so phones/tablets cannot connect. deepDDW solves this with **gateway proxying**: - **DSH stays bound to localhost** (official security design preserved) - **deepDDW gateway listens on the LAN**, any device opens `http://:8600/` to reach the original DSH workbench - All data stays on **your** server โ€” never leaves the LAN **Deploy once, the whole family/team can use it** โ€” a capability the official DSH does not provide. --- ## Quick Start ```bash # 1. Install DSH (official) on the server npm i -g @deepseek-ai/dsh # 2. Install deepDDW (packaged, one command) git clone https://github.com/ccch713/deepddw.git cd deepddw && ./install.sh --with-dsh # 3. Start ./install.sh --port 8600 # 4. Open from any device on the LAN: # http://:8600/ โ†’ original DSH workbench # Phones/tablets: "Add to Home Screen" for an App-like experience # 5. Add your API Key in DSH Settings โ†’ Models # 6. In chat, ask the model to "search the knowledge base" or "remember ..." # โ†’ it auto-invokes the mcp__deepddw__* 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). ### Windows (standalone exe) A Windows build is produced automatically by the `windows-build` workflow โ€” download `deepddw-windows.zip` from the latest **Actions โ†’ Artifacts**: ```bash # 1. Unzip anywhere (no Python/Node needed on the target machine) deepddw-windows/deepddw.exe # 2. Optional: point data/config at a custom location set DDW_DATA_DIR=%USERPROFILE%\.deepddw set DDW_ACCESS_TOKEN= # 3. Start (listens on 0.0.0.0:8500) โ†’ open http://:8500/health deepddw.exe ``` Upgrades are cheap: replace the whole folder with a newer zip โ€” your data (under `%USERPROFILE%\.deepddw`) is untouched. See [`docs/windows-packaging.md`](docs/windows-packaging.md) for the full evaluation (PyInstaller one-dir + CI auto-build) and the manual build steps. --- ## Multi-Device on LAN (0.2.0) deepDDW is built for **up to 20 devices on your LAN** sharing one gateway: - **Device identity** โ€” each browser persists a `device_id` (localStorage) and can set a friendly name on the launcher; reconnects keep the same identity. - **Online status** โ€” devices register/heartbeat to the gateway; `/api/v1/status` (Token-protected) shows who is online, active WebSockets, request counts, DB size and version. The launcher renders a live status card for admins. - **Rate limiting** โ€” sliding-window per Token + per IP (default 60 req/min/token, global cap โ†’ 503 overload protection); configurable via `config/deployment.yaml` โ†’ `security.rate_limit.*` or `DDW_RATE_LIMIT_*` env. - **SQLite concurrency** โ€” WAL + `busy_timeout=5000` + `synchronous=NORMAL` on every connection, plus a process-wide write lock for cross-table transactions (20 concurrent writers verified, no `database is locked`). ``` POST /api/v1/device/register # register / rename this device (idempotent) POST /api/v1/device/heartbeat # keep-alive GET /api/v1/status # status panel (token required) ``` **Also in 0.2.0:** - **Workspace isolation** โ€” devices pick a workspace (default `shared`); memory/logs and MCP memory tools are scoped per workspace, docs filtered by slug prefix. Legacy clients are unaffected. - **Session resume across devices** โ€” recent session summaries (up to 5) with a "continue" button: pick up a conversation on your phone where you left off on desktop. - **One-click backup / restore** โ€” backup via API (downloadable); restore validates the SQLite file (header + integrity check) and keeps a `.pre-restore` safety copy before replacing the main DB. - **Optional TLS** โ€” one-command self-signed cert (`scripts/gen_self_signed_cert.sh`, 1-year), enabled via `security.tls.*`; HTTP unchanged when off. For external access prefer a Caddy/Nginx reverse proxy (see `docs/tls.md`). - **Version / upgrade check** โ€” `/api/v1/version` reports `latest_version` / `update_available` (GitHub releases, 1h cache, offline-degraded); the launcher shows an upgrade banner. --- ## Security & Privacy | Capability | Description | |-----------|-------------| | ๐Ÿ” Local-only data | Knowledge base & memory stay on your server, never leave the LAN | | ๐Ÿ  LAN password-free | Optional (opt-in): LAN requests skip the token โ€” **OFF by default** (set `DDW_LAN_BYPASS=1` to enable; trusted LANs only) | | ๐ŸŒ External access | Optional Token gate (short-code supported); unauthorized โ†’ 401 | | ๐Ÿ›ก๏ธ DSH secure binding | DSH stays on localhost; gateway exposes it โ€” official security design preserved | --- ## Tech Stack & License | Component | Description | License | |-----------|-------------|---------| | DSH engine | Official DeepSeek Harness (source untouched) | MIT | | deepDDW gateway | FastAPI + SQLite + MCP dual-protocol | MIT | | Memory / Knowledge base | SQLite storage (agentmemory / vectors optional) | MIT | | Search | Optional SearXNG | AGPL-3.0 (server-side HTTP, exemption assessed) | **deepDDW itself: MIT License** โ€” free to use, modify, and commercially deploy; keep the copyright notice. See [`NOTICE`](NOTICE) for full third-party attribution. --- ## Ecosystem & Feedback - **Extend with official DSH plugins**: deepDDW keeps DSH's native plugin mechanism intact. Install official plugins straight from the npm registry via the DSH official command โ€” the only channel we recommend, to avoid supply-chain poisoning: ```bash dsh plugin --profile web add # official npm registry only ``` See [`SECURITY.md`](SECURITY.md) for our third-party plugin disclaimer and what deepDDW guarantees (memory & knowledge base only; no data theft/exploitation/sale). - **Knowledge distillation**: use whatever **distillation skill / workflow** you prefer โ€” the methodology is yours; deepDDW provides the complete pipeline "distilled output โ†’ searchable knowledge base โ†’ model-usable". More plugins and tools are on the way. - **Memory / knowledge migration**: knowledge base uses standard SQLite; memory is organized by namespace/key/value โ€” import from other agents or tools. - **Feedback**: we'd love to hear how you use it; stronger open-source tools are coming in future releases. --- ## Enterprise Backend for the DDW AI Assistant deepDDW ships an optional, **off-by-default** plugin that lets a single instance act as the organization backend for the DDW AI Assistant app family, via the open [bindcode-v1](docs/็ป„็ป‡่ฟžๆŽฅๅ่ฎฎ-bindcode-v1.md) protocol. The admin issues a short-lived bind code; staff paste or scan it in the app (**Settings โ†’ Advanced โ†’ Connect to enterprise server**); from then on those members can run their assistant on *your* infrastructure. Three things worth knowing before you enable it: - **The LLM provider is yours.** Bound members chat through this instance's `llm_gateway` โ€” whatever provider you configured (DeepSeek, Ollama, or any self-hosted OpenAI-compatible gateway). Nothing in the plugin points to any hosted service, and there is no preset channel. - **Binding is an identity relation, not lock-in.** Members can switch back to personal mode (their own models, their on-device memory) at any time; unbinding changes nothing on their device (protocol ยง4). The server never holds staff personal data, and unbind deletes nothing. - **Blast radius is small.** A member-level `access_token` only unlocks the plugin's chat endpoint โ€” never the admin API. Bind codes are HMAC-signed, short-lived, use-capped and revocable; the public endpoints are rate-limited (10 req/min per product token). Quick start: ```bash # 1) enable in config/deployment.yaml (org_relay.enabled: true + product_tokens), then: curl -X POST :8500/api/v1/plugins/ddw-org-relay/admin/orgs -H "Authorization: Bearer $DDW_ACCESS_TOKEN" -H 'Content-Type: application/json' -d '{"name":"Acme Clinic"}' curl -X POST :8500/api/v1/plugins/ddw-org-relay/admin/orgs//bindcode -H "Authorization: Bearer $DDW_ACCESS_TOKEN" -H 'Content-Type: application/json' -d '{"ttl_min":15,"max_uses":50}' # 2) staff app: Settings โ†’ Advanced โ†’ Connect to enterprise server โ†’ paste code ``` Full endpoint list, config reference and security notes: [plugins/ddw_org_relay/README_EN.md](plugins/ddw_org_relay/README_EN.md). --- ## Commercial & Support **deepDDW is free and fully featured forever.** The paid tiers exist for exactly two things: *convenience* (hosting, zero-ops) and *enterprise collaboration* (permissions, audit, compliance). Every core capability ships in the open-source build โ€” there are no feature gates and no "Pro-only" paywalls, period. | Tier | Price | Best for | What you get | | --- | --- | --- | --- | | **Open Source** | Free forever | Individual developers, self-hosters | MIT licensed, full features, no feature gates | | **Pro Cloud** | ยฅ19/mo or ยฅ199/yr | People who'd rather not run it | Cloud-hosted memory & knowledge base, zero ops, managed multi-device sync, daily backups | | **Founder License** (lifetime) | ยฅ499, one-time | Early supporters | Lifetime Pro. **Capped at the first 100 licenses โ€” once they're gone, they're gone** | | **Enterprise** | From ยฅ9,800/yr | Teams and companies | Multi-user & permissions, SSO, audit logs, private-deployment support (remote), commercial license letter, 24h priority response | - Enterprise on-site deployment & implementation: ยฅ3,000 per engagement. - VAT invoices available for corporate purchases. - Sales & support: [GitHub Issues](https://github.com/ccch713/deepddw/issues). ### Pro Cloud โ€” skip the ops Everything you'd get from self-hosting, running in the cloud: hosted memory and knowledge base, managed multi-device sync, automatic daily backups. ยฅ19/month, or ยฅ199/year (works out to about ยฅ16.6/mo). Built for people who want the full deepDDW experience without owning a server. ### Founder License โ€” lifetime, 100 seats only Pay ยฅ499 once, keep Pro for life. A permanent thank-you to early supporters โ€” **100 seats, first come first served, never restocked.** When the last seat sells, this tier is retired for good. No second wave. ### Enterprise โ€” built for teams User management and permissions, SSO, audit logs, remote private-deployment support, and a formal commercial license letter โ€” the document your procurement and legal teams actually need. 24-hour priority response included. On-site deployment and implementation available at ยฅ3,000 per engagement. ### Sponsor โ€” buy the author a coffee Don't need any of the paid tiers? Totally fine โ€” deepDDW stays free either way. Star the repo โ€” it means a lot. --- ## Roadmap Only items actually planned or already delivered are listed here. **Delivered:** - [x] **Multi-device on LAN (0.2.0)** โ€” device identity/online registry, status panel, rate limiting, SQLite WAL concurrency (up to 20 devices) - [x] **Workspace isolation (P1-1)** โ€” per-workspace memory/knowledge scoping at the gateway (default `shared`, backward compatible) - [x] **Session resume across devices (P1-3)** โ€” "recent sessions" summaries (up to 5) with a continue button - [x] **Optional TLS (P1-2)** โ€” one-command self-signed cert; external access via Caddy/Nginx reverse proxy (see `docs/tls.md`) - [x] **Backup / restore API (P2-1)** โ€” one-click backup, downloadable; validated restore with `.pre-restore` safety copy - [x] **Load-test report (P2-2)** โ€” 5/10/20 devices: 0% errors, P95 โ‰ค 126 ms, no `database is locked` (see `docs/load-report.md`) - [x] **Version / upgrade check (P2-3)** โ€” `/api/v1/version` probes the latest release (1h cache); launcher shows upgrade banner - [x] **Docker one-click deployment** โ€” `docker compose -f deepddw-compose.yml up -d --build` (verified on a real macOS arm64 host: core + SearXNG containers up, health/MCP/chat end-to-end green) - [x] **Session โ†’ document auto-ingest** โ€” conversations saved to the knowledge base via `ddw.docs.save` / `ddw.session.docs` MCP tools + REST API, searchable and traceable per session - [x] **Vector search enhancement** โ€” hybrid retrieval (SQLite FTS5/LIKE + LanceDB, RRF fusion; optional, degrades to keyword-only when LanceDB is absent) - [x] **Windows packaging** โ€” PyInstaller one-dir build via the `windows-build` CI workflow, distributed as an Actions artifact, verified in release v0.1.0 (see `docs/windows-packaging.md`) - [x] **Reflection & consolidation (LLM polish)** โ€” daily reflection follows a style guide (auto/professional/casual), enforces a progress/issues/tomorrow structure and avoids repeating the previous day; consolidation skips logging when the LLM judges the conversation valueless - [x] **Organization binding, bindcode-v1 server (optional plugin)** โ€” act as an enterprise backend for the DDW AI Assistant app family: HMAC-signed short-lived bind codes, public bind/unbind/me endpoints (product-token + rate limit), member-level tokens for an OpenAI-compatible chat endpoint backed by your own llm_gateway providers (see `plugins/ddw_org_relay/`) - [x] **Memory search quality** โ€” results ranked by relevance score (hit-count ร— layer weight: user > notes > reflection > logs, plus freshness) instead of insertion order; keyword-expansion cache expiry tested --- *deepDDW โ€” enterprise-grade capability, open-sourced for everyone.*