Change what an agent does
Open New session, name the agent, and describe the change:
Change the pr-review agent so it also runs on draft pull requests, and so its review comments list each missing test as a checklist item.
The first half of this request changes the trigger, the
whereof aruns_whenentry. The second half changes the prompt.Open Agents in the sidebar and pick the agent. Under Configuration, check the new
where.Under Configuration, find the document in
prompts, such as/agents/pr-review/prompt.md. Open Documents in the sidebar, open that document, and check the new text.
What happens to running sessions
- Trigger changes. These are
lives_on,where,receives,max_liveandmax_tries. Running sessions continue. The new rules decide which nodes start and stop the agent from then on. - Prompt changes on an agent that runs on a node. A node is a record such as an issue or a pull request. Running sessions continue on the old prompt. The node's next session gets the new prompt.
- Prompt changes on an interactive singleton. The session restarts on the new prompt without its earlier conversation, at the agent's next answer or after 15 minutes. A headless singleton finishes on the prompt it started with.
- Changes to
participants. Hydra updates who can message the session, and the run continues. - Environment changes on an agent that runs on a node. Running sessions continue. The node's next session uses the new environment.
- Changes to
on_behalf_of. Hydra ends the run after its current turn, in interactive and headless sessions alike. The next run acts for the new user, and the conversation continues. - Other changes. These include the model and secrets, and the environment of a singleton. In an interactive session, Hydra ends the run after its current turn. The next message or event starts a run on the new settings, and the conversation continues. A headless session finishes on the settings it started with.
The agent definition reference lists every key an agent can set.