Accessing AI-Agents

Accessing AI-Agents

Accessing-AI-Agents-and-AI-Functions 

OCP has introduced its powerful AI Agents feature, making it easier than ever to build AI-enabled chatbots without the complexity of handling chat completions and AI assistants manually. 

With AI Agents, users can now create advanced, conversational AI bots that seamlessly integrate with OpenAI (and all other popular GenAI platforms), execute tasks independently, and provide dynamic, human-like interactions—all with minimal effort. 

Whether for customer support, lead generation, or workflow automation, OCPAI Agents remove the barriers to AI-powered chatbot development, simplifying the process for businesses and developers 

Accessing AI Agents and AI Functions 

Inside your bot, click on “AI Hub” from the left toolbar to access AI agents and functions. 

Picture 1, Picture 

Creating AI Agent 

Click on “+ AI Agent” to create a new AI Agent. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Name & Description 

Picture 1, Picture 

In this section you will have to enter the name and description of the AI agent. The description will be a brief text that provides enough context on what will be the function of the AI Agent going to be. 

Sample Description: This agent is in charge of scheduling appointments with users. The agent needs first to capture the user details which are first name, last name and email. In the next the agent needs to fetch available timeslots and from there let the user choose among them. Once the date and time have been chosen the agent needs to book the appointment 

Settings 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

In this section you will decide which model (and platform) you want to choose and what will be the various parameters that will be modifying the behaviour of the agent created. 

A white background with black text

AI-generated content may be incorrect., Picture 

OCP  currently support OpenAI, Deepseek and Grok AI for creating agents. More model will be added soon. including Google Gemini, and Claude. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

In this section you can also modifying the various parameters such as temperature value and no of repetitions to further modify the agent’s behaviour. 

A screenshot of a chat

AI-generated content may be incorrect., Picture 

The "Number of chat messages before auto summarize" feature helps manage long conversations by automatically condensing chat history after a set number of messages. 

 
Once the conversation reaches the specified limit (e.g., 10, 50, or 100 messages), the system creates a concise summary of those interactions and reinserts it into the chat as a single entry.  
 
This process preserves key details while significantly reducing character space usage, allowing for more efficient memory management. By summarizing past exchanges, the AI can retain important context without overwhelming the chat history, ensuring smoother interactions. 
 
Additionally, users can customize the maximum token limit for summaries, with 500 tokens being sufficient for general text-based chats and 1,000 tokens recommended for complex tasks like appointment booking. This feature enhances AI performance, conversation clarity, and long-term engagement efficiency. 

At the end you can also select the preferred output either in text or in JSON: 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

AI Agent Advanced Mode 

When Advanced Mode is enabled, the AI agent does not reply to the user directly. Instead, it stores the response in the system field “Last AI Agent Reply”. You must select a workflow to process and handle the response before sending it to the user. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Key Features 

  • Response Formatting: Modify AI replies by breaking down long responses into multiple sections for better readability. 

  • Media Integration: Add relevant media files (images, videos, or attachments) to enhance responses. 

  • Workflow Automation: Process AI-generated content through custom workflows to improve message delivery and presentation. 

Picture 1, Picture 

Agent Prompt 

A screenshot of a notebook

AI-generated content may be incorrect., Picture 

In this section you will define the persona (or how you want the AI agent to behave) as well as its role (or any impersonation) you want it to adhere to. 

Sample Role: The Appointment Booking Agent is responsible for scheduling appointments with users. This agent must capture user details, such as first name, last name, and email, fetch available timeslots, allow the user to select their preferred time, and finalize the appointment booking process. The tone should be professional and friendly, ensuring a smooth and positive user experience throughout the scheduling process. 

In the skills section, you will have to define all the features you want your AI Agent to perform, whether it be collecting user info data or taking timeslots for appointment booking, everything needs to be defined here. In the skill section, you will also receive insight over which functions you will need to set for your objectives and goals. 

Sample Skill:  
 

## Skills 
 

### Skill 1: User Detail Capture 
- This skill needs to capture the user details which are: first name, last name and email. 
- ONLY ask for details which are empty or unkown 
- Once all the user details are successfully captured are you to proceed to fetch the available timeslots and proceed to the next skill. 

### Skill 2: Timeslot Selection 
- This skill needs to display the available timeslots to the user 
- You are to display the available timeslots in a nice formatted overview 
- First display the available dates 
- Once the date has been chosen then you need to show the available times available for that date 

### Skill 3: Appointment Booking 
This skill needs to handle actual appointment booking 
- Once the user has chosen the date and time you are to provide the user with the overview of the appointment details and ask them to confirm 
- Once the user confirms the appointment details you are to save the chosen date and time in its original format as you received it when fetching the available timeslots 
- once saved you will need to book the appointment 
- When the appointment is booked you are to notify the user as such 

The Product & Service Information feature lets you input detailed descriptions of your products and services, including specifications, booking options, pricing details, and helpful references. 

A white rectangle with black lines

AI-generated content may be incorrect., Picture 

This ensures users can easily access relevant information without needing to ask repeatedly. By providing structured data, this feature helps streamline interactions, improve customer engagement, and enhance the overall user experience. 

A close-up of a person

AI-generated content may be incorrect., Picture 

In the constraints section, you will have to define the behaviours you DONT want your AI to perform. This can include certain questions you dont want to have AI ask or certain words you dont want the agent to use. 

Sample Constraints: The agent must only process requests in a single user session and should not store personal data beyond the session. Ensure that all prompts and responses are clear and user-friendly. Handle errors in data input gracefully, providing clear guidance on how to correct mistakes (e.g., invalid email format). If at any step the user decides to cancel, offer an option to exit the booking process politely. Response times should be quick to maintain user engagement and satisfaction. 

or your ease, OCP has provided “Generate Agent Prompt” button, which generates the role, persona, skills, and constraints sections based on your given description. 

There are two main scenarios where this feature is especially useful. First, if you lack experience in prompt writing, it helps you quickly structure a detailed and effective prompt without needing advanced skills. 
Second, if you prefer not to start from scratch, this tool provides a predefined framework, giving you a solid foundation that you can modify and tailor to fit your specific requirements. 

Picture 1, Picture 

Creating AI Functions 

Click on “+ AI Function” to create a new AI Function 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

In the first section you will have to define the name and description of the function. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Sample Description: This function needs to capture user details which are: first name, last name and email. For email the agent needs to validate proper formatting in case the user is not providing it 

In the next section , you will have to define the complete prompt for the function (i.e what you want the function to do or perform) 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

In the next section, you will have to define the values you want to fetch from the function (like first name, last name etc) and describe them, as well as to choose which CUF you want them to be saved. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

A close up of text

AI-generated content may be incorrect., Picture 

At last, you will have to attach the flow (only workflows allowed) that needs to be triggered when the function is called 

A white rectangular object with a square in it

AI-generated content may be incorrect., Picture 

You can use this feature to send captured values to another platform through native integrations (like googlesheets) or perform API calls via external requests node. It can also retrieve information from an external source and pass it back to the AI agent, allowing the conversation to continue smoothly. 

This makes it easy to automate tasks, update information in real-time, and enhance AI responses with the latest data. 

Picture 1, Picture 

A screenshot of a computer screen

AI-generated content may be incorrect., Picture 

Selecting the AI Function  

A white line with black lines

AI-generated content may be incorrect., Picture 

For AI Agents to be able to use AI functions, you will have to select them inside the AI Agents modifications. 

Once selected, it will look something like this (with an overview of the function prompt) 

Picture 1, Picture 

Picture 1, Picture 

Using AI Functions 

(You can only use AI Functions in workflows). You can select the AI Function Output node from the AI Agents tab in the action block. This will be the data you will feed back into your AI Agent after a function is called and a workflow is processed. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Using AI Agent 

Create an action node and select “AI Action:” 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Click on Edit Action to select the AI Agent 

Screens screenshot of a computer screen

AI-generated content may be incorrect., Picture 

Select the primary AI Agent (the agent which will trigger and fulfill first) as well as secondary agents (if needed). You can also select the inactivity timeout for the user, that if user stops replying in between conversation with an AI agent, this timeout will trigger and you can follow-up with the users to interact with bot again. 

When you select secondary agents, the primary agent will inherit any functions from those secondary agents. However, the primary AI agent’s persona & Role settings & LLM setting will be inherit to the secondary agent.  

A screenshot of a computer

AI-generated content may be incorrect., Picture 

This feature is particularly useful when you want to enhance the primary agent with additional capabilities without altering its core functionality. By integrating secondary agents, you can expand the range of tasks the primary agent can handle while maintaining a consistent interaction flow(persona & role setting & LLM settings). 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

At last, save the information in the CUF of your choice. This step is optional, and is designed for debug service only.  

If you don’t save the output to any user custom field, the bot response will still send out automatically. 

In order to use this AI Agent, all you have to do is send the flow to the user and AI Agent will start conversing with the user. 

You can also chain multiple AI Agents(Additional AI agents) together to route the user as per your need. Additional agent will be send the title and short description in the system prompt. Once the intent is identified with additional agent, and then you can connect this intent with another AI agent action.  
 
This will make sure your bot can cover maximum user case, while maintain a optimize usage of your prompt token. 

At last, save the information in the CUF of your choice. This step is optional, and is designed for debug service only.  

If you don’t save the output to any user custom field, the bot response will still send out automatically. 

In order to use this AI Agent, all you have to do is send the flow to the user and AI Agent will start conversing with the user. 

You can also chain multiple AI Agents(Additional AI agents) together to route the user as per your need. Additional agent will be send the title and short description in the system prompt. Once the intent is identified with additional agent, and then you can connect this intent with another AI agent action.  
 
This will make sure your bot can cover maximum user case, while maintain a optimize usage of your prompt token. 

A screenshot of a social media account

AI-generated content may be incorrect., Picture 

The complete conversation with the user will be saved in the new System JSON field called AI Messages: 

 

A computer screen shot of a message

AI-generated content may be incorrect., Picture 

AI Agent Incomplete Timeout 

Input Incomplete Timeout allows the AI agent to wait for a set period of seconds to capture all responses from the user and process them as a single response. This ensures that the AI agent processes complete user input before generating a reply. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

A close-up of a text

AI-generated content may be incorrect., Picture 

Creating AI Tasks 

From the AI Hub, click on AI Tasks and then press “+AI Task”. 

A red line in a white background

AI-generated content may be incorrect., Picture 

In the first section, you will have to define the name and the prompt for what you want the AI task to do. AI Tasks are essentially small a combination of chat completions packaged into a bundle which are designed to perform single tasks. 

A screenshot of a phone number

AI-generated content may be incorrect., Picture 

You can use one of the presets available to get an idea of how to fill in the prompt. 

A white button with black text

AI-generated content may be incorrect., Picture 

In the settings section you can define the settings for model as well as other parameters such as temperature and max tokens. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

In the output field section, if your AI Tasks requires an output (i.e you are extracting a certain information from a larger text) then you can set a output field where the result will be saved into a CUF. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

An example output will look similar to this: 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Using AI Tasks 

In the action block, click on AI Actions and then select AI Tasks from the dropdown. 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

Select the AI Task you want to perform and then in the input field, enter the content on which you want to perform the AI Task on, 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

The end result will look like this: 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

This value can then be mapped to a user-field to further use it in other flows. 

Troubleshooting AI 

There are mainly two ways you can go about for troubleshooting the AI responses. The first way way is to analyze the “AI Messages” System JSON field. 

A close up of a message

AI-generated content may be incorrect., Picture 

You can go to the bot user overview and click on the AI Message JSON to analyze at which step what the user is asking and what responses are being generated by AI. 

A screenshot of a email

AI-generated content may be incorrect., Picture 

You can also study when a function is being called: 

Picture 1, Picture 

A screenshot of a computer

AI-generated content may be incorrect., Picture 

The second method is to directly analyze the whole conversation from Livechat (with system messages enabled) 

Here you can see which AI Agent is being utilized in the flow: 

A screenshot of a chat

AI-generated content may be incorrect., Picture 

You can also see when a function is being called 

A screenshot of a chat

AI-generated content may be incorrect., Picture 

Hovering over this reveals the arguments and outputs processed by this function 

A screenshot of a message

AI-generated content may be incorrect., Picture 

Similarly you can also see when user fields are being filled. 

A close-up of a list

AI-generated content may be incorrect., Picture 


    • Related Articles

    • Live Chat Feature : Conversation Starter Prompt

      OCP now provides even more flexibility to live-agents. We now give users the ability to choose what starts/restarts a conversation. Previously, whenever the agent marks a conversation “Done”. The conversation is moved to the done folder, however if ...
    • Introduction to Click To WhatsApp Ads

      In the current landscape, direct-to-consumer brands are grappling with a common challenge: rising customer acquisition costs on social media platforms like Facebook and Instagram, without a corresponding increase in conversion efficiency. Enter Click ...
    • Front Live Chat

      OCP now allows its users to integrate the Front platform as a live chat integration option and users can allow their agents to chat with the customers from the familiarity of the Front platform. Front Integration will require you to upgrade to a ...
    • GHL/Airchatty Live Chat Integration

      OCP now lets its users integrate GHL/Airchatty as a live chat portal. This not only gives live agents more flexibility and comfort but also increases the access of GHL audience to channels that are not natively supported by GoHighLevel. The current ...
    • Line Business Account Registration

      How to register for Line Business Account Connecting the Line Business Account with OCP is a slightly difficult task. This guide will provide a step-by-step walkthrough of registering and accessing the Messaging API information inside Line Business ...