1. Home
  2. Integrations
  3. AI Copilot

AI Copilot

Speed up integration building with Sensedia AI Copilot

Sensedia AI Copilot is an AI assistant specialized in Camel integrations in YAML DSL format. With this tool, you can create or edit Camel integration scripts quickly, reducing development time and increasing efficiency.

IMPORTANT
  • Sensedia AI Copilot is currently in beta version. This means the functionality is still evolving and may undergo adjustments.

  • Enable the Use AI Chat for Source Code Generation permission in Access Control to use this functionality.

To use Sensedia AI Copilot:

Click the AI Copilot icon in the lower right corner of the Source screen, in the Source Code tab.

Enter the prompt with instructions to create or edit an integration and click the arrow on the right to send it.

Copy the generated code by clicking the copy icon in the right corner of the conversation box.

Insert the script into the main.yaml code editor.

IMPORTANT

The conversation history will be automatically deleted when you leave the Source screen.

Creating prompts

It is very important that the prompt is clear and specific to get the best results. Here are some tips for creating effective prompts:

  • Camel Components: explicitly mention the Camel components you want to use and the purpose of each one in the integration route.

    Examples

    • Create a route that starts with a timer component to execute every 10 seconds.
    • Use the http component to make a GET call to an external API.
    • Send the result to a queue using the kafka component.
  • Enterprise Integration Patterns (EIPs): specify the EIPs that the route should implement and what should be done at each step.

    Examples

    • Use the setProperty EIP to extract the clientId field from the JSON body and store it as an exchange property called idClienteProp.
    • Use the setHeader EIP to define a header called StatusProcessamento with the initial value RECEBIDO.
    • Use the setBody EIP to transform the message body, selecting only the item and quantidade fields from the original JSON using a simple expression.
  • Systems and endpoints involved: describe the source and destination systems, including their respective endpoints (URIs), when possible.

    Examples

    • Read from a Kafka queue called pedidos_novos.
    • Send to a POST request to the endpoint http://api.parceiro.com/webhook.
    • Write to a file in the /opt/arquivos/processados directory.
TIP

The more details you provide, the more accurate the generated script will be.

IMPORTANT

Resources files and flow variables must be created manually, but Sensedia AI Copilot can suggest their content.

Examples

Check out prompt examples you can use as reference:

IMPORTANT

The examples below are organized into topics for faster and more fluid reading, but you should type your prompt in continuous text, without line breaks.

SQS to HTTP with JSLT transformation and DLQ

  • I want to create an integration that consumes messages from an AWS SQS queue.
  • For each message, which is in JSON format, transform it using a JSLT template.
  • Then, send the transformed JSON in an HTTP POST request.
  • If the HTTP call results in an error, log the error message and the original message body.
  • Then, send the original SQS message to an SQS dead-letter queue.
  • Use placeholders for AWS accessKey and secretKey.

REST API with JSON validation and HTTP enrichment

  • Build an integration with REST API endpoint POST /orders that accepts a JSON payload.
  • First, validate the payload against a JSON schema.
  • If validation fails, respond with HTTP 400 and a JSON error body.
  • If valid, extract the customerId and orderId from the payload. Log these IDs.
  • Then, enrich the original message by calling an external HTTP GET service.
  • Store the response from this service (JSON) in a property.
  • Finally, build a new JSON response body combining the original order and the customerDetails.
  • Log the modified body and return HTTP 200.

Conditional order processing via REST with Camel and Slack

  • Create an integration that exposes a REST POST endpoint at /api/pedidos.
  • Upon receiving a request, first log the received message.
  • Then, evaluate whether the statusPedido property in the request body (JSON) equals CONCLUĂŤDO.
  • If this condition is true, send the original request payload to another HTTP POST endpoint.
  • Otherwise, if the condition is false, send a message on Slack with the text Order with ID is not CONCLUĂŤDO.

Additional tips

  • Specify flow structure: detail as much as possible the components of the desired flow.
  • Use clear and direct instructions: provide objective commands about the specific section or complete route to be generated by AI.
  • Mention specific connectors: indicate the names of connectors that should be used, if you already know them.
  • Break down complex prompts: for elaborate requests, divide the request into smaller steps and request adjustments from AI as needed.

How happy are you with this page?

We use cookies to enhance your experience on our site. By continuing to browse, you agree to our use of cookies.Learn more