OpenClaw CRM
The CRM your AI agent already knows how to use.
Open-source. Self-hosted. Connect your OpenClaw Bot in 2 minutes.
Live Demo · Docs · API Reference
Most CRMs are closed-source, expensive, and impossible for AI agents to work with natively. OpenClaw CRM is different: it ships with a full REST API, machine-readable docs, and first-class OpenClaw Bot integration. Your AI agent can search contacts, create deals, update records, and manage tasks without any glue code.
Self-host it on your own server. No vendor lock-in, no per-seat pricing, no data leaving your infrastructure.
OpenClaw CRM plugs directly into your OpenClaw Bot. Generate a SKILL.md and config from Settings > OpenClaw, drop them into your bot's skills folder, and your agent can manage your CRM through natural language.
- 40+ REST API endpoints your bot can call
- Bearer token auth with
oc_sk_prefix API keys - Machine-readable docs at
/llms-api.txtand/openapi.json
- People & Companies: contacts and organizations with 17 attribute types (text, number, currency, date, select, status, rating, email, phone, domain, location, personal name, record references, and more)
- Deals & Pipeline: drag-and-drop Kanban boards with customizable stages
- Table View: sortable, filterable data tables with inline editing
- Record Detail: full record pages with related records, activity timeline, notes, and tasks
- Lists: custom filtered collections with list-specific attributes
- Notes: rich text editor with auto-save, linked to any record
- Tasks: deadlines, assignees, record linking, completion tracking
- Search: full-text search across all records with
Ctrl+Kcommand palette - CSV Import/Export: bulk import with column mapping and type coercion
- Filtering & Sorting: compound filters (AND/OR) with attribute-type-aware operators
- Custom Objects: create your own object types beyond People, Companies, and Deals
- Notifications: in-app notification system
- Dark & Light Mode: theme support throughout
- Responsive: mobile-friendly with collapsible sidebar
Talk to your CRM data in plain English. Powered by OpenRouter with support for Claude, GPT-4o, Llama, Gemini, and more.
- 8 read tools (auto-execute): search records, list objects, get record details, list tasks, get notes, browse lists
- 5 write tools (require confirmation): create/update/delete records, create tasks, create notes
- Streaming responses with token-by-token output
- Multi-round tool calling (up to 10 rounds per message)
- Dynamic system prompt built from your workspace schema
- Configurable model selection per workspace
| Layer | Technology |
|---|---|
| Framework | Next.js 15 (App Router) |
| Language | TypeScript |
| Database | PostgreSQL 16 |
| ORM | Drizzle ORM |
| Auth | Better Auth |
| UI | shadcn/ui + Tailwind CSS v4 |
| Tables | TanStack Table v8 |
| Kanban | dnd-kit |
| Rich Text | TipTap |
| AI | OpenRouter (multi-model) |
| Monorepo | Turborepo + pnpm |
- Node.js 20+
- pnpm 9+
- PostgreSQL 16+ (or use Docker)
git clone https://github.com/giorgosn/openclaw-crm.git
cd openclaw-crm
pnpm installcp .env.example apps/web/.envEdit apps/web/.env with your database credentials and a random BETTER_AUTH_SECRET.
Using Docker (recommended):
docker compose up db -dOr use an existing PostgreSQL instance and update DATABASE_URL in .env.
pnpm db:pushSeeds workspace, standard objects (People, Companies, Deals), and deal stages:
pnpm db:seedpnpm devOpen http://localhost:3001 and create an account.
docker compose upThis starts PostgreSQL and the Next.js dev server.
# Set required env vars
export BETTER_AUTH_SECRET=$(openssl rand -base64 32)
# Build and run
docker compose -f docker-compose.prod.yml up --build -dSee .env.example for all configurable environment variables.
- Get an API key from OpenRouter
- Go to Settings > AI in the app
- Enter your OpenRouter API key and select a model
- Navigate to /chat and start talking to your data
openclaw-crm/
├── apps/web/ # Next.js application
│ ├── src/
│ │ ├── app/ # App Router pages & API routes
│ │ │ ├── (auth)/ # Login, Register
│ │ │ ├── (dashboard)/ # All authenticated pages
│ │ │ ├── chat/ # AI chat interface
│ │ │ ├── docs/ # Documentation page
│ │ │ └── api/v1/ # REST API endpoints
│ │ ├── components/ # React components
│ │ ├── db/ # Drizzle schema, migrations, seed
│ │ ├── lib/ # Auth, utils, query builder
│ │ └── services/ # Business logic layer
│ ├── public/ # Static assets, API docs
│ │ ├── llms.txt # Product overview for LLMs
│ │ ├── llms-api.txt # Concise API reference
│ │ ├── llms-full.txt # Full product + API docs
│ │ └── openapi.json # OpenAPI specification
│ └── e2e/ # Playwright E2E tests
├── packages/shared/ # Shared types & constants
├── docker-compose.yml # Dev Docker config
├── docker-compose.prod.yml # Production Docker config
└── Dockerfile # Multi-stage production build
REST API at /api/v1/ with Bearer token authentication.
| Endpoint | Methods | Description |
|---|---|---|
/api/v1/objects |
GET, POST | List/create objects |
/api/v1/objects/:slug |
GET, PATCH, DELETE | Object CRUD |
/api/v1/objects/:slug/attributes |
GET, POST | Manage attributes |
/api/v1/objects/:slug/records |
GET, POST | List/create records |
/api/v1/objects/:slug/records/query |
POST | Filter/sort records |
/api/v1/objects/:slug/records/:id |
GET, PATCH, DELETE | Record CRUD |
/api/v1/objects/:slug/records/import |
POST | Bulk CSV import |
/api/v1/lists |
GET, POST | List/create lists |
/api/v1/lists/:id |
GET, PATCH, DELETE | List CRUD |
/api/v1/lists/:id/entries |
GET, POST | List entries |
/api/v1/notes |
GET, POST | Notes |
/api/v1/tasks |
GET, POST | Tasks |
/api/v1/search |
GET | Full-text search |
/api/v1/workspace |
GET, PATCH | Workspace settings |
/api/v1/workspace-members |
GET, POST | Member management |
/api/v1/notifications |
GET | Notifications |
/api/v1/api-keys |
GET, POST | API key management |
/api/v1/chat/completions |
POST | AI chat (SSE stream) |
/api/v1/chat/conversations |
GET, POST | Chat conversations |
/api/v1/chat/tool-confirm |
POST | Approve/reject AI writes |
Full API documentation at /llms-api.txt and /openapi.json.
Uses a Typed EAV (Entity-Attribute-Value) pattern where record_values has typed columns (text_value, number_value, date_value, timestamp_value, boolean_value, json_value, referenced_record_id) enabling native SQL filtering and indexing on each type.
cd apps/web
# Run E2E tests
pnpm test:e2e
# Run E2E tests with UI
pnpm test:e2e:uiContributions are welcome. See CONTRIBUTING.md for setup instructions and guidelines.
MIT