Updating a Spell
You can always edit your Spell after publishing it. You may need to add or remove steps, tweak some logic, change your AI prompts, or change it in some other way.
When you enter the editor for a published Spell, a new version will be created for you. Whenever you’re in the editor, the current version is called a “draft”. This way, you never have to worry about overwriting your Spell.
After you make some edits, you can publish the new version by clicking the “Update” button in the top right.
Updating A Manual Spell
When you update a manual Spell, the new version is shown by default in the Spell page. You won’t be able to run the old versions anymore.
If your Spell is called via the API in any systems, you’ll need to be mindful that your code doesn’t break when you update the Spell. If the required inputs to the Spell change, your API call may no longer work. You have 2 options when updating a spell with breaking changes:
- You can update the spell and your code at the same time. This is easier, but you may run the risk of a small interruption.
- You can duplicate the spell, make your changes and publish it, and then update your code to use the new spell ID. This requires slightly more work, but guarantees your code is always using the proper spell version without any risk of downtime.
Updating A Triggered Spell
When you update a triggered Spell, your triggers will immediately start sending events to the new Spell version. You don’t need to change anything for this to happen.