Agent Routines
To use Agent Routines, the large language model you choose must be trained or fine-tuned for function calling.
Overview
Agent Routines in Profound AI are designed to enable AI agents to execute a variety of automated tasks and actions.
Agents decide (on their own) when a particular routine is pertinent in the context of a user interaction. Therefore, it is very important that the appropriate routine name, description, and inputs are provided, as well as sufficiently described using natural language.
Table of Contents
Managing Agent Routines
To create, edit, or remove agent routines, simply switch to the Routines tab in the IDE when working with an agent, and use the appropriate toolbar icons for each action.
In the General Info tab, make sure to provide a clear name and description to describe the routine’s capabilities.
The AI Agent reads this information to decide when to call the routine.
Mark a routine private if it is intended to be used by other routines or for invocation from from Agent Instructions.
When a routine is marked private, the AI model itself does not receive any information about it and is unable to initiate a call to that routine directly.
Example
Configuring Parameters
You can define Input and Output parameters in the bottom section of the IDE:
The parameters can be repeated as arrays and nested in as many levels as necessary.
For example: A routine for placing an order may require customer information, as well as a list of order detail lines with nested information such as: product id, product configuration, and quantity for each detail line.
It is very important that Input parameters are defined to that level of granular detail, with Examples and Descriptions provided to guide the LLM in generating the appropriate parameters.
Defining Output parameters may not require the same level of granularity as input parameters, since the LLM can potentially infer the meaning of the data from the output response itself.
For example: If a list of records is sent as output, it may not be necessary to define each record column when the data itself contains the column names as part of its JSON response.
Configuring Routine Logic
Routines utilize Low Code capabilities within the IDE. For more information about Low Code functionality, see here.
Routine Logic can be specified as either Node.js code or as a set of Low-code steps.
Low-code steps are configured using a drag-and-drop interface in the center of the IDE. They allow you to create functionality by answering a set of prompts/questions. The steps are defined from a set of plugins, which facilitate various functions. For example:
Access to any configured databases for retrieval, updates, summarization, etc.;
Web Service Consumption;
Calling ILE programs and service programs;
Calling Operating System Commands;
Custom SQL or Node.js logic;
Conditional and repeating blocks;
Example
The following example shows a routine that calculates sales totals and sends specific output to the Agent depending on the success of the ‘sum’ Low Code step: