Slack CRM Agent
An ad-hoc CRM agent that lives on Slack, maintains a SQLite database in a persistent Space via bash, and lets team members manage contacts, deals, tasks, and notes through natural conversation - no separate CRM app required.
The Slack CRM Agent blueprint demonstrates one of the most practical applications of the platform: a conversational CRM that lives entirely inside Slack. Instead of forcing teams to switch between a dedicated CRM application and their daily communication tool, this agent brings the CRM to where the work already happens.
The Problem
Most small-to-medium teams either use an overweight CRM they barely touch, or they track customer relationships in spreadsheets, sticky notes, and memory. The friction of switching to a separate tool means data never gets entered, and the CRM becomes stale within weeks. What teams actually need is something they can talk to where they already work - Slack.
How It Works
The agent combines three powerful capabilities:
-
Slack integration - The agent lives on Slack and can be messaged directly or mentioned in channels. Team members interact with it using natural language: "add a contact John Smith from Acme Corp", "update the deal with Acme to negotiation stage", "show me all deals closing this month".
-
SQLite via bash - The agent has a shell ability bound to a persistent Space. It uses SQLite3 to maintain a proper relational database with tables for contacts, companies, deals, activities, and tasks. This gives it real query power - filtering, sorting, joins, aggregations - far beyond what file-based storage can offer.
-
Self-bootstrapping - On first run (or if the database is missing), the agent reads the bootstrap file which contains the complete database schema and setup instructions. It then creates and initialises the SQLite database automatically - no manual setup required.
The Bootstrap File
The bootstrap file is a standalone file resource (outside the Space) that the agent reads at the start of every session. It contains:
- The full SQLite schema (contacts, companies, deals, activities, tasks)
- Instructions for checking whether the database exists
- The exact SQL commands to create all tables and indices
- Usage guidelines for how to query and update the CRM
- Data conventions (date formats, status values, stage names)
Because the bootstrap file is a file resource rather than part of the Space, it acts as immutable configuration - the agent reads it but never modifies it. The Space is where all mutable data lives (the SQLite database file itself).
Why SQLite in a Space?
Spaces provide a persistent file system. SQLite stores its entire database in a single file. Together, they give the agent a fully relational database that survives across sessions. The agent can run arbitrary SQL queries, create views, add indices, and even evolve the schema over time as needs change. This is far more powerful than key-value or document storage for CRM data where relationships matter (a contact belongs to a company, a deal has multiple contacts, an activity is linked to both a deal and a contact).
What You Can Do
Through natural conversation on Slack, team members can:
- Add and update contacts and companies
- Create and move deals through pipeline stages
- Log activities (calls, emails, meetings) against contacts and deals
- Create and assign follow-up tasks with due dates
- Query the pipeline ("show me all open deals over $10K")
- Get summaries ("what happened with Acme Corp this week?")
- Track performance ("how many deals did we close this month?")
Getting Started
- Deploy the blueprint and configure the Slack integration with your workspace bot token and signing secret.
- Message the agent on Slack. On first interaction, it will read the bootstrap file and create the CRM database automatically.
- Start managing your contacts, deals, and pipeline through conversation.
- The database persists in the Space - browse it to see the SQLite file and any exports the agent creates.
Backstory
Common information about the bot's experience, skills and personality. For more information, see the Backstory documentation.
Skillset
This example uses a dedicated Skillset. Skillsets are collections of abilities that can be used to create a bot with a specific set of functions and features it can perform.
Start Slack Conversation
Start a new Slack conversation with a specific user by sending them a direct message. Use this to proactively reach out to team members about deals, tasks, or follow-ups.Bash
Execute shell commands in the CRM workspace. Use this to run sqlite3 commands against the CRM database, check file existence, and perform any command-line operations.Read/Write Workspace File
Read or write files in the CRM workspace. Use for reading and writing reports, exports, or other non-database files.List Workspace Files
List files and directories in the CRM workspace.Read Bootstrap File
Read the CRM Bootstrap file to get the database schema and setup instructions. Use this at the start of every session.
Terraform Code
This blueprint can be deployed using Terraform, enabling infrastructure-as-code management of your ChatBotKit resources. Use the code below to recreate this example in your own environment.
A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.