Terraform Agent Framework

A reference architecture that defines an autonomous agent as a project of files - instructions, skills, and a heartbeat - and provisions the whole thing on ChatBotKit with Terraform: the agent, its ability packs, an isolated workspace, file-based skills, a Slack channel, and schedules.

terraform
infrastructure-as-code
agent
1626

This example shows how far you can take ChatBotKit as a backend: an entire agent framework, declared as code and stood up with a single terraform apply. The agent is authored as a small project of files under agent/ - instructions.md becomes the bot's backstory, skills/ holds on-demand SKILL.md playbooks, and heartbeat.md drives a recurring tick.

Terraform wires the platform primitives together. The bot's toolset is built from ability packs - pack/shell for running commands and editing files in an isolated workspace, and pack/cbk/space/skills for discovering and reading the uploaded skills - alongside web search and fetch. The skills/ tree is uploaded into the workspace under .skills/ with fileset and for_each, so adding a skill is just adding a folder.

Channels and schedules round it out. Slack is active out of the box, with Discord, Teams, and WhatsApp ready to uncomment. Two kinds of schedules are shown: ordinary timed triggers, and a heartbeat whose instructions come from heartbeat.md and which reuses one conversation across each hour of ticks.

Because everything is infrastructure-as-code, the agent and all of its surfaces can be reviewed, versioned, replicated across environments, and torn down reproducibly.

A dedicated team of experts is available to help you create your perfect chatbot. Reach out via or chat for more information.