GPT-trainer has 2 types of Agents:

  • User-facing: Agent directly interacts with users conversationally in a Q&A fashion. Only a single user-facing Agent engages with the user when a new query is input into the chatbot.

  • Background: Agent never interacts with users directly and instead monitors the conversation in an ongoing fashion. All background Agents are run whenever the user submits a new query to the chatbot.

Unlike user-facing Agents, background Agents are designed to monitor conversations and provide assistance in the background by setting variables, assigning tags, or calling functions when certain criteria are met.

Agents are completely isolated from one another. This means that you cannot direct the behavior, bias, or selection priority of one Agent from inside another Agent.

Background Agents are always run whenever the user submits a new query into the chatbot. This enables you to create “multi-threaded” workflows that significantly improves the accuracy and consistency of your chatbots. Instead of tasking a single Agent to coordinate among a multitude of potentially independent and unrelated tasks, having multiple specialized Agents simultaneously monitor the conversation and handle subsequent actions will yield much better results.

When configuring a background Agent, the prompt should be very simple and concise. Since background Agents do not generate direct “conversational” output, your instructions should be restricted to variations of “monitor the conversation for certain user behavior or intent”. You can instruct the background Agent to set tags or call functions when the corresponding triggers are met.

In certain cases, you may still wish to enable RAG for background Agents (if you need to evaluate a user’s claim against certain policies or historical records before assigning a tag, for instance). If this is true, you should give the Agent access to the necessary knowledge sources by going to the “Knowledge” tab in the Agent edit dialog.

A common user case for background Agents is conversation tagging. For an example of how to use background Agents to assign conversation tags, see Frustration Detection.

Here’s a fun setup that detects any mention of various fruits during the conversation and assigns the appropriate tags.

Like user-facing Agents, background Agents can set Variables. The setup works the same way for both types of Agents. For an example of how to set Variables using Agents, see Lead Collection