AI Agents

CAI, Agents are the core building blocks of an intelligent conversational experience. Each agent is a finely-tuned entity designed to excel in a specific domain, equipped with unique knowledge bases, predefined Action capabilities, tailored communication style, and security protocols.

These specialized agents are not generic conversational interfaces, but precision instruments crafted to solve complex problems within their designated expertise—whether it's technical support, sales consultation, customer service, or strategic analysis. By combining deep domain knowledge with advanced reasoning capabilities, specialized agents can break down intricate challenges, generate context-aware solutions, and interact with users in a manner that mimics expert human professionals.

New Agent

Before creating your agent, you must have already added at least one skill (Action or Knowledge) to your Project. To do so, go to the respective sections and create the skills. Only then you’ll be able to create an Agent. Once you have added at least one, it’s time to build your team of agents.

Being goal-oriented, AI Agents possess a reasoning capability that allows it to execute actions based on information provided by users. The following fields shape how your agent perceives itself and its responsibilities, influencing every interaction and decision it makes.

Creating a new agent involves these three steps:

General Info

Role

A well-defined Role creates clarity about what users can expect from the agent and establishes the framework for all its capabilities, whether it's serving as a customer support specialist, a technical troubleshooter, or a creative assistant. Let’s walk through the creation of the agent Voyage Advisor.

Persona

You can either use the Project default persona or choose a specific one for each agent. You can use different ones for each of the agents depending of the use case.

Goal

The Goal articulates the primary objective your agent strives to achieve through its interactions. This strategic directive guides the agent's decision-making process, helping it prioritize actions and generate responses that consistently work toward fulfilling its purpose.

A clearly defined Goal helps your Supervisor agent to make intelligent choices when faced with ambiguity, ensuring that every conversation advances toward the right Agent.

This field is crucial for proper task delegation - the Supervisor uses the information in Goals to determine which agent should handle each user request.

Your Goal should be specific and detailed enough to clearly define the agent's expertise and capabilities. Vague or overly generic Goals (like "help users" or "provide support") make it difficult for the Supervisor to route requests correctly.

Your Goal should include:

  • Specific tasks and responsibilities the agent can handle

  • Key capabilities and services it provides

  • Domain expertise or specialized knowledge areas

  • Clear boundaries of what the agent does and doesn't do

Take this expert agent Voyage Advisor as example, the goal states: "This agent suggests destinations to the user and creates itineraries based on the user's preferences, handles booking inquiries, provides travel recommendations for accommodations and activities, and assists with travel planning logistics."

Notice how it's specific about what the agent does (suggests destinations, creates itineraries, handles bookings) rather than being generic. This clarity helps the Supervisor understand exactly when to delegate travel-related requests to this agent.

The more specific and comprehensive your Goal, the better the Supervisor can route appropriate requests to your agent.

Instructions

These instructions provide necessary context, domain knowledge, how to format answers, and operational parameters that shape how the agent interprets user inputs and formulates responses. Well-crafted Instructions enable your agent to generate hyper-personalized responses and even format instruct the generation with rich text.

Prompt example for formatting:

“Always format all responses using HTML. Use the following guidelines to present the content:

1. List items or options using HTML tags `<ul>` and `<li>` to create an organized list.

2. Highlight important names or key terms using the `<strong>` tag for bold.

3. Use `<p>` paragraphs to separate blocks of text, ensuring visual organization.

4. All formatting must be semantically correct in HTML.

5. Responsive resolution (mobile version). The output must be well structured to be used directly in any HTML page.

6. Return the image with a height of 200x200 pixels and with a single line”

Preferences

Inherit Supervisor’s Preferences

You can choose to have Agents inherit the Supervisor’s preferences such as Guardrails and Constraints. Or, you can disable this option and override them with agent-specific tailored prompts to specialized functions.

Skills

Add Skills (resources such as Actions and Knowledge) that are already available in your project.

Agent cell

Once you click Save, the Agent cell, exclusive to Agentic and Combined models (not available in Intent-based/NLU models), will appear in the workspace.

The Agent cell is the main executor responsible of generating responses based on its goal, instructions, persona, and guardrails, after receiving a user input. If the case of the agent is not able to effectively respond to a user query, the conversation automatically transfers to a supervisor for further assistance.

For specific knowledge and tasks, the Agent cell can trigger skills like Knowledge sources or execute actions linked to it. When an action is associated with this Agent, a new branch appears in the workspace specifically for configuring that action's parameters.

The Agent cell supports any subsequent cell types except those incompatible with the agentic model (intents, entities, and end cells).

Channel customization

You can also customize answers by channel at the prompt level, directly within the instructions field. In addition to adapting the prompt, you can define channel-specific actions to optimize how tasks are executed in each context.

By leveraging the $info.channelName and $info.channelType variables, it’s possible to apply specific formatting or tone. To ensure the right behavior across channels, use the supported variables:

Information about the channel

Contains the given name for the currently used channel

$info.channelName

Information about the channel type

Contains the current channels type (whether its web, Facebook, Alexa, etc.)

$info.channelType

Prompt example for the Instructions field:

“If the channel type is facebook, use the FacebookSummaryAction. If the channel is web, use MarkdownSummaryAction.”

This allows the agent not only to respond appropriately in natural language but also to trigger the most effective tool for each channel, ensuring consistency, accuracy, and a smoother user experience across platforms.

Last updated

Was this helpful?