Skip to main content

Procedural agents for post-processing

Set up a procedural agent as a post-processing step for conversations. Typical use-cases include sentiment analysis, extracting key values, categorizing conversations and generating follow-ups for the operations teams.
1

Create and configure the procedural agent

Create a procedural agent that will process the conversation transcript. Write a prompt describing the task and the high-level output expected.
2

Configure output and tools

Configure the agent by defining the OpenAPI spec for the output in the “output” tab, adding a slack channel connection or webhook endpoint. Add any necessary tools in the “tools” tab.
3

Save and release the procedural agent

Save and release the new version of the procedural agent to make it available for use.
4

Connect to conversational agent

In the target Conversational Agent configuration, go to the “Post-process” tab and add the newly created procedural agent as a post-process connection.
5

Save and release the conversational agent

Save and release the new version of the target Conversational Agent to activate the post-process connection.

Output Schema Configuration

Procedural agents generate structured outputs defined by OpenAPI 3 compatible JSON Schema. Unlike tools that have both input and output schemas, procedural agents only define output schemas since their input is the conversation transcript. The output schema defines the structure of insights, metrics, or data that the agent extracts from the conversation. Here’s an example output schema for analysis and tagging of conversations based on their substance and the customer cohort:
{
  "properties": {
    "is_qualified": {
      "type": "boolean",
      "description": "Whether the call had a meaningful conversation."
    },
    "customer_cohort": {
      "type": "string",
      "enum": [
        "new customer",
        "returning customer",
        "regular customer"
      ],
      "description": "The customer type based on their interaction history."
    },
    "id": {
      "type": "string",
      "description": "The unique ID for the conversation."
    },
    "summary": {
      "type": "string",
      "description": "A summary of the conversation."
    }
  },
  "type": "object",
  "required": [
    "is_qualified",
    "customer_cohort",
    "id",
    "summary"
  ]
}

Custom fields tool

Procedural agents have access to the special
Set custom field
tool that allows them to tag conversations for quick filtering and analysis. Custom fields are used to categorize conversations and are valuable for both the Operator dashboard and downstream data warehouse analytics.
To enable custom field setting in your procedural agent, add instructions in the agent’s prompt. For example:
Determine whether the conversation was qualified and then use
Set custom field
to set the qualified field to true or false.
Custom fields set by procedural agents become available for:
  • Dashboard filtering: Quickly filter conversations in the Operator interface
  • Data warehouse integration: Export tagged data for external analytics systems
Custom fields are persistent and become part of the conversation record. Choose field names carefully as they’ll be used across your organization for reporting and analysis.

Using procedural agents as tools

Set up a procedural agent to act as a tool that can be used in the middle of a conversation by a conversational agent.
1

Create and configure the procedural agent

Create a procedural agent, define its prompt and tools and output format. The agent will receive the conversation transcript up to the point when it was invoked as a tool as its input.
2

Save and release the procedural agent

Save and release it.
3

Enable as tool in conversational agent

In the target Conversational Agent configuration, go to the “tools” tab and enable the newly created procedural agent as a tool. In the prompt, specify when to use the tool, mentioning it with the @ tag.
4

Save and release the conversational agent

Save and release the Conversational Agent.
I