Introduction
Welcome to this simple example of invoking an OCI Gen AI Agent from OIC. This post will introduce GenAI Agents and how to leverage them from your integrations.
According to the docs - OCI Generative AI Agents is a fully managed service that combines the power of large language models (LLMs) with AI technologies to create intelligent virtual agents that can provide personalized, context-aware, and highly engaging customer experiences.
So let's get started with a simple example. I will create an agent that will assist in processing expenses.
Create the OCI GenAI Agent
The menu from Gen AI Agents above gives us an idea of how this will be done. Firstly, I need a knowledge base, e.g. corporate rules around expenses. We will use the following rules from Commiskey Inc.
This is my knowledge base and I'll make it available to the Agent via OCI Object Storage - I created the Knowledge Base - with its data source - The Ingestion Job pulling in the file from Object Storage - I then created the Agent - The Agent also has an endpoint, which will receive requests - I copy the endpoint ocid, as I will need this later.Let's try out the Chat function -Looks good, so now to leveraging the Agent from OIC. But first, let's take a look at the apis we will be invoking from OIC.
OCI GenAI Agent REST APIs
As you can see there are 2 groups of api, consider these management and runtime.
Management APIs
Runtime APIs
Creating the Connections in OIC
OIC Invoking the Runtime/Client APIs
createSession configuration
Summa Summarum