DenchClaw

An AI-native CRM you self-host on your own machine, built on the OpenClaw agent framework, with a DuckDB backend and pre-built agent skills for managing contacts, deals, reports, and 500+ outreach integrations from natural-language chat.

1.6Kstars
118forks
MIT License
TypeScript

DenchClaw is a local-first CRM and outreach automation platform that runs as an AI agent on your own machine rather than in a hosted multi-tenant cloud. Installed with a single npx denchclaw bootstrap command, it spins up a dedicated OpenClaw agent gateway under a dench profile and a Next.js web workspace on localhost:3100, giving you a chat-driven interface for managing contacts, companies, deals, and outreach, with every action stored in a local DuckDB database instead of a hosted SaaS table.

Rather than hard-coding a fixed CRM data model, DenchClaw teaches its underlying agent how to build and operate one. The crm skill and its six child skills (DuckDB operations, object builder, views & filters, documents, reports, actions) act as an operating manual the AI reads before touching data: they define naming conventions, a mandatory “triple alignment” between the database, filesystem, and object metadata, auto-linking rules for relation fields (for example, linking a new lead to an existing company), and a JSON-based reporting format so chat answers can render interactive charts. A companion app-builder skill lets the same agent generate self-contained mini web apps that run sandboxed inside the workspace with access to the CRM’s own data.

Outreach and enrichment are handled through a small set of OpenClaw plugin extensions bundled in the repo: apollo-enrichment calls Apollo’s people/company/people-search APIs through a managed Dench Cloud gateway, exa-search adds web search, and dench-identity bridges to Composio’s app catalog, exposing 500+ third-party integrations (Gmail, Slack, GitHub, Notion, Google Calendar, Linear, Stripe, and more) as two generic “search” and “execute” tools the agent can call. A dench-ai-gateway extension routes model calls and AI credits through Dench’s hosted model catalog when a Dench Cloud API key is configured.

The project is built by Dench.com (Y Combinator S2024) and is MIT licensed end to end. The open-source repo itself has no gated enterprise tier; the “Dench Cloud” services referenced in the code (enrichment, hosted models) are optional external add-ons that require their own API key.

What You Get

  • A chat-first CRM workspace - a Next.js app on localhost:3100 with table, kanban, calendar, and timeline views over a local DuckDB database.
  • One-command self-hosted setup - npx denchclaw bootstrap installs a dedicated OpenClaw gateway profile and web runtime entirely on your own machine.
  • Agent skills for structured CRM operations - the crm skill family covers DuckDB schema conventions, relation-field auto-linking, views/filters, synced markdown documents, JSON-based reports, and executable action buttons.
  • 500+ bundled outreach integrations - the dench-identity extension exposes Gmail, Slack, GitHub, Notion, Calendar, Linear, Stripe, and more through Composio via two generic search/execute tools.
  • Built-in enrichment and search tools - the apollo-enrichment plugin does people/company lookups and exa-search adds web search, both callable directly from chat.
  • An in-workspace app builder - the app-builder skill lets the agent generate sandboxed mini web apps that run inside DenchClaw with access to the CRM’s own DuckDB data and platform API.

Common Use Cases

  • Founder-run outbound sales - a solo founder tracks leads, companies, and deals locally and lets the agent handle enrichment and outreach drafting without paying for a hosted CRM seat.
  • Data-sensitive sales teams - teams that can’t put customer data in a third-party cloud self-host DenchClaw so contact and deal records never leave company-controlled infrastructure.
  • Ad-hoc pipeline reporting - asking the chat “what’s my pipeline by stage” returns an inline funnel or bar chart generated straight from DuckDB instead of building a BI dashboard.
  • Cross-tool outreach without integration code - an operator wires Gmail, Slack, Linear, and Stripe into the CRM workflow through the bundled Composio bridge without writing bespoke API clients for each service.
  • Internal tooling on top of CRM data - a team uses the app-builder skill to spin up a small internal app that reads directly from the same DuckDB workspace as the CRM.

Under The Hood

Architecture The entry point denchclaw.mjs loads the compiled dist/entry.js (from src/entry.ts), which installs a warning filter and, unless already flagged, respawns itself with experimental-warning suppression before handing off to the CLI command layer in src/cli/. The largest module, bootstrap-external.ts (roughly 3,900 lines), orchestrates onboarding end to end: verifying or installing the OpenClaw CLI, creating a dedicated dench gateway profile and port, running device-pairing checks, seeding the workspace from bundled assets, launching the managed web runtime, and reporting bootstrap diagnostics. src/cli/web-runtime.ts manages the Next.js app in apps/web as a child process on a fixed port (3100), while the actual OpenClaw agent gateway is treated as an external, separately versioned peer dependency (openclaw >= 2026.1.0) rather than code this repo owns. Extensions under extensions/* are OpenClaw plugins with a register(api) entry point and an openclaw.plugin.json manifest, each independently gated on its own API-key check; skills under skills/* are declarative Markdown specs injected into the agent’s context, so a large share of the CRM’s actual behavior (schema conventions, relation-linking rules, report format) lives in prompts rather than TypeScript. This is a layered orchestrator: CLI process manager owns lifecycle, a child Next.js server owns the UI, an external gateway owns the agent loop, plugins extend gateway tools, and skill Markdown extends gateway prompts — if the OpenClaw plugin/skill-injection contract changed, every extension and skill file would need rewriting, since none define their own execution runtime.

Tech Stack The CLI core (src/) targets Node.js 22+ and strict TypeScript 5.9, compiled with tsdown/esbuild, using @clack/prompts for interactive CLI UI, commander for argument parsing, axios for HTTP, chalk/gradient-string for terminal styling, tslog for logging, and posthog-node for telemetry. The web app (apps/web) runs Next.js 15 with React 19, the Vercel AI SDK for the chat interface, Tiptap for rich-text document editing, @tanstack/react-table and @dnd-kit for the CRM’s table and kanban views, @xterm/xterm for an embedded terminal, and Radix UI/base-ui primitives for components. Structured data lives in DuckDB, installed via the official install script and queried with raw SQL rather than an ORM. The project is a pnpm workspace (root plus apps/web), builds through tsdown and next build, and ships to npm as a single denchclaw package bundling the pre-built Next.js standalone output alongside dist/, extensions/, and skills/.

Code Quality The repository carries an extensive set of Vitest test files across the CLI, plugin extensions, and web app, including dedicated tests for CLI argument parsing, the bootstrap and web-runtime flows, and individual React components and hooks. Linting runs through oxlint --type-aware with explicit any usage treated as an error and correctness/performance/suspicious rule categories elevated to errors, paired with oxfmt for formatting via a combined pnpm check script. TypeScript strict mode is enabled project-wide, and sampled plugin code consistently wraps external HTTP calls in try/catch and returns structured error payloads back to the agent rather than throwing or silently swallowing failures. The only GitHub Actions workflow present is a release pipeline that runs full validation checks on pushes to main, but no separate pull-request-time CI workflow is visible in the repository, and some core modules (notably the bootstrap flow) are large single files that mix many concerns.

What Makes It Unique DenchClaw’s clearest departure from a conventional CRM is treating the CRM’s own behavior as agent-readable documentation instead of hard-coded application logic: its skill files encode schema rules, a mandatory alignment invariant between the database, filesystem, and metadata, proactive relation-field linking rules, and a chart-report contract, with the AI agent expected to read and follow them at request time. Paired with an app-builder skill, this makes the CRM’s object model and even its mini-app surface partially self-extending without a code deploy. The surrounding enrichment and integration layer (Apollo, Composio, Exa) follows patterns already common among SaaS integration tooling, so the distinctive part of the project is the skills-as-product-logic approach rather than the outreach plumbing around it, and its effectiveness depends entirely on the underlying agent correctly following those instructions.

Self-Hosting

Licensing Model MIT licensed — the CRM core, agent skills, and web workspace are open source with no license key required to self-host or run the product.

Self-Hosting Restrictions

  • None found in the source for the core CRM, chat workspace, or agent skills — everything ships in the MIT-licensed repo.
  • Two bundled plugins (apollo-enrichment and dench-ai-gateway) check for a DENCH_CLOUD_API_KEY/DENCH_API_KEY environment variable and silently skip registering their tools if it is missing — these specific integrations require an external “Dench Cloud” account, not a license for the codebase itself.

Enterprise Features No enterprise/pro tier or gated code paths (ee/, pro/, feature-flag checks) were found in the repository.

Cloud vs Self-Hosted Not applicable in the traditional sense — DenchClaw always runs self-hosted; the CLI installs and manages its own local OpenClaw gateway and web server. “Dench Cloud” is an optional hosted add-on for AI model routing and Apollo-based contact enrichment, reached through the same self-hosted install.

License Key Required No, for running DenchClaw itself. Yes, an API key is required only to activate the optional Dench Cloud-backed enrichment and model-gateway plugins.

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack

No spam. Unsubscribe anytime.

Join 750+ subscribers
No spam. Unsubscribe anytime.

Search