This topic specifies how to work with Contineo's entity data and perform Create, Read, Update, and Delete (CRUD) operations by using NeoPilot.
Contextual Agents - Working with Application Data
NeoPilot uses LLM capabilities to provide you seamless integration with the low code no code Contineo platform. You can use several pre-built components from Agent builder and pipeline builder to perform standard CRUD operations on the Contineo's entity data.
By using the Contineo platform, you can create various fully functional applications without writing much programming. If you incorporate LLM when creating your application in Contineo, it can create applications with much speed and lesser efforts.
Perform the following steps to insert the data provided at NeoPilot's agent in the Contineo's entity.
Agent Builder Components
You must use the following components to create an agent.
Add the Widget component to create a default widget where you can provide your inputs.
Add the Display Message component to display an initial message to ask user to provide Contineo entity's name and description.
Whenever a user adds a message in the chat window, send that data to the pipeline for processing it with LLM capabilities. Use the Custom Script component to send the data to pipeline.
Add the Call GenAI Pipeline to call the pipeline to process the input message.
When the pipeline execution is completed, the control returns back to the agent. Use the Custom Script component to insert the data into Contineo's entity.
Finally, display some confirmation message to the user by using the Display Message component.
The final agent looks something las follows:
Pipeline Builder Components
When you pass the data to the pipeline, you can take the help of LLM to generate a JSON object and then return it to the Agent Builder.
Use the Generate Text component to interact with LLM. You can provide the following input to it:
Provide the following as System Prompt:
You are a data extraction assistant. Your job is to extract specific fields from natural language input and return a strict JSON object with only the required keys, without any additional text, formatting, or explanation.
Provide the following as Prompt:
Extract the main entity name and its description from the given input text. Return a JSON object with exactly two keys: "name" and "description".
- The "name" should be the primary entity, person, or subject mentioned
- The "description" should be all relevant information about that entityFormat your response as a valid JSON object:
{
"name": "extracted name",
"description": "extracted description"
}
Do not include any explanations, preambles, or additional text before or after the JSON.
Ensure the output is properly formatted JSON that would pass validation.
Here's the input:
{0}
The Generate Text component returns the JSON data which can contain some additional characters such as \n, single quotes, and so on. The JSON data is not usable directly and you need to convert this textual data in the JSON object format. Use the Get JSON from String component to generate well formatted JSON object from the textual data.
When the pipeline execution is completed, the control of the agent is returned back to the agent builder. You can call the pipeline by using the Call GenAI Pipeline component. However, you must publish the pipeline for accessing it in the agent builder.
Similarly, you can perform the similar steps to perform Read, Update, and Delete operations. You just need to change the Custom Script component from the agent builder and the prompts in the Generate Text component in the pipeline builder.
Read Operation
For Read operation, use the following script in the Custom Script component.
// READ - Get a task by IDconst getTaskData = { "id": "2018717023" // Replace with the actual task ID};// Execute the API callexecuteDataAPI( "task/get", getTaskData, null, (response) => { console.log("Task retrieved successfully:", response); }, (error) => { console.error("Error retrieving task:", error); });Update Operation
For update operation, use the following script in the Custom Script component.
// UPDATE - Update an existing taskconst updateTaskData = { "id": "2018717023", // Replace with the actual ID you want to update "name": "Updated Task Name", "dueDate": "2025-04-20T00:00:00Z", "description": "This is an updated task description"};// Execute the API callexecuteDataAPI( "task/update", updateTaskData, null, (response) => { console.log("Task updated successfully:", response); }, (error) => { console.error("Error updating task:", error); });Delete Operation
For the delete operation, use the following script in the Custom Script component.
// DELETE - Delete a taskconst deleteTaskData = { "id": "2018717023" // Replace with the actual ID you want to delete};// Execute the API callexecuteDataAPI( "task/delete", deleteTaskData, null, (response) => { console.log("Task deleted successfully:", response); }, (error) => { console.error("Error deleting task:", error); });