Documentation

Sessions

A session is one conversation with one agent. It holds the messages, the events the agent received and the agent's runs. Sessions in the sidebar lists them.

A session starts when:

  • you send a message from New session or from Slack.
  • a node starts to match an agent's runs_when entry.
  • a cron rule fires for a singleton that is not live and whose where holds.
  • an agent starts a session with another agent.

Interactive and headless

Each runs_when entry sets mode. Sessions you start are interactive.

  • Interactive. The session stays open after a run ends. Your next message continues the conversation. A message starts a turn at once. Events that arrive within the agent's batching window start one turn.
  • Headless. The session runs without messages from people. It closes when its run completes. The app labels it Background.

Turns

A turn starts when a message or an event reaches the session. The agent ends the turn by marking the session:

  • Your turn. The agent needs an answer or a review from you.
  • Standing by. The agent is done, or waits on other work, such as a child issue or a CI run. An event about that work can start the next turn.

The app shows Working while a run is live, Done after the session closes, and Error after a run fails. The Inbox lists the sessions you can message. Sessions in your turn, working or failed come first.

Who a session acts for

A session acts for the organization or for one person. Its runs use that person's or the organization's secrets, model credentials and GitHub identity.

  • A session you start acts for you.
  • A runs_when session acts for whoever the entry's on_behalf_of names: the organization by default, a member, or a user field of the node, such as the issue's assignee.

Runs that act for the organization commit as Hydra Worker. Runs that act for a person commit as that person.

Who can message a session

participants lists who can message the entry's sessions. The default is whoever the session acts for. Every member can message a session that acts for the organization. With an empty list, no person can message the session, and it appears in no Inbox. Agents can message any session in the organization.

What a config change does to a session

  • participants only. Hydra updates the session in place. The run continues.
  • lives_on, where, receives, max_live or max_tries only. Nothing changes.
  • The prompt, on a session of a node. Nothing changes. The node's next session gets the new prompt.
  • The prompt, on a singleton's session. Hard reset. The agent gets a warning. At its next answer, or after 15 minutes, the session restarts on the new prompt without its earlier conversation.
  • Anything else, such as the model, environment, secrets or runtime. Soft reset. Hydra ends the run after its current turn. The next message or event starts a run on the new settings. That run keeps the conversation, and its first turn names what changed.

A headless session finishes on the config it started with, unless the change is who it acts for. A reset keeps the session's page and its chat log.