Your personal AI orchestrator.

Turn Discord into a persistent AI workspace.

View on GitHub

What is DiscoClaw?

Not a chatbot. An orchestrator.

Discord
DiscoClaw icon
DiscoClaw
AI Runtimes

Unlike chat UIs that forget you after every session, DiscoClaw is a persistent layer between Discord and your AI runtimes. It carries live context, durable memory, and cold-storage recall across conversations, manages tasks, runs automations, and routes each job to the right model — all from your own dedicated private server. It works while you sleep.

Features

Memory

Rolling summaries, durable facts, per-channel context, and cold storage semantic recall over past conversations. Memory stays useful after the chat scroll is long gone.

Tasks

Track work in Discord forum threads with bidirectional sync. Create, update, and close tasks without leaving chat.

Automations

Scheduled automations and webhook-triggered actions defined in plain language. Morning briefings, repo checks, CI hooks — on a timer or on demand.

Pipelines

Chain AI reasoning, shell commands, and Discord actions into multi-step workflows. Each step's output feeds the next. Analyze → act → notify — all composable, all auditable.

Multi-Runtime

Claude, Codex, OpenAI, Gemini, OpenRouter. Route different roles to different runtimes, keep voice on a faster model, and spend the expensive tokens where they actually matter.

OpenRouter

One API key, 200+ models. A unified gateway to hundreds of open and proprietary models via a single OpenAI-compatible endpoint. Swap what you're running without changing your config.

Browser Tools

WebFetch to Chrome DevTools — a full automation ladder. Research, screenshot, scrape, interact.

Files, Not Infra

No databases. State is JSON and markdown you can actually read. Backups are cp ‑r. Debug with cat. Intentionally simple — because for a single-user tool, it's all you need.

Recipes

Portable, auditable integration specs in markdown. Build a workflow, export it as a recipe, share it. Another DiscoClaw instance picks it up and runs it — no code required.

Hardcoded Safety

Safety rules live at Layer 1 — below prompts, user instructions, and injected content. Prompt injection is an architectural concern, not a policy one: fetched web pages, emails, file contents, and tool results are treated as data, never commands. No injected instruction — however it arrives — can override the boundary.

Voice

Join Discord voice channels and participate in spoken conversations. Ask questions, run automations, get answers — without typing a word.

Spawn Agent

Dispatch parallel sub-agents to handle multiple tasks at once. One request fans out to as many agents as you need — each working independently, each posting its own results.

Your feature here.

DiscoClaw is a foundation. Describe what you need, and your AI builds it — with the tools already in the box. The only limit is what you ask for.

The DiscoClaw Way

Single user, by design.

DiscoClaw lives in your own private Discord server — a personal AI workspace that's entirely yours. Not limited to single user. Designed for it. No auth layers, no permission matrices, no tenant isolation. Just full trust between you and your machine.

Why Discord?

Channels give you natural context separation — code in one, finances in another, personal projects in a third. Threads for deep dives. Full history and search built in. Rich embeds, file sharing, mobile push notifications. And it runs everywhere: web, Mac, Windows, Linux, iOS, Android. Why build a worse version of something that already exists?

Files over databases.

JSON, markdown, flat files. You can read the state with cat. You can back it up with cp. No migrations, no schemas.

Foundation, not a framework.

No plugin marketplace. No integration catalog. DiscoClaw gives you the primitives — memory, pipelines, runtimes, tools — and you tell it what to build. Describe what you want in conversation and it builds it with you. Share what you've built as recipes — portable, auditable integration specs that other DiscoClaw instances can pick up and run.

Your machine, your data.

Runs on your hardware. Memory stays local. Conversations stay inside your own Discord server. No cloud services between you and your AI beyond the API calls themselves.

Get Started

Three commands. Two env vars. Zero infrastructure.

Know the risks. DiscoClaw is not containerized or sandboxed. It runs directly on your host machine and has the potential capability to read, modify, or delete critical files. Do not install this on a production or critical system. Use a dedicated machine or VM.
~/discoclaw
# Install globally
$ npm install -g discoclaw

# Interactive setup — creates .env, scaffolds your workspace
$ discoclaw init

# Register the system service (Linux / macOS)
$ discoclaw install-daemon
Discord Bot Setup Walkthrough

New to Discord bots? Follow these steps to create your private DiscoClaw workspace from scratch.

0

Create a Private Discord Server

Click the + button at the bottom of Discord's server list to create a new server. Use this dedicated server for DiscoClaw — don't start in a shared or public server.

This is your personal AI workspace. Keep it private — just you and the bot.
1

Create the Bot Application

Go to the Discord Developer Portal and create a new application. Give it a name (e.g. "DiscoClaw").

Developer Portal Applications New Application
2

Enable Message Content Intent

This is the #1 setup failure mode. Without this, the bot connects and appears online, but msg.content will be empty — the bot silently ignores every message.

Your Application Bot Privileged Gateway Intents Message Content Intent ✓
If you skip this, everything will look like it's working — but the bot won't respond to anything.
3

Copy the Bot Token

On the Bot page, click Reset Token (or copy it if you just created the app). Paste it into your .env file immediately.

Your Application Bot Reset Token → Copy
DISCORD_TOKEN=paste-your-token-here
4

Invite the Bot to Your Server

Use the Installation page in the Developer Portal to create a permanent, reusable invite link with permissions baked in.

Your Application Installation
Set Install Link to Discord Provided Link
Under Default Install Settings, add scope: bot
Permission: Administrator (private server)
Save → Copy the Install Link → Open in browser → Select your server
This link is permanent and reusable. For shared servers, use the Moderator permission profile instead. See the full docs for all permission profiles.
5

Get Your User & Channel IDs

Enable Developer Mode in Discord to copy IDs by right-clicking.

Discord Settings Advanced Developer Mode ✓

Then right-click your username → Copy User ID, and right-click a channel → Copy Channel ID.

DISCORD_ALLOW_USER_IDS=your-user-id
DISCORD_CHANNEL_IDS=your-channel-id
6

Validate

Run the smoke test to verify your token and connection, then DM the bot to confirm it responds.

pnpm discord:smoke-test
Smoke test prints "Discord bot ready"
DM the bot → it responds
Post in allowlisted channel → responds
Non-allowlisted channel → silence (correct!)

Latest npm release

v1.2.3

2026-04-01

Smarter memory management. Capsules now self-invalidate when idle too long or past their TTL, freeing context window space automatically.

  • Added idle detection — capsules that haven't been referenced within a configurable window are automatically expired.
  • Added TTL-based expiry — capsules can declare a max lifetime and are cleaned up after it elapses.
  • Both mechanisms run passively; no polling or cron jobs required.

Reconstructed from published npm versions and git history. Already running DiscoClaw? !update apply in Discord or npm update -g discoclaw locally.

Release archive

Backfilled release notes for the npm cuts so far. Newest first. Scroll the archive if you want the full trail.

v1.2.3 latest
2026-04-01

Smarter memory management. Capsules now self-invalidate when idle too long or past their TTL, freeing context window space automatically.

  • Added idle detection — capsules that haven't been referenced within a configurable window are automatically expired.
  • Added TTL-based expiry — capsules can declare a max lifetime and are cleaned up after it elapses.
  • Both mechanisms run passively; no polling or cron jobs required.
v1.2.2
2026-03-31

Action guard upgrade and docs polish. The output guard now catches past-tense false completion claims, and the README is condensed for the npm landing page.

  • Expanded action guard to detect past-tense claims like "I've posted the message" when no action block was emitted.
  • Classified downloadAttachment as a query action so auto-follow-up fires correctly after downloads.
  • Condensed README for a cleaner npm package page.
v1.2.1
2026-03-30

Self-management docs and Discord action hardening. The bot can now update itself via !update, and action routing is more resilient.

  • Added self-management section to README documenting the !update command for in-place upgrades.
  • Hardened Discord action routing for edge cases in action dispatch.
v1.2.0
2026-03-30

Smarter recall. Cold storage queries now use HyDE (Hypothetical Document Embedding) to generate a synthetic ideal answer before searching, dramatically improving retrieval for vague or conceptual queries.

  • Added HyDE to cold storage — the bot now imagines what a perfect answer would look like, then searches for real content matching that shape.
  • Enabled by default; opt out via DISCOCLAW_HYDE_ENABLED=false.
  • Especially effective for "when did we discuss..." and "what was the decision about..." style queries where keywords alone miss the mark.
v1.1.6
2026-03-28

Lighter context window. History images are no longer injected into the prompt, reducing token overhead without losing image awareness.

  • Stopped downloading and injecting inline images from message history into the AI prompt.
  • Images attached to the triggering message are still processed — only historical image re-injection is removed.
  • Significant token savings on threads with lots of image attachments.
v1.1.5
2026-03-28

Instruction extraction. Core behavioral rules are now in a standalone SYSTEM_DEFAULTS.md file, making them easier to audit, override, and share across workspace configurations.

  • Extracted tracked default instructions into templates/instructions/SYSTEM_DEFAULTS.md.
  • Workspace-specific AGENTS.md files can now override defaults cleanly without duplicating baseline rules.
v1.1.4
2026-03-27

Silent cron fix. Error messages from failed cron jobs are no longer posted to Discord when the cron has silent mode enabled.

  • Gated catch-block error posts on the silent flag — silent crons no longer spam channels on failure.
  • Errors are still logged and recorded in stats; only the Discord post is suppressed.
v1.1.3
2026-03-27

Focus discipline. The bot no longer volunteers help with unrelated topics it notices in conversation history or cross-channel activity.

  • Added explicit instruction preventing the model from proactively surfacing issues from other channels or older history.
  • Strengthened wording removes the "unrelated" escape hatch so the model can't rationalize old topics as relevant.
v1.1.2
2026-03-26

Cron embed hygiene. Stale pinned prompt and status messages are now unpinned before replacements are posted, preventing pin clutter in cron threads.

  • Cron sync now unpins old prompt messages before pinning refreshed replacements when projections drift.
  • Status message updates unpin the previous message when edits fail, avoiding duplicate pins.
  • Added a promptMessageId secondary index for O(1) prompt message lookups and proper cleanup on record removal.
v1.1.1
2026-03-25

Prompt efficiency patch. Reduces per-turn token overhead by ~1,765 tokens through instruction compression and runtime deduplication.

  • Compressed system instructions (SYSTEM_DEFAULTS.md, TOOLS.md, pa.md) — same behavior, fewer tokens.
  • Moved repetitive instruction content into runtime builders so templates stay lean.
  • Added test coverage for instruction assembly and deduplication logic.
v1.1.0
2026-03-25

Smarter context, better reliability. Messages now carry temporal awareness, cron scheduling is decoupled from Discord thread state, and the dashboard gets a settings panel.

  • Added temporal awareness to message history — the bot now knows when messages were sent, enabling time-relative reasoning.
  • New dashboard settings panel surfaces key config options without touching .env files.
  • Hardened cron boot loading against stats store loss and AI parse failures.
  • Decoupled cron scheduling from Discord thread archive state — archived threads no longer block scheduled jobs.
  • Plan/forge system is now disabled by default with sub-flags derived from the parent enable flag.
v1.0.0
2026-03-24

The 1.0 milestone. Six runtimes validated end-to-end, Discord canvas activities, a redesigned operator dashboard, and a fully automated release pipeline.

  • Validated all six runtime paths (Claude CLI, Claude API, Codex CLI, OpenAI, OpenRouter, Gemini) with auth smoke tests and a 1.0 support matrix.
  • Redesigned the operator dashboard with live runtime state overlay and per-instance boot disambiguation.
  • Unified all six runtime paths with auth smoke tests, safe defaults, and a provider/auth support matrix.
  • Added first-class shell-input cron mode and hardened prompt sectioning for session stability.
  • Automated the full release pipeline: rehearsal checkpoints, push/PR verification in forge, and zero npm audit vulnerabilities.
v0.9.0
2026-03-18

Self-improvement harness, PDF ingestion, and model defaults modernized.

  • Built the self-improvement harness: AI-guided mutator, parallel test execution, targeted mutations, per-file baselines, and forbiddenActions scoring.
  • Added PDF text extraction for all runtimes (auto-download for Claude, cross-runtime extraction).
  • Switched AI mutator to OpenAI-compatible API via OpenRouter.
  • Updated default models to claude-opus-4-6 / claude-sonnet-4-6 and added archive action.
  • Shipped 45+ action-compliance fixtures with CLI --tag filtering.
v0.8.3
2026-03-16

Security hardening and safety rails: webhook sanitization, config action auth, git commit safeguards, and smarter follow-up prompts.

  • Fixed a webhook prototype-pollution DoS vector and added requester authorization to config actions.
  • Shipped a three-layer defense against catastrophic git commits (diff-size gate, path blocklist, confirmation prompt).
  • Hardened follow-up prompts against context overflow and truncation in long conversations.
  • Added Gemini model validation and updated imagegen defaults.
v0.8.2
2026-03-16

Image generation gets source-image support and a progress indicator.

  • Added source image support for generateImage — edit, remix, or riff on an existing image.
  • External URL source images are now accepted alongside local file paths.
  • Added a progress indicator so users see generation status in real time.
v0.8.1
2026-03-15

Vision lands: the bot can now see images in chat history, not just the triggering message.

  • Added vision support for images in chat history — thread and channel context images are now visible to the AI.
  • Image attachment metadata (filename, content type, dimensions) surfaced in readMessages and fetchMessage.
  • Imagegen model is now runtime-switchable via `!models set`.
v0.8.0
2026-03-15

Forge reliability overhaul, Codex hardening across the board, and a new operator dashboard preset switcher.

  • Added runtime preset switcher to the operator dashboard and forced action inventory checks before capability refusals.
  • Hardened native Codex forge: salvage retries, plan tail preservation, stall detection, websocket reconnect, and mid-turn steering.
  • Made local cron persistence the canonical source of truth and shipped a cron patterns cookbook.
v0.7.0
2026-03-10

Operator ergonomics jump forward: built-in dashboard, MCP visibility, and much sturdier long-running workflows.

  • Added a built-in operator dashboard with health/status surfaces, config doctor, and safer local/network access handling.
  • Shipped MCP operator tooling: `!mcp`, dashboard MCP status, and stronger startup/environment validation.
  • Hardened plan runs and automations with verification evidence, resumable HITL waits, reaction-history context, execution traces, and cron state cleanup.
v0.6.0
2026-03-07

Cold storage memory lands, model routing gets a tiered overhaul, and prompt/streaming behavior gets tighter.

  • Added cold storage: semantic recall over past conversations using SQLite, vector search, and keyword search.
  • Reworked model config into tier-based presets with cleaner per-role overrides.
  • Polished prompt ordering, token budgeting, and streaming previews.
v0.5.8
2026-03-02

Memory injection got smarter, Discord reads got richer, and a few operational rough edges got sanded down.

  • Made durable memory injection query-aware instead of blindly static.
  • Taught `fetchMessage`, `readMessages`, and `listPins` to surface embed content too.
  • Expanded cron cookbook patterns and bumped `@discordjs/opus` for a security fix.
v0.5.7
2026-03-01

Maintenance cut to roll forward the voice/runtime work from the surrounding releases.

  • No major user-facing delta on its own.
  • Served as a packaging waypoint while the voice and defer changes stabilized.
v0.5.6
2026-03-01

Voice got substantially more capable, with runtime routing and better conversation state.

  • Added per-role voice runtime support, including Gemini REST adapter support.
  • Introduced voice conversation buffering and smarter runtime auto-switch behavior.
  • Documented context-isolation edges for defer, spawn, and reaction prompts.
v0.5.5
2026-03-01

Deferred workflows can now nest instead of stopping after one hop.

  • Added nested `defer` support with a configurable depth limit.
  • Exposed the depth control in config/docs so it can be tuned instead of hardcoded.
v0.5.4
2026-03-01

Install fix release for newer Fedora / GCC toolchains.

  • Patched `@discordjs/opus` install behavior for Fedora 43+ / GCC 15 compatibility.
v0.5.3
2026-03-01

Automations learned how to keep state and hand work to each other.

  • Added cron job chaining.
  • Added persistent state for cron jobs across runs.
v0.5.2
2026-03-01

Durable memory stopped being static and started adapting over time.

  • Added reinforcement and decay signals to durable memory.
  • Made long-term facts age more like real memory instead of a flat key-value store.
v0.5.1
2026-02-28

Prompt context, voice, and task/thread synchronization all got sharper.

  • Injected a live open-task summary into prompts and pinned prompt messages in cron threads.
  • Added the deep model tier and cleaned up voice ID/code readouts before TTS.
  • Fixed archived-thread orphaning, task-close idempotency, and streaming code-fence leaks.
v0.5.0
2026-02-28

Parallel sub-agents became a first-class feature.

  • Added the `spawnAgent` Discord action for parallel sub-agent invocations.
  • Enabled subagent spawning by default.
  • Exposed Deepgram TTS speed in config and cleaned up `!update` apply noise.
v0.4.0
2026-02-28

A broad systems release: secrets, memory upgrades, transcript ingestion, and stronger safety around external content.

  • Added `!secret` for DM-only `.env` management.
  • Added durable memory supersession/consolidation plus YouTube transcript injection.
  • Sanitized external content before prompt injection and expanded the docs substantially.
v0.3.0
2026-02-26

OpenAI-compatible runtimes graduated from basic text to real tool use.

  • Added OpenAI-compatible tool schemas, execution handlers, and runtime support.
  • Enabled runtime hot-swaps via `!models set`.
  • Shipped MCP and webhook docs alongside the adapter work.
v0.2.4
2026-02-25

The npm-managed install path got more production-ready.

  • Improved `install-daemon` service naming and PATH handling.
  • Reset multi-turn sessions automatically on context overflow instead of getting wedged.
  • Cleaned up tag-triggered publish behavior.
v0.2.1
2026-02-25

Follow-up fix for npm-managed installs.

  • Replaced the brittle global npm path check with `.git`-based npm-managed detection.
v0.1.8
2026-02-25

The updater era started here.

  • Added npm-managed instance detection and the `!update` command.
  • Capped rolling summaries harder and handled cron interruptions more gracefully.
  • Bundled model-tier overrides, batching, and imagegen improvements.
v0.1.5
2026-02-24

Bootstrap and first-run setup got much less painful.

  • Made `discoclaw init` auto-bootstrap the key forum channels on first connect.
  • Added image generation actions and stronger forge failure reporting.
  • Started wiring the `--service-name` install flow.
v0.1.0
2026-02-23

First public npm release.

  • Initial publish of DiscoClaw to npm.

Full setup guide in the README.

From source (contributors)

Contributing or want to run from source? Clone and set up manually.

~/discoclaw
# Clone and install
$ git clone https://github.com/DiscoClaw/discoclaw.git
$ cd discoclaw && pnpm install

# Interactive setup
$ pnpm setup

# Or set env vars manually
$ cp .env.example .env
DISCORD_TOKEN=your-bot-token
DISCORD_ALLOW_USER_IDS=your-discord-id

# Launch in dev mode
$ pnpm dev