<summary>Add a trigger to an existing agent. Use this to schedule follow-ups on an agent
that already has context (e.g., after sending emails, add a one_time trigger to
check for replies later). Prefer this over creating a new agent.
You MUST call `get_skill_guide('trigger_code')` before writing the trigger's
`code` — the qualification rules, sandbox globals, tool surface, and `out`
contract live in the skill. New `code` runs on the trigger's next firing.
The same goal-sync obligation `update_trigger` carries applies to creating
one: a new scheduled trigger adds recurring behavior the goal doesn't yet
describe, and the goal is injected into every turn on this agent. After this
call, name what the new trigger does and how often via
`update_agent(agent_id=..., goal=...)` in the same turn. A flow's per-node
`on_enter` triggers are already covered by the goal's sequence description
and need no separate mention.
To add a flow node's `on_enter` enactment — a terminal hook, or re-arming a
node whose row was removed — pass an `on_enter` trigger with the target
`node_id` (any node kind; the node must already exist in the sequence). One
`on_enter` per node — if it already has one, edit that with `update_trigger`
instead of adding a second. On a send or connection-request node, that trigger's `prompt`
holds only extra instructions; the message or note itself goes in the node's
`message_templates` (`update_node`).</summary>
<returns>
<description>Dict with success, agent_id, trigger_id, next_run_at, and the added trigger's
full dict under `trigger`, plus a `warning` when the agent is paused, since its
triggers don't fire until it is set back to active. Read the agent's
other triggers via get_agent_details.</description>
</returns>