Reprogrammable Agent
An AI agent that can read and rewrite its own system prompt (backstory) on demand, allowing users to reshape its personality, rules, and capabilities at runtime - without ever leaving the conversation.
The Reprogrammable Agent blueprint demonstrates one of the most powerful capabilities in the ChatBotKit platform: an AI agent that can introspect and rewrite its own instructions during a live conversation.
Most AI agents are static - their system prompt is fixed at deploy time,
and changing it requires editing the bot and redeploying. The Reprogrammable
Agent breaks this constraint entirely. It exposes two self-referential
abilities that are connected directly to the bot via a botId resource link:
- Read Backstory - fetches the bot's current system prompt so the agent knows exactly what rules and persona it is operating under before making any changes.
- Write Backstory - overwrites the system prompt with new content supplied by the agent itself, persisting the change to the platform immediately.
The result is an agent that treats its own instructions as mutable state. Users can ask it to adopt a new persona, add a constraint, remove a rule, or completely reinvent its purpose - and the agent will read its current backstory, reason about the requested change, compose a new backstory, and write it back, all within the conversation turn.
This pattern is useful across a wide range of scenarios:
- Persona management - let users personalise how the assistant talks to them, adjusting tone, verbosity, or domain focus without admin access.
- Progressive refinement - an agent that improves its own instructions over time based on feedback ("you keep doing X, please stop").
- Bootstrap & reset - start with a minimal backstory and let the agent build up a rich one through guided conversation, or wipe to defaults with a single instruction.
- AI employee onboarding - a manager bot that programs specialist bots by writing tailored backstories for each one.
The agent is pre-seeded with an honest, self-aware backstory encouraging transparency about its reprogrammable nature. It always reads first, then writes - ensuring it never blindly overwrites context it needs to preserve.
Security note: because this agent can modify its own instructions, it should only be deployed in trusted contexts or behind authentication. For multi-user deployments consider scoping access to the write ability.
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.
Read Backstory
Read the current system prompt (backstory) of this botWrite Backstory
Overwrite the system prompt (backstory) of this bot with new content
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.