---
schema_version: "1"
id: 98bf65ff5bb77239471319a4e54bcc0f276237873b5c84df9daeaba7223bf6f8
title: MuleSoft AI Chain Connector 1.0 Reference
collection: mulesoft
version: current
locale: en-us
portal_url: https://docs.salesforce.com/mulesoft/current/en-us/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-reference.md
canonical_url: https://docs.mulesoft.com/mulesoft-ai-chain-connector/1.0/mulesoft-ai-chain-connector-reference
source_site: docs.mulesoft.com
content_type: documentation
content_hash: 46a4d8fe2469ff4a5253c792714df33b94ca2dde612e3b2dac8196984ce6a683
description: MuleSoft Documentation Site
release: "1.0"
latest: false
---
---
product: MuleSoft AI Chain Connector
version: 1.0
---

# MuleSoft AI Chain Connector 1.0 Reference

> For the full documentation index, see: https://docs.mulesoft.com/llms.txt

Support for MuleSoft AI Chain Connector 1.0 ends on October 30, 2026. Use one of the other available
[MuleSoft AI connectors](https://docs.mulesoft.com/general/learning-map-mulesoft-ai) based on your requirements.

The main class of an extension, is the entry point from which configurations, connection providers,
operations and sources are declared.

## Configuration

Default Configuration for MuleSoft AI Chain Connector.

### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name for this configuration. Connectors reference the configuration with this name.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>LLM type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Large Language Model type:</p></div><div><ul><li><p>Anthropic</p></li><li><p>Azure OpenAI</p></li><li><p>GroqAI</p></li><li><p>Hugging Face</p></li><li><p>Mistral AI</p></li><li><p>Ollama</p></li><li><p>OpenAI</p></li></ul></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Config Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Configuration type:</p></div><div><ul><li><p>Environment Variables</p></li><li><p>Configuration JSON</p></li></ul></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>File Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>File path.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Model Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Supported model for the chosen LLM.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Temperature</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Controls the randomness of the output.</p></div></div></td><td><div><div><p>0.7</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>LLM timeout</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Timeout for the LLM request.</p></div></div></td><td><div><div><p>60 seconds</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>LLM timeout unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><div><div><p>Time unit to use for the LLM timeout.</p></div></div></td><td><div><div><p>SECONDS</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Tokens</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Defines the number of LLM tokens to use when generating a response.</p></div></div></td><td><div><div><p>500</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>ID used to reference this configuration.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Expiration Policy</strong></p></td><td><div><div><p><a href="#ExpirationPolicy">Expiration Policy</a></p></div></div></td><td><div><div><p>Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

## Supported Operations

- [AGENT Define Prompt Template](#AgentDefinePromptTemplate)

- [CHAT Answer Prompt](#ChatAnswerPrompt)

- [CHAT Answer Prompt With Memory](#ChatAnswerPromptWithMemory)

- [EMBEDDING Get Info From Store](#EmbeddingGetInfoFromStore)

- [EMBEDDING Get Info From Store Legacy](#EmbeddingGetInfoFromStoreLegacy)

- [IMAGE Generate](#ImageGenerate)

- [IMAGE Read](#ImageRead)

- [IMAGE Read Scanned Documents](#ImageReadScannedDocuments)

- [RAG Load Document](#RagLoadDocument)

- [SENTIMENT Analyze](#SentimentAnalyze)

- [TOOLS Use Ai Service](#ToolsUseAiService)

- [TOOLS Use Ai Service Legacy](#ToolsUseAiServiceLegacy)

## Operations

### AGENT Define Prompt Template

`<ms-aichain:agent-define-prompt-template>`

Helps in defining an AI Agent configured with a prompt template

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Dataset</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to the user query to act upon.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Template</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to sample template used by LLM to respond adequately to the user queries.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Instructions</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>This provides instructions to the LLM about how to understand and respond to the user queries.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>Non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

### For Configurations

- [Configuration](#Config)

### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

### CHAT Answer Prompt

`<ms-aichain:chat-answer-prompt>`

Implements a simple Chat agent to enable chat with the LLM.

### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Prompt</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>User-defined prompt query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

### For Configurations

- [Configuration](#Config)

### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

### CHAT Answer Prompt With Memory

`<ms-aichain:chat-answer-prompt-with-memory>`

Implements a chat memory for a defined LLM as an AI Agent. The memoryName allows the multichannel
profile design.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to the user prompt.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Memory Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the memory to fetch for further processing by the LLMs.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Db File Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Location of the file containing the memory.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Max Messages</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Maximum number of messages to analyze for that memory.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING Get Info From Store

`<ms-aichain:embedding-get-info-from-store>`

Reads information via prompt from embedding store (in-Memory), which is imported from the storeName
(full path)

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt or query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the store to query.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Get Latest</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Determines whether to freshly fetch the store from the location.</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING Get Info From Store Legacy

`<ms-aichain:embedding-get-info-from-store-legacy>`

Reads information via a prompt from the embedding store (in-Memory), which is imported from the
storeName (full path).

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt or query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the store to query.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Get Latest</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Determines whether to freshly fetch the store from the location.</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### IMAGE Generate

`<ms-aichain:image-generate>`

Generates an image based on the prompt in data.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:IMAGE\_ANALYSIS\_FAILURE

- MS-AICHAIN:IMAGE\_GENERATION\_FAILURE

- MS-AICHAIN:IMAGE\_PROCESSING\_FAILURE

### IMAGE Read

`<ms-aichain:image-read>`

Reads an image from a URL and provides the responses for the user prompts.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Context URL</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Image URL to analyze.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:IMAGE\_ANALYSIS\_FAILURE

- MS-AICHAIN:IMAGE\_GENERATION\_FAILURE

- MS-AICHAIN:IMAGE\_PROCESSING\_FAILURE

### IMAGE Read Scanned Documents

`<ms-aichain:image-read-scanned-documents>`

Reads scanned documents and converts to response as prompted by the user.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>File Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Path to the file to analyze.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#ScannedDocResponseAttributes">Scanned Doc Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:IMAGE\_ANALYSIS\_FAILURE

- MS-AICHAIN:IMAGE\_GENERATION\_FAILURE

- MS-AICHAIN:IMAGE\_PROCESSING\_FAILURE

### RAG Load Document

`<ms-aichain:rag-load-document>`

Enables the user to query the doc provided in natural language. The doc is embedded into an
in-memory vector store.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Defines the query input provided by the user.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Context Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Defines the file path that is embedded.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>File Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div></div></td><td><div><div><p>text</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### SENTIMENT Analyze

`<ms-aichain:sentiment-analyze>`

Analyzes the sentiment of the user data.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to the user input to analyze.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

### TOOLS Use Ai Service

`<ms-aichain:tools-use-ai-service>`

(AI Services) Usage of tools by a defined AI Agent. Provides a list of tools (APIs) with all the
required information (endpoint, headers, body, method, and so on) to the AI Agent to use.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt or query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Tool Config</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Contains the configuration required by the LLM to enable calling tools.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p><a href="#LlmResponseAttributes">LLM Response Attributes</a></p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### TOOLS Use Ai Service Legacy

`<ms-aichain:tools-use-ai-service-legacy>`

(Legacy) Usage of tools by a defined AI Agent. Provide a list of tools (APIs) with all the required
information (endpoint, headers, body, method, and so on) to the AI Agent to use.

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Configuration</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the configuration to use.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Data</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt or query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Tool Config</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Contains the configuration required by the LLM to enable calling tools.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Config Ref</strong></p></td><td><div><div><p>ConfigurationProvider</p></div></div></td><td><div><div><p>Name of the configuration to use to execute this component.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### For Configurations

- [Configuration](#Config)

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING Add Document To Store

`<ms-aichain:embedding-add-document-to-store>`

Add document of type text, any and URL to the embedding store (in-memory), which is exported to the
defined storeName (full path).

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the embedding store.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Context Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to the location of the file to process.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Max Segment Size In Chars</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Max allowed size of continuous sequence of characters while embedding.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Max Overlap Size In Chars</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Max size of overlapping characters allowed while embedding.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>File Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div></div></td><td><div><div><p>text</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING Add Folder To Store

`<ms-aichain:embedding-add-folder-to-store>`

Add document of type text, any and URL to the embedding store (in-memory), which is exported to the
defined storeName (full path).

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the embedding store.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Context Path</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Refers to the location of the folder to process.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Max Segment Size In Chars</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Max allowed size of continuous sequence of characters while embedding.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Max Overlap Size In Chars</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Max size of overlapping characters allowed while embedding.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>File Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div></div></td><td><div><div><p>text</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING New Store

`<ms-aichain:embedding-new-store>`

Create a new embedding store (in-memory), which is exported to the defined storeName (full path).

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the embedding store.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

### EMBEDDING Query From Store

`<ms-aichain:embedding-query-from-store>`

Query information from the embedding store (in-Memory), which is imported from the storeName (full
path)

#### Parameters

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Name</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Store Name</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the embedding store.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Question</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The user prompt or query.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Results</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Max results to retrieve from the store.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Min Score</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Filters the response with this minScore.</p></div></div></td><td><div></div></td><td><div><div><p>x</p></div></div></td></tr><tr><td><p><strong>Get Latest</strong></p></td><td><div><div><p>Boolean</p></div></div></td><td><div><div><p>Determines whether to freshly fetch the store from the location.</p></div></div></td><td><div><div><p>false</p></div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Mime Type</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The MIME type of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Encoding</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>The encoding of the payload that this operation outputs.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Streaming Strategy</strong></p></td><td><div><div><ul><li><p><a href="#RepeatableInMemoryStream">Repeatable In-Memory Stream</a></p></li><li><p><a href="#RepeatableFileStoreStream">Repeatable File Store Stream</a></p></li><li><p>non-repeatable-stream</p></li></ul></div></div></td><td><div><div><p>Configures how Mule processes streams. Repeatable streams are the default behavior.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Variable</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Name of the variable that stores the operation’s output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Target Value</strong></p></td><td><div><div><p>String</p></div></div></td><td><div><div><p>Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.</p></div></div></td><td><div><div><p>#[payload]</p></div></div></td><td><div></div></td></tr></tbody></table>

#### Output

<table><colgroup><col> <col></colgroup><tbody><tr><td><p>Type</p></td><td><p>Any</p></td></tr><tr><td><p>Attributes Type</p></td><td><div><div><p>Object</p></div></div></td></tr></tbody></table>

#### Throws

- MS-AICHAIN:AI\_SERVICES\_FAILURE

- MS-AICHAIN:EMBEDDING\_OPERATIONS\_FAILURE

- MS-AICHAIN:FILE\_HANDLING\_FAILURE

- MS-AICHAIN:RAG\_FAILURE

- MS-AICHAIN:TOOLS\_OPERATION\_FAILURE

## Types

### Expiration Policy

Configures an expiration policy strategy.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Max Idle Time</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Time Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>NANOSECONDS</p></li><li><p>MICROSECONDS</p></li><li><p>MILLISECONDS</p></li><li><p>SECONDS</p></li><li><p>MINUTES</p></li><li><p>HOURS</p></li><li><p>DAYS</p></li></ul></div></div></td><td><div><div><p>Time unit for the <strong>Max Idle Time</strong> field.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### LLM Response Attributes

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Additional Attributes</strong></p></td><td><div><div><p>Object</p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Token Usage</strong></p></td><td><div><div><p><a href="#token-usage">Token Usage</a></p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Token Usage

Token usage metadata returned as attributes.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Input Count</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Number of tokens used to process the input.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Output Count</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Number of tokens used to generate the output.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Total Count</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Total number of tokens used for input and output.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Repeatable In-Memory Stream

Configures the in-memory streaming strategy by which the request fails if the data exceeds the MAX
buffer size. Always run performance tests to find the optimal buffer size for your specific use
case.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Initial Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by <strong>Buffer Size Increment</strong>, with an upper limit of <strong>Max Buffer Size</strong>.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Size Increment</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Amount by which the buffer size expands if it exceeds its initial size. Setting a value of <code>0</code> or lower specifies that the buffer can’t expand.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Max Buffer Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>The maximum amount of memory to use. If more than that is used then a <code>STREAM_MAXIMUM_SIZE_EXCEEDED</code> error is raised. A value lower than or equal to zero means no limit.</p></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>Unit for the <strong>Initial Buffer Size</strong>, <strong>Buffer Size Increment</strong>, and <strong>Max Buffer Size</strong> fields.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Repeatable File Store Stream

Configures the repeatable file-store streaming strategy by which Mule keeps a portion of the stream
content in memory. If the stream content is larger than the configured buffer size, Mule backs up
the buffer’s content to disk and then clears the memory.

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>In Memory Size</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div><div><p>Maximum amount of memory that the stream can use for data. If the amount of memory exceeds this value, Mule buffers the content to disk. To optimize performance:</p></div><div><ul><li><p>Configure a larger buffer size to avoid the number of times Mule needs to write the buffer on disk. This increases performance, but it also limits the number of concurrent requests your application can process, because it requires additional memory.</p></li><li><p>Configure a smaller buffer size to decrease memory load at the expense of response time.</p></li></ul></div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Buffer Unit</strong></p></td><td><div><div><p>Enumeration, one of:</p></div><div><ul><li><p>BYTE</p></li><li><p>KB</p></li><li><p>MB</p></li><li><p>GB</p></li></ul></div></div></td><td><div><div><p>Unit for the <strong>In Memory Size</strong> field.</p></div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Scanned Doc Response Attributes

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Additional Attributes</strong></p></td><td><div><div><p>Object</p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Scanned Doc Attributes</strong></p></td><td><div><div><p>Array of <a href="#DocResponseAttribute">Doc Response Attribute</a></p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

### Doc Response Attribute

<table><colgroup><col> <col> <col> <col> <col></colgroup><thead><tr><th>Field</th><th>Type</th><th>Description</th><th>Default Value</th><th>Required</th></tr></thead><tbody><tr><td><p><strong>Page</strong></p></td><td><div><div><p>Number</p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr><tr><td><p><strong>Token Usage</strong></p></td><td><div><div><p><a href="#token-usage">Token Usage</a></p></div></div></td><td><div></div></td><td><div></div></td><td><div></div></td></tr></tbody></table>

## See Also

- [Using Anypoint Code Builder to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-acb)

- [Using Studio to Configure a Connector](https://docs.mulesoft.com/connectors/introduction/intro-config-use-studio)

- [MuleSoft AI Chain Connector Overview](https://docs.mulesoft.com/mulesoft-ai-chain-connector/1.0/)

- [Salesforce Help](https://help.salesforce.com)
