MuleSoft AI Chain Connector 1.0 Reference | MuleSoft Documentation
# MuleSoft AI Chain Connector 1.0 Reference
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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
Name for this configuration. Connectors reference the configuration with this name.  
Large Language Model type:
  * Anthropic
  * Azure OpenAI
  * Mistral AI
  * Ollama
  * OpenAI
  * GroqAI

  
**Config Type** |  Configuration type:
  * Environment Variables
  * Configuration JSON

  
**Model Name** |  Supported model for the chosen LLM.  
**Temperature** |  Controls the randomness of the output.  
**LLM timeout** |  Timeout for the LLM request.  
**LLM timeout unit** |  Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit to use for the LLM timeout.  
**Max Tokens** |  Defines the number of LLM tokens to use when generating a response.  
ID used to reference this configuration.  
**Expiration Policy** |  Expiration Policy |  Configures the minimum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.  
## Supported Operations
  * AGENT Define Prompt Template
  * CHAT Answer Prompt
  * CHAT Answer Prompt With Memory
  * EMBEDDING Get Info From Store
  * EMBEDDING Get Info From Store Legacy
  * IMAGE Generate
  *   * IMAGE Read Scanned Documents
  * RAG Load Document
  * SENTIMENT Analyze
  * TOOLS Use Ai Service
  * TOOLS Use Ai Service Legacy


## Operations
### AGENT Define Prompt Template
`<ms-aichain:agent-define-prompt-template>`
Helps in defining an AI Agent configured with a prompt template
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
Refers to the user query to act upon.  
Refers to sample template used by LLM to respond adequately to the user queries.  
**Instructions** |  This provides instructions to the LLM about how to understand and respond to the user queries.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * Non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
### For Configurations
  * Configuration


### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
User-defined prompt query.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
### Output
Attributes Type |  LLM Response Attributes  
---|---  
### For Configurations
  * Configuration


### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
Refers to the user prompt.  
**Memory Name** |  Name of the memory to fetch for further processing by the LLMs.  
**Db File Path** |  Location of the file containing the memory.  
**Max Messages** |  Maximum number of messages to analyze for that memory.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt or query.  
**Store Name** |  Name of the store to query.  
**Get Latest** |  Determines whether to freshly fetch the store from the location.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt or query.  
**Store Name** |  Name of the store to query.  
**Get Latest** |  Determines whether to freshly fetch the store from the location.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### For Configurations
  * Configuration
### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt or query.  
**Store Name** |  Name of the store to query.  
**Get Latest** |  Determines whether to freshly fetch the store from the location.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt.  
**Context URL** |  Image URL to analyze.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt.  
Path to the file to analyze.  
**Output Mime Type** |  MIME type of the payload that this operation outputs.  
**Output Encoding** |  Encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  Scanned Doc Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
Defines the query input provided by the user.  
**Context Path** |  Defines the file path that is embedded.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
Refers to the user input to analyze.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### Throws
  * MS-AICHAIN:AI_SERVICES_FAILURE
### SENTIMENT Analyze
`<ms-aichain:sentiment-analyze>`
Analyzes the sentiment of the user data.
#### Parameters
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
Refers to the user input to analyze.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt or query.  
**Tool Config** |  Contains the configuration required by the LLM to enable calling tools.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type |  LLM Response Attributes  
---|---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Configuration** |  Name of the configuration to use.  
The user prompt or query.  
**Tool Config** |  Contains the configuration required by the LLM to enable calling tools.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Config Ref** |  ConfigurationProvider |  Name of the configuration to use to execute this component.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### For Configurations
  * Configuration


#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Store Name** |  Name of the embedding store.  
**Context Path** |  Refers to the location of the file to process.  
**Max Segment Size In Chars** |  Max allowed size of continuous sequence of characters while embedding.  
**Max Overlap Size In Chars** |  Max size of overlapping characters allowed while embedding.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Store Name** |  Name of the embedding store.  
**Context Path** |  Refers to the location of the folder to process.  
**Max Segment Size In Chars** |  Max allowed size of continuous sequence of characters while embedding.  
**Max Overlap Size In Chars** |  Max size of overlapping characters allowed while embedding.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Store Name** |  Name of the embedding store.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Store Name** |  Name of the embedding store.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### 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
Name | Type | Description | Default Value | Required  
---|---|---|---|---  
**Store Name** |  Name of the embedding store.  
The user prompt or query.  
**Max Results** |  Max results to retrieve from the store.  
Filters the response with this minScore.  
**Get Latest** |  Determines whether to freshly fetch the store from the location.  
**Output Mime Type** |  The MIME type of the payload that this operation outputs.  
**Output Encoding** |  The encoding of the payload that this operation outputs.  
**Streaming Strategy** | 
  * Repeatable In-Memory Stream
  * Repeatable File Store Stream
  * non-repeatable-stream

|  Configures how Mule processes streams. Repeatable streams are the default behavior.  
**Target Variable** |  Name of the variable that stores the operation’s output.  
**Target Value** |  Expression that evaluates the operation’s output. The expression outcome is stored in the target variable.  
#### Output
Attributes Type  
---  
#### 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.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Max Idle Time** |  Configures the maximum amount of time that a dynamic configuration instance can remain idle before Mule considers it eligible for expiration.  
Enumeration, one of:
  * NANOSECONDS
  * MICROSECONDS
  * MILLISECONDS
  * SECONDS
  * MINUTES
  * HOURS

|  Time unit for the **Max Idle Time** field.  
### LLM Response Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Additional Attributes**  
**Token Usage**  
### Token Usage
Token usage metadata returned as attributes.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Input Count** |  Number of tokens used to process the input.  
**Output Count** |  Number of tokens used to generate the output.  
**Total Count** |  Total number of tokens used for input and output.  
### 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.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Initial Buffer Size** |  Initial amount of memory to allocate to the data stream. If the streamed data exceeds this value, the buffer expands by **Buffer Size Increment** , with an upper limit of **Max Buffer Size**.  
**Buffer Size Increment** |  Amount by which the buffer size expands if it exceeds its initial size. Setting a value of `0` or lower specifies that the buffer can’t expand.  
**Max Buffer Size** |  The maximum amount of memory to use. If more than that is used then a `STREAM_MAXIMUM_SIZE_EXCEEDED` error is raised. A value lower than or equal to zero means no limit.  
**Buffer Unit** |  Enumeration, one of: |  Unit for the **Initial Buffer Size** , **Buffer Size Increment** , and **Max Buffer Size** fields.  
### 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.
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**In Memory Size** |  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:
  * 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.
  * Configure a smaller buffer size to decrease memory load at the expense of response time.

  
**Buffer Unit** |  Enumeration, one of: |  Unit for the **In Memory Size** field.  
### Scanned Doc Response Attributes
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Additional Attributes**  
**Scanned Doc Attributes** |  Array of Doc Response Attribute  
### Doc Response Attribute
Field | Type | Description | Default Value | Required  
---|---|---|---|---  
**Token Usage**  
## See Also
  * Using Anypoint Code Builder to Configure a Connector
  * Using Studio to Configure a Connector
  * MuleSoft AI Chain Connector Overview
  * MuleSoft Help Center