Start an agent run
The Start an agent run action puts an agent to work when a flow's trigger fires. It's the most common flow action and the only one available for GitHub, GitLab, and scheduled triggers.
The run uses the agent's own settings, including its instructions, tools, and approval rules. The flow decides only when the run starts and what it works on.
Set up the action
In the flow composer, choose Start an agent run in the then row.
After using, choose the agent. Create the agent first if it isn't listed.
In the on row, choose what the agent should work on. See the table below.
If you chose a specific task, epic, repository, or CRM record, pick it from the list.
For GitHub and GitLab triggers, optionally open + branch overrides to set branches.
Select Create flow or Save changes.
Choose where the agent runs
Option in the on row | The agent works on |
|---|---|
whatever triggered it | The task or repository from the event, for example the task that entered a state |
a specific task | The task you pick |
a specific epic | The epic you pick |
a specific repository | The repository you pick |
this workspace | The current workspace, with no single record |
a specific deal, contact, or company | The CRM record you pick |
Some triggers limit these options:
Scheduled flows have no event, so whatever triggered it isn't available.
GitHub push, pull request, review, and check suite triggers need a specific target. GitHub release publishes can use whatever triggered it.
GitLab triggers need a specific target.
Set branch overrides
For GitHub and GitLab triggers, + branch overrides lets you control the repository branches the agent uses:
Field | What it sets |
|---|---|
base – agent checks out | The branch the agent starts from. Use |
task – branch is | The branch the agent works on. Use |
Leave both empty to use the defaults.
After the flow runs
Open the flow to see its Recent runs, or select View run history from the flow's menu.
Runs can pause for approval, depending on the agent's settings. After approval, you can continue with a run approval flow.
If the agent is missing or the setup is incomplete, the flow shows Missing agent or Setup incomplete in the Flows list until you fix it.
Related
Was this article helpful?