Self-Sufficient Agent
A general-purpose autonomous AI agent that combines shell execution, persistent space storage, and self-modification to handle virtually any task - adapting its own instructions over time and building on prior sessions without ever losing context.
The Self-Sufficient Agent blueprint represents the most capable single-agent configuration available on the ChatBotKit platform. It combines execution power, persistent memory, and self-modification into one cohesive agent that can genuinely handle any task thrown at it - from coding and research to automation and planning.
Most AI agents are constrained by three fundamental limitations: they cannot execute real actions, they forget everything between sessions, and their behavior is fixed at deploy time. This blueprint eliminates all three.
Execution via Shell
Three tightly integrated shell abilities give the agent real-world reach:
-
bash - Runs shell commands and scripts in an isolated sandbox. The agent can compile code, run tests, install packages, call CLIs, and surface the output directly in chat. Nothing is theoretical.
-
rw - Reads and writes file content in the shell environment with optional line-range targeting for surgical edits. The agent creates source files, patches specific sections of existing code, and reads back results for review.
-
import - Fetches content from HTTP/HTTPS URLs and saves it locally. Remote assets, starter templates, and external data files become part of the agent's working environment on demand.
Persistent Memory via Space Storage
The shell sandbox is ephemeral - files written there vanish when the session ends. The persistent space solves this. The agent is explicitly instructed to treat the space as long-term memory: reading prior state at the start of every relevant task, writing results and reusable assets back after completion, and building incrementally on everything it has previously learned or produced. The Space File Browser dashboard tool gives users live visibility into what the agent has stored.
Self-Modification via Backstory Read/Write
Two self-referential abilities connect directly to the bot itself:
- Read Bot Backstory - fetches the agent's current system prompt so it can reason about its own capabilities and constraints before making changes.
- Write Bot Backstory - persists an updated system prompt immediately, allowing the agent to refine its own instructions based on what it has learned across sessions.
The agent's initial backstory enforces a disciplined improvement loop: always read before writing, preserve core principles, and only update when it genuinely improves self-sufficiency. Users can also ask the agent to modify itself directly - adding domain knowledge, adjusting tone, or encoding project-specific conventions that persist forever.
Observable by Design
Two dashboard tools deliver operational visibility without leaving the canvas:
- Error Log - surfaces the agent's most recent errors with auto-refresh, making it easy to spot and diagnose failures in real time.
- Bot Stats - shows usage metrics over the last 30 days so teams can monitor activity and understand how the agent is being used.
Practical Use Cases
The Self-Sufficient Agent excels anywhere a task requires sustained effort across multiple sessions: long-running research projects that accumulate findings over days, software development workflows where prior scaffolding informs new work, automation pipelines that evolve as requirements change, and any scenario where "start from scratch every time" is simply not good enough.
This is the foundation for agents that genuinely grow more capable over time.
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.
bash
Execute a shell command or scriptimport
Import data from a URL and save it to a file in the shell environment. Supports HTTP/HTTPS URLs and can handle both text and binary content.rw
Read or write file content in a shell environment with a single combined operation. Use mode "read" to read content, or mode "write" to write content. Supports optional line ranges for both modes.Read Bot Backstory
Read the backstory of a connected botWrite Bot Backstory
Write the backstory of a connected bot
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.