What happens to triggers and agents when I delete a source they depend on?
Tares shows you the triggers and agents that depend on a source before you delete it, and offers to delete them in order, agents first and then triggers. If you say no, Tares refuses the delete and names what would break. On the API, GET /api/catalog/dependents lists the dependents and cascade=true on DELETE /api/sources/ followed by the source name takes them along.
How it works
Objects in Tares depend on each other downward. A trigger depends on the sources it watches, and a Tares agent depends on the trigger that wakes it. Deleting a source therefore affects everything below it.
- Delete a source: Tares shows the triggers and agents that need it and offers to delete those too. The order is agents first, then triggers, and the source goes last.
- Say no to the offer: the delete is refused, and Tares names what would break so you know what to change first.
- Delete a trigger: the agents it woke stay in place. They no longer have a trigger of their own, so only a handoff from another agent or a manual run starts them, until you give them a new trigger in a project’s wiring.
- Delete any part: the part is removed from every project that used it. Sources, triggers, agents, MCP servers and skills belong to the instance, and projects share them, so one delete reaches each project that used the part.
A project’s wiring says which trigger wakes which agent there. When a trigger is deleted, that wiring no longer has a trigger to point at, and the agent itself is kept. For the full model of how sources, triggers, agents and projects relate, see Concepts.
Set it up
You do not need to configure anything for this behavior. It applies to every delete of a source. Use these steps to delete a source safely.
- List what depends on the source before you delete it. In the console, the delete prompt shows the dependents. On the API, call the dependents endpoint with
kind=sourceand the source name. - Decide what should happen to each dependent. Keep a trigger and its agents if you plan to point them at another source. Delete them if they only existed for this source.
- Delete the source. In the console, accept the offer to delete the dependents in order, agents then triggers. If you decline, the delete is refused and Tares names what would break.
- On the API, add
cascade=trueto the delete when you want the dependents taken along.
GET /api/catalog/dependents?kind=source&name=
DELETE /api/sources/{name}?cascade=true- To remove only a trigger and keep its agents, delete the trigger itself. The agents stay in place without a trigger. Give them a new trigger in a project’s wiring when you want them woken by events again.
The AI SRE guide shows how sources, triggers and agents fit together in a typical setup, which helps when you plan what to delete.
What you get
- You see what a delete affects before it happens, because Tares lists the triggers and agents that need the source.
- You get a safe default. Saying no to the offer refuses the delete and names what would break, so a source never disappears out from under a trigger by accident.
- You get a clean order. Agents go first, then triggers, then the source, so nothing is left pointing at something that no longer exists.
- You keep your agents when you delete only a trigger. Their prompts and settings stay, and you can attach them to a new trigger later.
- You can script the same behavior. The dependents endpoint gives you the list, and
cascade=trueon the delete removes the source with everything that depends on it in one call. - You have one place to delete from. Because a delete removes the part from every project that used it, you do not clean up project by project.
When something else fits
- If you want to stop events for a while without losing the setup, pause the source instead of deleting it. Sources can be added, edited, paused and removed at runtime without a restart.
- If you only want to retire a trigger, delete the trigger and leave the source and agents alone. The agents stay in place.
- If you want to remove a whole project, delete the project. It deletes the triggers, agents, MCP servers and skills it made, keeps any part another project uses, and lets you pick which of its sources go too.