Your AI agents,
as infrastructure
as code
Declare bots, datasets, skills, secrets, and every channel they speak on in HCL. Version it in git, review it in pull requests, and ship an entire agent fleet with one terraform apply.
Infrastructure as Code
The whole agent, declared
Other platforms hand you a dashboard and hope you remember what you clicked. ChatBotKit turns every part of an agent into a declarative resource, so the brain and behavior live in the same workflow as the rest of your infrastructure.
The brain
A bot resource carries the backstory, model, and personality. Drive the backstory from a file() so prompts live in your repo, not a textarea.
The tools
Skillsets and abilities give agents actions — search, fetch, shell, MCP servers, and your own APIs — each one a reviewable resource.
The memory
Datasets and files become searchable knowledge. Link a dataset to a bot and search functions are wired up automatically.
The workspace
A space gives the agent a sandboxed filesystem and shell. Upload skills and scripts with fileset and for_each.
The credentials
Secrets hold shared service tokens or per-user OAuth. Template-based secrets wire up Google, Notion, and more without raw tokens in state.
The channels
Seventeen integrations — Slack, WhatsApp, Telegram, Teams, Email, Twilio, Widget, and more — connect the agent to the world, declaratively.
What others can't do
Beyond ClickOps
When the agent itself is a resource graph, patterns that are impossible to click together become a few lines of HCL. These are real reference architectures that ship with the provider.
A fleet of tenants from one token
Deploy a separate, isolated agent into every customer sub-account using one master token and the run_as attribute — the same model as the AWS provider assume_role. One apply ships to everyone, no per-customer tokens.
Agents that rewrite themselves
Declare the starting state, then give the agent read and write abilities over its own backstory file. It learns from every interaction and updates its own memory while Terraform owns the baseline.
Tools discovered at runtime
Provision an agent that searches an MCP registry and installs new tool servers on demand. The capability surface grows itself — something a static dashboard config simply cannot express.
Agents that build for other agents
Compose a Workflow Architect that writes scripts and a Task Runner that executes them, with asymmetric access to a shared space. Separation of concerns, all in one state.
An agent authored as a project
Keep instructions.md, skills/*/SKILL.md, and heartbeat.md in your repo. Terraform uploads the whole project into a workspace and wires up the tools, channels, and schedules around it.
Machine and human identity together
One ability can present a shared service token to clear an internal gateway and a personal OAuth secret to act as the signed-in employee — so your backend enforces the same access control it always does.
The Workflow
Write, plan, apply
A standard Terraform provider that drops into the workflow you already use. No new tooling, no bespoke pipeline.
Write
Declare your bot, its datasets, skillsets, secrets, and integrations in HCL. Reference one resource from another and let Terraform resolve the graph.
Plan
Run terraform plan to see exactly what will change before anything happens. Review it in a pull request like any other infrastructure change.
Apply
One terraform apply provisions the entire agent through the ChatBotKit API. Promote the same config across dev, staging, and production unchanged.
Evolve
Iterate in git, import existing resources, and let runtime-capable agents extend themselves while Terraform keeps the baseline reproducible.
The Catalog
Every primitive, 29 resources
From the bot itself down to a single ability or an OAuth secret, the whole platform is addressable as code — plus four data sources for reading what already exists.
core
The agent and its building blocks.
knowledge
Searchable memory and documents.
workspace
Sandboxed filesystem and state.
security
Credentials, access, and surfaces.
channels
17 integrations, all declarative.
data sources
Reference resources you already have.
Reference Architectures
Apply, then adapt
The provider repository ships with more than a dozen complete architectures. Clone one, set your API key, run apply, and reshape it into your own product.
Multi-tenant SaaS
Deploy an isolated agent into every customer sub-account from one shared module and one master token, with run_as targeting each tenant.
AI Employee
A digital team member with a sandboxed workspace, shell execution, Gmail and Notion via OAuth, and skillsets it loads on demand.
Second Brain
A personal knowledge system with a persistent workspace, Notion and Google Calendar integrations, and a Telegram bot for mobile access.
Workflow Orchestrator
Multi-step automation with three specialized skillsets, dynamic skillset loading, persistent state, and full execution tracing.
Dual-Agent Workflows
A Workflow Architect programs scripts while a Task Runner executes them, sharing a space with asymmetric read and write access.
MCP Factory
A factory-style agent wired to multiple independent MCP servers, each its own skillset, with clean service boundaries.
Your Entire Fleet, in One Repository
Stop clicking the same agent together in three environments. Declare it once, commit it, and let terraform apply reproduce it everywhere — identically, every time.
platform primitives you can declare and version
messaging and service integrations as code
for referencing resources you already built
reproducible across every environment you run
Architecture
How it fits
The provider is a thin, typed layer between your configuration and the ChatBotKit API. Everything resolves through one API, so the same workflow that manages your cloud manages your agents.
Clicking vs. Declaring
The cost of the dashboard
Building agents by hand feels fast until you need a second environment, an audit trail, or fifty tenants. Then the dashboard becomes the bottleneck.
- No record of what you changed, when, or why — the config lives only in the UI
- Rebuild the same agent by hand in dev, staging, and production and hope they match
- Onboarding a new customer means clicking through the whole setup again
- No pull request, no review, no rollback when a prompt or skill change goes wrong
- Secrets pasted into forms with no single place to rotate or audit them
- Every new environment multiplies the manual work instead of reusing it
- Every agent, skill, and secret is in git with full history and blame
- One config promotes unchanged across every environment with terraform apply
- Onboard a tenant by adding a module call — the whole agent ships in one apply
- Changes land as pull requests with a plan to review and a clean path to revert
- Secrets are first-class resources, templated for OAuth and rotated in one place
- New environments and tenants reuse the same modules instead of repeating the work
FAQs
What is the ChatBotKit Terraform provider?
It is the official Terraform provider for ChatBotKit. It lets you declare your entire AI agent stack — bots, datasets, skillsets, abilities, files, spaces, secrets, policies, portals, and channel integrations — as code. You run
terraform applyand the platform provisions everything for you. The provider is published on the Terraform Registry atchatbotkit/chatbotkit.How is this different from other AI platforms?
Most AI platforms only give you a dashboard. You click around to build an agent, and there is no reproducible record of what you did. With ChatBotKit the agent itself — its backstory, its tools, its memory, its credentials, and the channels it speaks on — is a declarative resource graph. You version it in git, review changes in pull requests, promote it across environments, and tear it down cleanly. The agent's brain and behavior live in the same workflow as the rest of your infrastructure.
What can I actually manage as code?
29 resource types and 4 data sources. That covers bots, datasets, blueprints, skillsets and individual abilities, files and file content, spaces and space storage, secrets, policies, portals, and 17 channel integrations including Slack, Discord, Telegram, WhatsApp, Messenger, Instagram, Microsoft Teams, Google Chat, Email, Twilio, Notion, Sitemap, Support, Trigger, Widget, MCP Server, and Extract.
How do I deploy a separate agent for every customer?
Use one master token plus the provider's
run_asattribute, which sends theX-RunAs-UserIdheader — the same pattern as the AWS provider'sassume_role. Each provider alias targets a customer's sub-account, and a shared module deploys the same agent into every sub-account in a singleterraform apply. No per-customer tokens and nofor_eachgymnastics. Each tenant gets a fully isolated agent and resources.Can agents change themselves at runtime if everything is declared in code?
Yes, and the two models compose cleanly. You declare the agent's structure and starting state in Terraform, then give it abilities that let it evolve — a self-improving agent rewrites its own backstory file, a workflow agent discovers and installs skillsets on demand, and an MCP-aware agent searches a registry and installs new tool servers as it needs them. Terraform owns the baseline; the agent owns its growth from there.
How are credentials and OAuth handled?
Through the
chatbotkit_secretresource. Secrets can be shared (a single machine-to-machine service token used by the agent itself) or personal (each end user signs in once through your SSO, and the agent then acts on their behalf with their own permissions). Template-based secrets wire up OAuth for platforms like Google, Notion, and others without you ever handling raw tokens in state.Does it work with my existing Terraform workflow?
Yes. It is a standard Terraform provider, so it works with
plan,apply,destroy,import, modules, variables, outputs, remote state, and workspaces. It drops straight into your CI/CD pipeline alongside your AWS, GCP, Cloudflare, or Kubernetes resources. Reviewing an agent change becomes a normal pull request with a normal plan.Can I import agents I already built in the dashboard?
Yes. Use
terraform importto bring existing bots, datasets, skillsets, and other resources under Terraform management, then continue managing them as code. You do not have to start from scratch to adopt infrastructure as code.Is the provider open source?
Yes. The provider is open source and the repository ships with more than a dozen reference architectures — multi-tenant SaaS, AI employees, second-brain assistants, workflow orchestrators, dual-agent systems, MCP factories, and self-improving agents — that you can copy, apply, and adapt.
How do I get started?
Add the
chatbotkit/chatbotkitprovider to your configuration, set theCHATBOTKIT_API_KEYenvironment variable, write achatbotkit_botresource, and runterraform initfollowed byterraform apply. Your first agent is live in minutes, fully reproducible and under version control.
Built With ChatBotKit
From multi-tenant SaaS to autonomous AI employees, our customers provision entire agent fleets as infrastructure as code.
FormShare
AI-powered form builder that qualifies leads and collects data through natural conversation.

AfterDark
AI research agent that monitors and summarizes information from emails, news, and web sources.
HeroShot
Creative AI assistant that generates product photos and marketing visuals in seconds.

MuseumAI
AI guide that provides interactive tours, answers visitor questions, and enhances cultural experiences.
FashionAI
Personal styling agent that recommends outfits and helps customers find products they love.
PeopleAI
Educational AI that brings historical figures to life for interactive learning experiences.
Platform Features
Every ChatBotKit capability you provision with Terraform, from agents and datasets to skills and secure integrations.
Customer Stories
Case studies from teams shipping AI
See how organizations use ChatBotKit to launch production AI assistants, validate new products, support customers, and create richer digital experiences.
Enterprise search
Quench
Discover Quench.ai, the enterprise search company founded by Husayn Kassai, the serial entrepreneur behind Onfido. Quench helps large organizations unify and discover their internal knowledge through natural language search. Built on ChatBotKit's Forward Deployment platform - the environment powering the "Quench Sandbox" - Quench prototypes, runs discovery, and validates AI products with real customers in days rather than quarters. Learn how this approach delivered 10x faster prototyping and won major enterprises including Yum Brands, MotorK, Podium, and numerous Fortune 500 companies, turning rapid customer iteration into a sustainable competitive advantage.
Healthcare charity
Debra
DEBRA UK is the leading charity for individuals with epidermolysis bullosa (EB), a rare genetic skin condition. Committed to providing lifelong care and seeking cures, DEBRA supports nearly 4,000 members across the UK. With over £22 million invested in research, DEBRA is the largest UK funder of EB studies. The organization addresses the complex information needs of patients and caregivers by offering reliable resources and support. Learn about DEBRA's innovative chatbot, providing 24/7 assistance for inquiries about EB, fundraising, and support services, ensuring accurate and compassionate communication. Explore DEBRA's mission to improve lives and advance research for those affected by EB.
Education wellbeing
Elggo
Discover Elggo, the MENA and Southeast Asia region's first AI-powered wellbeing platform for K–12 schools. Founded after the COVID-19 pandemic to close a gap in culturally relevant mental-health resources, Elggo delivers evidence-based curricula designed by regional psychologists and educators. By integrating ChatBotKit's conversational AI, embeddable widget, and multilingual support, Elggo provides students and teachers with always-on, personalized guidance on emotional literacy, decision-making, and growth mindset. Learn how a controlled trial of 12,000 students across 32 schools saw a 30% increase in student wellbeing, and how the platform scaled across seven countries while keeping content culturally responsive and data-driven.
Cultural heritage
Faro
Discover FARO, the Flemish government's cultural heritage organization, which enhances access to heritage collections through its innovative ErfgoedApp. Launched in 2015, the app utilizes augmented reality, IoT, and AI to provide on-site, multilingual guidance for museums and heritage sites. In celebration of its 10th anniversary, FARO has partnered with ChatBotKit to introduce AI chatbots, transforming the app into an on-demand heritage guide. Visitors can ask questions about artworks and historic landmarks at any time, while geofencing technology provides location-aware storytelling. With plans to expand this interactive experience across more sites, FARO is committed to making heritage discovery intuitive and personalized for everyone.
Customer service
Intelliway
Discover Intelliway, a Brazilian technology firm building AI-powered customer service solutions for businesses across Brazil and Latin America. Using ChatBotKit's API-first platform as their backend, Intelliway builds custom-branded interfaces on top of powerful conversational AI while retaining full control over the customer experience. Learn how native Brazilian Portuguese understanding, scalable cloud infrastructure, and advanced language models help Intelliway serve hundreds of clients across multiple industries, with one major retail client reporting a 40% increase in positive customer feedback. Explore how the platform-as-a-backend approach positions Intelliway to lead conversational AI across the Americas.
Ship your agents as infrastructure as code
Talk to our team. We will help you model your agents in HCL, set up multi-tenant patterns, and wire the provider into your existing pipeline.