Skip to content
Vitor Lima edited this page Mar 19, 2026 · 1 revision

Every agent workflow must have a Trigger node. It defines when your agent runs and provides basic context (like which participant or chat triggered it) to downstream nodes.

Outputs

Output Description
Participant ID The ID of the participant related to the trigger event. What this refers to depends on the trigger type (see below).
Chat ID The ID of the chat where the event occurred.

Trigger Types

Click the settings icon on the Trigger node to choose when your agent fires.

Flow Control

Type When it fires Participant ID gives you
Manual When it's the agent's turn in participant order, or when you click the run button in the Participants panel. The agent's own participant ID.
After All Participants Once every participant has finished their messages for the round. (No participant output)
Every X Messages After every N messages in the chat (from anyone). You set the count in the config. The agent's own participant ID.

User Messages

Type When it fires Participant ID gives you
After User Message Right after the user sends a message, before characters respond. The user's persona character ID.
Before User Message Before the user's message is created. Blocks the chat until the workflow finishes. The user's persona character ID.

Character Messages

Type When it fires Participant ID gives you
After Character Message After a character finishes generating their response. The character's participant ID.
Before Character Message Before a character starts generating. Blocks that character's generation until complete. The character's participant ID.

Any Message

Type When it fires Participant ID gives you
After Any Message After any user or character message is created. The participant who sent the message.
Before Any Message Before any message is created. Blocks the chat until complete. The participant who is about to send.

Important Notes

  • "Before" triggers are blocking — the chat pauses until your workflow finishes. Keep these fast or the user will notice a delay.
  • Manual triggers work like characters in participant order. The agent takes its "turn" when reached.
  • Every X Messages uses a counter that increments on every message. Once the threshold is hit, it fires and resets the counter.
  • An agent always needs exactly one Trigger node, but it doesn't need to be connected to anything — it can stand alone while other nodes run independently.

Common Patterns

  • Manual + Chat Message: The agent acts like a character, generating and posting a response when it's their turn.
  • After User Message + Prompt Injection: The agent injects context or instructions after the user speaks, before characters generate.
  • Every X Messages + JavaScript: Periodic cleanup or summary tasks that run on a schedule.

Clone this wiki locally