The AI Agents feature lets you create reusable AI-powered agents and trigger them on tickets via automatic rules. This article walks you through setting up an AI agent that uses OpenAI as its AI provider. For a general introduction to the feature, see the AI Agents feature overview.
Note: Before you begin, your LiveAgent account must be connected to OpenAI. If you have not done so yet, follow the Integrating OpenAI as an AI provider guide first.
It is recommended to integrate FlowHunt as your AI provider and set up your AI agents via it to have full control over the workflow and troubleshooting.
Create an AI agent
To create an AI agent, navigate to Configuration > AI > AI Agents, and clicking the "Create AI Agent" button.
Enter a descriptive name of your AI agent for easy recognition in settings and other sections of the panel. The name appears in "Run AI Agent" rule actions, in the AI agent runs report, and in tickets' system messages that log the taken actions, so choose something that clearly identifies the AI agent's purpose.
Select your connected OpenAI integration as the provider, and select the GPT LLM model that should process tickets.
Enter the instructions to guide the AI agent how to handle tickets into the instructions field. This acts as the system prompt for the LLM model - describe the task, the decision criteria, and how the agent should use the available tools. The instructions can be up to 5,000 characters long.
Select the allowed tools - actions, which the AI is permitted to take within your LiveAgent account. See the MCP Tools Reference for the full list of available tools. Once all settings are set, click "Create".
Tip: It is recommended to grant each AI agent only the tools it actually needs. For example, an agent whose sole purpose is to tag tickets does not need the "Resolve ticket" or "Assign ticket" tools. Keeping the tool list tight reduces the risk of unintended actions and helps save your credit budget.
Set up an automated rule triggering the AI agent
After creating the AI agent, navigate to Configuration > Automation > Rules (or Time Rules for time-based triggers), and create a new rule that will trigger the AI agent upon tickets.
Select whichever trigger and conditions to meet your requirements. For the rule action, choose "Run AI Agent". Select the AI agent you recently created, and attribute a budget from which this AI agent's tool calls should draw. For an explanation of AI budgets and credits, please see the AI Budgets & Credits article.
The "Run AI Agent" rule action can be combined with other actions in the same rule.
Save the rule, and you are done. From this point forward, every time the rule fires, LiveAgent will dispatch the selected AI agent against the matched ticket. The run executes in the background - no further manual steps are needed. To review AI agent runs, see Monitoring AI agent runs.