Journeys often include tasks that need a human to review something and decide what happens next — approving a deal, qualifying a lead, or triaging a support request. Now, instead of waiting on a person, you can assign an AI agent to handle that task automatically. This guide walks you through setting it up.
What this feature does
When you assign an agent to a task definition, the agent runs in the background under the identity of whoever the task is assigned to. In practice, this means the agent can only take actions that the assignee themselves would be allowed to take.
Once triggered, the agent can:
- Set journey fields
- Update the lead's title or description
- Add a comment
- Send an email or Slack message
- Complete the task by selecting an outcome, which moves the journey forward
The agent receives the full context of the lead — its title, description, contact/organisation details, and all journey fields — along with the list of available outcomes and whatever fields each outcome requires.
This works with any task definition in any journey; it isn't limited to a single use case.
Before you start
Before assigning an agent to a task, make sure you already have an agent definition set up in Kademi. You'll select this agent definition when configuring the task.
Assigning an agent to a task
Step 1 — Open the task definition
Go to your journey, open the Tasks tab, and find the task definition you want to automate under Task definitions. Click the edit (pencil) icon next to it.

Step 2 — Assign the agent
In the task definition editor, use the Assign to Agent picker to select the agent definition that should run this task.

Step 3 — Add agent instructions
Once an agent is selected, an Agent instructions field appears. This is where you write the prompt that tells the agent what to do for this specific task. It supports KCode — use the Insert KCode link above the field to pull in dynamic values. If you leave it blank, a sensible default is used.

Step 4 — Save
Save the task definition. The agent is now assigned and will run automatically the next time a lead reaches this task.
What happens when a lead reaches this task
When a lead's journey reaches a task with an agent assigned, the agent runs automatically in the background, as the assignee. It reviews the lead's full context and the available outcomes, takes whatever actions its instructions call for, and then completes the task by selecting an outcome — which advances the journey to the corresponding next step, just as if a person had completed the task manually.
Example: triage use case
A common use for this is triaging incoming support requests. On a "Triage" task, an agent can:
- Assess the urgency of the request
- Set the priority field accordingly
- Tidy up the title and description
- Send an email or Slack notification if the request is urgent
- Select the outcome that routes the journey to the right next step
The same pattern applies to any other task in any journey — triage is simply one example.
Why this matters
Assigning an agent to a task means routine decisions no longer have to wait on someone being available to review them. Journeys keep moving, and your team can focus on the cases that genuinely need a human judgment call.
If you'd like help setting this up for a specific journey in your account, get in touch with our team.