AI Agents

AI agents in Outrun are workflow-powered automation that can chat with visitors, triage email, update your CRM, and route conversations to specialist agents. Each agent is backed by a workflow template that defines its trigger, AI reasoning, tool use, and response logic.

Agent Templates

Outrun includes pre-built agent templates for common use cases. Each template creates a complete workflow with triggers, AI nodes, routing, and actions pre-configured.

Template Channel Description
Pre-Sales Agent Chat Answers product questions, explains pricing, qualifies interest
Lead Qualification Agent Chat Asks qualifying questions, captures contact details, creates CRM records
Customer Success Agent Chat Handles account questions, troubleshooting, and feature guidance
AI SDR Email Drafts outbound sales emails using CRM context
Email Drafter Email Generates email responses based on inbound message analysis
Activity Digest Schedule Summarises daily activity across connected tools
Data Enricher Schedule Fills in missing fields on CRM records using AI analysis
Duplicate Detector Schedule Identifies and flags duplicate records across sources
Smart Responder Email AI-powered email responses with tone and context matching
Deal Analyzer CRM Analyses deal health and recommends next actions (HubSpot)
Lead Scorer CRM Scores incoming leads based on configurable criteria (HubSpot)
Ticket Router Webhook Routes inbound tickets to the right team (Jira)

Creating an Agent

  1. Navigate to Agents in the sidebar
  2. Click New Agent
  3. Choose a template or start from scratch
  4. Configure the agent settings (see below)
  5. Activate the agent

When you create an agent from a template, Outrun generates a workflow with the correct node structure. You can customise the workflow in the canvas editor.

Agent Settings

Identity

  • Agent Name — displayed in chat widget and email headers (e.g. "Sarah from Acme")
  • System Prompt — instructions that define the agent's personality, knowledge, and boundaries
  • Model — the AI model used for reasoning (Claude Haiku for speed, Claude Sonnet for quality)

Channels

Agents receive messages through one or more channels:

  • Chat — embeddable website widget via the Outrun SDK
  • Email — connected email integrations (inbound messages trigger the agent)
  • Webhook — external events from GitHub, Jira, or custom sources
  • Schedule — cron-based triggers for periodic tasks

Configure channels in the Channels tab of the agent settings. Chat agents require the SDK to be installed on your website.

Tool Use

Agents can dynamically choose which actions to take during a conversation. Available tools include:

Tool Description
crm_lookup_contact Search for a contact in your connected CRM
crm_update_deal Update deal stage, value, or custom fields
send_email Send an email via connected email integration
fetch_workspace_context Pull workspace data for context-aware responses
create_contact Create a new CRM contact record

Tools are registered in the workflow's AI node configuration. The agent decides which tools to call based on conversation context — it reasons about what action would be most helpful, calls the tool, and uses the result in its response.

Tool Use vs. Scripted Actions

Traditional workflow actions run in a fixed order. Tool use lets the agent decide what to do based on the conversation. The agent might look up a contact, realise they're on the enterprise plan, and tailor its response accordingly — without you needing to pre-define that branch.

Human-in-the-Loop (HITL)

HITL settings control when agent responses require human review before being sent:

  • Modereview (all responses reviewed), confidence (low-confidence responses reviewed), or autonomous (agent responds directly)
  • Blocking — when enabled, the agent waits for human approval before responding. When disabled, the agent responds immediately and corrections are applied after the fact.
  • Email Capture Delay — how long (in seconds) the agent waits before asking for the visitor's email address. Configurable per agent.

Review pending responses in the HITL Review page, which shows the agent's draft alongside the full conversation context.

Multi-Agent Routing

When you deploy multiple chat agents, Outrun automatically creates a triage workflow that routes incoming messages to the right specialist.

How Routing Works

  1. A visitor sends a message via the chat widget
  2. The auto-router (a lightweight triage agent) reads the message and classifies it
  3. The message is routed to the specialist agent that matches the classification
  4. The specialist responds using its own prompt, tools, and context
  5. If the conversation topic changes, the auto-router can re-route to a different agent

Routing Configuration

The auto-router uses conditional nodes to match triage classifications to specialist agents. Each specialist agent has a sourceMode and agentName that the router uses for targeting.

Routing decisions are logged in the workflow run history so you can audit which agent handled which conversation and why.

Loop Guards

To prevent infinite routing loops (Agent A routes to Agent B, which routes back to Agent A):

  • A hop counter tracks how many times a conversation has been re-routed
  • After 3 hops, the conversation escalates to the HITL queue
  • An agent cannot route back to the agent that just routed to it

Correction Memory

When a human edits an agent's response in the HITL review queue, the correction is stored and used to improve future responses.

How It Works

  1. The agent generates a draft response
  2. A human reviews and edits the response
  3. The original message, draft, and correction are stored as a correction record
  4. When a similar message arrives in the future, relevant corrections are retrieved
  5. The corrections are injected into the agent's prompt as few-shot examples

Viewing Corrections

Navigate to the agent's Correction Memory Trail in settings to see stored corrections, how often they've been retrieved, and their impact on response accuracy.

When to Update the Prompt Instead

If you've stored more than 5 corrections for the same underlying issue, it's more effective to update the system prompt directly. Correction memory handles edge cases; systemic issues belong in the prompt.

Next Steps