Heartbeat System (Space)
The same heartbeat, kept entirely in a Space: an hourly trigger fires a background beat in which the agent reads its HEARTBEAT.md and scratchpad - both Markdown files in one Space it owns - and emails you only when something needs attention. Because the definition lives in the Space, the agent can rewrite its own heartbeat over time.
This is the second of two heartbeat blueprints. It keeps the same shape
- a recurring trigger for the pulse, a HEARTBEAT.md file for the definition - but stores the whole system in a Space instead of a fixed File resource. See the File variant for the configuration-first approach.
Here, one Space holds everything as plain Markdown: /HEARTBEAT.md is
the checklist the agent runs through on every beat, and /scratchpad.md
is its working memory between beats. The agent reaches both with
ordinary Space storage abilities - list, read, and write.
The defining difference is ownership. Because the definition lives in
the Space rather than a read-only File, the agent can rewrite its own
HEARTBEAT.md. When you ask it to start watching for something new, it
edits the checklist itself and the next beat uses the new version
immediately - the heartbeat is not frozen configuration, it evolves.
There is no seed File resource: on its first beat the agent bootstraps a
default HEARTBEAT.md into the Space from its instructions, then owns it
from there.
As with the File variant, restraint is the whole discipline: a quiet beat is the normal, successful case, and the agent only emails when an item turns up something that genuinely needs your attention. The live file browser shows the entire system - definition and scratchpad together - as it grows.
Choose this approach when you want a self-contained, self-evolving agent that keeps its definition and memory in one place; choose the File variant when you want the heartbeat's behaviour authored and governed centrally and guaranteed not to drift.
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.
List Files
List the files in the Space to see the heartbeat definition, the scratchpad, and anything else the agent keeps. Read this at the start of every beat to check whether HEARTBEAT.md exists yet.Read File
Read a file in the Space by its path - /HEARTBEAT.md for the definition, /scratchpad.md for working memory.Write File
Create or update a file in the Space at a given path. Use it to bootstrap or rewrite /HEARTBEAT.md, and to keep /scratchpad.md current. Overwrites the file if it already exists.Send Email
Compose and send a short email to reach out to your creator when the heartbeat finds something that needs attention.
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.