Skip to main content
The External AI agent node connects to your flow an AI agent that already lives outside Jelou. Jelou keeps the channel, security and the log of every turn; your agent decides the reply.
The node is being rolled out gradually; if you don’t see it on the canvas, ask your Jelou account executive to turn it on.

How to add the node

Both kinds of AI agent are added from the same entry point: the AI Agent item in the builder’s toolbar. Its behavior changes depending on how you use it:
  • Click: adds a normal AI Agent node: Jelou’s own AI agent.
  • Hover: opens a selector of external AI agent providers. Picking a provider adds an External AI agent node preconfigured for that provider.
External AI agent selector that appears when hovering over the AI Agent toolbar item
This selector works the same way as the payment gateway picker in the Payments node: you pick the provider first and the node arrives with its fields already organized.
Once added, the External AI agent node connects to the rest of your flow through its four outputs, same as any other node:
External AI agent node in a flow, connected by its four outputs to an answer message, a question, a handoff to a human and an apology message

AI Agent or external AI agent

Choose based on where the agent lives. To build one inside Jelou, use the AI Agent node (general guide).

Available providers

Each provider asks for its own fields, taken directly from its console, and validates them as you type. Credentials are selected by the name of the organization secret that stores them; the secret’s value is never shown or saved in the flow.

One task or several turns

When you configure the node, you choose how it interacts with your agent:
  • One task: the node sends the task once, receives the answer and exits the node.
  • Several turns: the node keeps the conversation going with the agent, message by message, until the agent ends it or hands it off. While the agent answers without ending the conversation, the node doesn’t take any output: it delivers the messages to the user and waits for their next message to continue with the agent.
External AI agent node configuration with the Several turns interaction selected

Example: one task

The node receives the answer, delivers it to the user and exits through Answered. There’s no second round with the agent: any later message from the user no longer goes through this node.

Example: several turns

The node stays active between the first and second messages: it doesn’t take any output until the agent ends the conversation. Only then does it exit through Answered.

Node outputs

The External AI agent node has four outputs:
Comparison of two External AI agent nodes, one configured over A2A and one over Amazon Bedrock Agents, showing the same four outputs
Connect each output to whatever should happen in your flow. A typical pattern:
  • Answered → the agent’s message was already delivered; continue the flow or end it.
  • Needs more information → a question node that collects the missing piece and calls the agent again.
  • Hand off to an operator → your handoff node to the Inbox.
  • Something went wrong → an apology message and, if it applies, a retry or a handoff to an operator.

The “Save the answer in” variable

Every External AI agent node has a Save the answer in field (agentReply by default) where the agent’s answer is written. You can reference it in later nodes of the flow with the usual variable syntax, for example {{$context.agentReply}} in a message node or a condition. If the agent also sends structured data (for example through custom HTTP’s data path, or a variables_set signal), that data is written as individual context variables of the flow, available to any later node.

Authentication and organization secrets

Each provider supports one or more credential schemes, depending on what its API accepts: In every case, the node only stores the organization secret’s name, never its value. The secret is resolved at call time and is never shown or saved in the flow.

Enterprise options for custom HTTP

When your agent uses HTTP (Jelou turn contract) or custom HTTP, your company may have access to additional options:
Connection tab of the External AI agent node with the agent URL, authentication, mTLS certificate, HMAC signing and fixed headers
Advanced tab of the External AI agent node with the turn timeout and the number of attempts
These options are available on Enterprise plans. If you don’t see them on your node, ask your Jelou account executive to check your plan.

HMAC signing: what’s signed and how to verify it

When you turn on request signing, Jelou computes an HMAC-SHA256 over the exact request body (the same bytes sent) using the secret you choose, and sends it in a header: Your own server can verify the signature like this (Node.js, body-only variant):
Always verify against the request’s raw body, before your framework parses it into JSON. Re-serializing the parsed JSON can change property order or spacing and make the signature not match even though the content is the same.
The Task field accepts variables. To send the user’s message to the agent, use {{$message.text}}: it holds the text of the message that reached the flow. {{$input.message}} is not a message variable: $input only holds the data your flow collected (for example, with an Input node), so it comes out empty when the node runs from a chat message.

Pre-request and post-response scripts

Scripts run in the same secure sandbox the API node uses, and only apply to HTTP providers. They’re configured in the node’s Transform tab, next to the task that’s sent and the variable where the answer is saved:
Transform tab of the External AI agent node with the Task field, the Save the answer in variable, and the Pre Request / Post Request editor
Pre-request script: $context.get("agentRequest") holds { task, sessionId, body, headers }. The script can change agentRequest.body or agentRequest.headers before Jelou sends the request. For example, to wrap the body in your company’s own envelope:
Post-response script: $context.get("agentResponse") holds { status, body }. The script must leave in agentResponse.body the object the response mapping then reads (the textPath, dataPath, sessionIdPath paths, etc.).
An error thrown by the script fails the turn through the node’s error output. Script changes never touch the flow’s own variables: they only change what Jelou sends or reads for this call.

Reply later (acknowledges, replies later)

Some external agents don’t answer inside the same call: they acknowledge that they received the message and send their answer later, on their own. For that case, the External AI agent node has an optional mode. It is off by default, so an existing node behaves exactly as before. The How the agent replies field appears on the Connection tab when the connection type is HTTP (Jelou turn contract) or Custom HTTP and the interaction is Several turns. It has two options:
  • In the same response (default): the agent answers inside the same call, as before.
  • Acknowledges, replies later: the agent acknowledges with any 2xx response. Jelou delivers nothing from the acknowledgement body and leaves the node waiting for the user’s next message, with the same session inactivity time. That message is forwarded to the agent within the same execution.
Connection tab of the External AI agent node with How the agent replies set to Acknowledges, replies later, the failure output notice, the token over the mTLS certificate switch and the signature prefix
With Custom HTTP, the Reply text path is no longer required in this mode, because no text from the body is delivered.

When the conversation ends

On the Advanced tab, these two optional fields appear only in this mode:
  • Field that ends the conversation: the path of the field in the acknowledgement body, for example status, data.state or items[0].s (up to 200 characters).
  • Values that end the conversation: 1 to 20 distinct values, separated by commas. It accepts text, integers and true or false. When the field holds one of them, the conversation ends and the flow continues through the Answered output.
Advanced tab of the External AI agent node with the field that ends the conversation and its values

Outputs you must connect

  • Always connect the Something went wrong output: it is the one the node takes when the wait expires without the user writing. Without that connection you can’t publish the flow.
  • Connect the Answered output only if you defined the field that ends the conversation. Without those fields it isn’t used.
  • The Hand off to an operator output is not required.
The node shows a warning on the canvas while a needed connection is missing.
When the wait expires, the flow continues through Something went wrong and Jelou sends the user no message. Connect that output to a silent End, with no error message.

Non-text messages

When the user sends an image, audio, a document, a WhatsApp Flow response, a button, a list or a location, the agent no longer receives an empty task. The task arrives as [type] caption (or just [type]), and the request includes an input.inbound object with the type, text, caption, file type and message id. Sensitive data is not sent by default. On the Transform tab, the Sensitive non-text message data the agent receives field lets you choose which to add:
  • File URL
  • Button or list reply
  • WhatsApp Flow response
  • Location
Check only what your agent needs: they can contain personal information. This applies to any connection type. Plain text and titled buttons are sent exactly as before.
Transform tab of the External AI agent node with the sensitive non-text message data the agent receives

Signature prefix

Some agents expect the HMAC signature with text in front of it, for example sha256= followed by the value. Under Sign requests, the Signature prefix (e.g. sha256=) field adds that literal text before the signature value. It accepts 1 to 32 characters: letters, digits and _ = . : / + -; spaces and templates are not allowed. The timestamp header is never prefixed. It applies to HTTP (Jelou turn contract) and Custom HTTP, and on every retry.

OAuth2 token over mTLS

If your agent uses OAuth2 client credentials and requires the client certificate to request the token too, choose an mTLS certificate and turn on Also request the token with the mTLS certificate. The token request goes over the same certificate as the agent call. The token URL must still be https. The switch appears only with that authentication and a chosen certificate; if you remove the certificate, it turns off. When off, the token is requested as usual.

The Jelou turn contract

When you pick HTTP (Jelou turn contract), your server receives and answers with a fixed shape Jelou already knows how to read, with no manual path mapping needed. This is what Jelou actually sent and received in a real test against an agent server, with the HMAC signature redacted:
On the second round of the same conversation, the agent already knows the order number and the node delivers the conversation as ended:
Agent's second answer
If your agent doesn’t speak exactly this contract, use custom HTTP: there you define the shape of the body that gets sent and the paths where Jelou should read the answer text, the structured data and the session id, in the node’s Transform tab.

Test connection

Before publishing your flow, use the Test connection button on the node’s Connection tab to check that everything is configured correctly, without waiting for a real user to trigger the node. The test runs a chain of checks, stopping at the first one that fails: If every check passes, you see a confirmation:
Test connection result when every check passes, with the message 'Connection OK'
If one fails, Jelou tells you which one and why, so you can fix the configuration before publishing. For example, when the agent rejects the credential:
Test connection result when a check fails, with the detail of what failed and why

Security

  • Credentials never leave your organization’s secrets. The node only stores the secret’s name; its value is never shown or saved in the flow.
  • HTTPS only. Jelou doesn’t call internal or private addresses.
  • Your agent’s answers go through Jelou’s same security checks as an AI Agent’s answers, before they reach the user: they’re screened like any other outbound message, with nothing extra to configure on the node.

Troubleshooting

Check Test connection first: it almost always points to whether the problem is the certificate, the secret, the token or the agent itself. The most common causes are an expired or revoked credential, a URL that stopped responding, or an agent answer that isn’t valid JSON or is missing the field expected at the configured path.
The node waits at most the configured turn timeout (25 seconds by default, up to 120 as a maximum). If your agent needs more time, raise the limit in the Advanced tab; if the agent fails intermittently, check retries: they only apply to timeouts, rate limits (HTTP 429) and server errors (5xx), never a request the agent explicitly rejected.
Always verify against the request’s raw body, before parsing the JSON (see the HMAC signing section above). Also confirm you’re using the same secret, the same encoding (hexadecimal or Base64), and, if you turned on timestamp.body, that you’re signing "{timestamp}.{body}" and not just the body.
That’s expected: that output only exists in one task mode. In several turns, when the agent needs an extra piece of information it simply asks for it as a normal message and the node keeps waiting for the user’s reply, without taking any output.
The node is being rolled out gradually. Ask your Jelou account executive to turn it on for your company.
These options are available on Enterprise plans. Ask your Jelou account executive to check your plan.

Availability

The External AI agent node is being rolled out gradually. If you don’t see it on your project’s canvas, contact your Jelou account executive to request its activation.

AI Agent node

General configuration of the AI Agent node.