---
title: AI Responses
slug: litmusedge/ai-responses
docTags: 
createdAt: 2026-08-26T15:45:53.866Z
---

The AI Responses processor sends messages to an AI model and returns the model's response. It keeps a rolling conversation history across calls for multi-turn dialogue. Beyond a single response, you can give it tools, files, skills, and a persistent memory, which turns it into an agent that reads live and historical data, calls external services, and remembers what it learns. Use it when a flow needs an AI model that holds context, acts on the system, or serves as an HTTP endpoint.

## How it works

The processor sends each incoming message to the configured AI model, along with the recent conversation history, and returns the model's response. **Max Message History&#x20;**&#x73;ets how many messages the processor keeps. When the history reaches that limit, each new message drops the oldest. This gives the model recent context without letting the history grow indefinitely.

The processor also copies an incoming `request_id` field to its output, so a Webhook in async mode, this processor, and a Webhook response form a loop that works out of the box. This turns the processor into an HTTP endpoint backed by an AI model.

## Model configuration

Set **AI Model** to the unique name of the model to use, and **AI Model Instructions** to the system prompt that shapes its behavior. **HTTP Timeout** caps how long the processor waits for a response, **Max Output Tokens** caps how much the model generates, and **File Download Timeout** caps how long the processor waits for files referenced in a response.

## Optional features

These capabilities run inside the model when it supports them:

- **Advanced Thinking / Reasoning** enables extended thinking mode.
- **Enable Web Search** lets the model search the web during generation.
- **Enable Code Execution** lets the model run code during generation.
- **Custom Tools** accepts a JSON array of tool descriptors that the processor appends to the request. The descriptor shape is vendor specific and passed through as is, so you can add MCP server entries or Anthropic skill, memory, and bash tool blocks.

## Context from AI Suite files

You attach reusable content from the AI Suite page and select it by checkmark. The processor reads these files fresh on every event, so edits take effect without a restart, and the processor skips a deleted file.

- **Skills** bundles skill files (`.md`, `.txt`) into the prompt, concatenated in selection order with per-file headers.
- **Instruction Files** prepends always-on guidance to the prompt.
- **Context Files** attaches images (jpeg, png, gif, or webp) and PDFs as multimodal content blocks, sent inline as base64. The request size limit is 50 MB on OpenAI and 32 MB on Anthropic.

## Local tools

:::hint{type="warning"}
**Caution:** The `litmus_cli` tool can call any SDK function the credential allows, including writes. Use scoped credentials so the model cannot make changes you did not intend.
:::

Local tools run inside the processor when the model calls them, in a loop bounded by **Max Tool Iterations** and the HTTP timeout. Raise **HTTP Timeout**, for example to `120`, when you enable any of them, and pair them with a skill file that teaches the model the conventions. The processor reports executed calls in the `tool_activity` output field.

- **Enable Litmus CLI Tool** exposes a `litmus_cli` tool that runs the Litmus Edge (LE) SDK CLI against this instance. **Litmus CLI Path** points at the binary, and **Litmus CLI Environment** provides the `EDGE_URL`, `EDGE_API_CLIENT_ID`, and `EDGE_API_CLIENT_SECRET` credentials as `KEY=VALUE` lines.
- **Enable DataHub Read Tool** exposes a read-only `datahub_read` tool that subscribes to a DataHub topic and returns live values.
- **Enable TSDB Query Tool** exposes a read-only `tsdb_query` tool that queries historical data from the local time-series database.
- **Tools** selects AI Suite tool definition files (`.json`). A definition targets either a Webhook processor in this instance through its `hook_path`, which the processor dispatches in-process with no HTTP, or an external endpoint through its `url`.
- **MCP Servers** selects AI Suite MCP server registrations. The processor connects over Streamable HTTP, discovers each server's tools per event, and exposes them to the model. The processor skips an unreachable server with a warning rather than failing the event.

## Memory and knowledge graph

:::hint{type="info"}
**Note:** Memory files are visible and editable on the AI Suite page and over FTP, so treat their content as untrusted input, since it is injected into the prompt.
:::

- **Enable Memory** gives the model a persistent folder it manages itself with the `memory_list`, `memory_read`, `memory_write`, `memory_append`, `memory_delete`, `memory_move`, and `memory_search` tools. The folder is this instance's own subfolder of the AI Suite Memory section, named by its identifier, so renaming the processor keeps its memory and no two instances share one. A memory index is injected into the prompt on every event.
- **Enable Knowledge Graph** adds a `knowledge_sync` tool that maintains a Knowledge Graph of the entities the model observes, such as devices, tags, and Digital Twins, with typed relations and provenance. It requires memory. Leave it off unless the agent surveys the system, because the tool's schema is sent to the model on every request.
- **Shared Memory Write** and **Shared Memory Read** share one namespace between agents. The single writer maintains the namespace, and every reader lists it as read-only.

## Output fields

The processor adds the following fields to its output:

- `value`: the assistant response text.
- `reasoning_summary`: a summary of the reasoning steps, present when advanced reasoning is enabled.
- `optional_file_contents`, `file_name`, `file_id`, and `container_id`: present when the model produces file output.
- `tool_activity`: the list of tool calls executed during the event, present when a local tool ran.

## Parameters

| **Parameter**                 | **Details**                                                                                                                                                                                             |
| ----------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| Name                          | The unique identifier for this instance of the AI Responses Processor.                                                                                                                                  |
| AI Model                      | The unique name of the AI model to use.                                                                                                                                                                 |
| AI Model Instructions         | The instructions, or system prompt, for the AI model.                                                                                                                                                   |
| HTTP Timeout                  | The maximum time in seconds to wait for a response. Default is `10`. Raise it, for example to `120`, when you enable local tools.                                                                       |
| Max Output Tokens             | The maximum number of tokens the model can generate per response. Leave empty for the model default.                                                                                                    |
| Max Message History           | The maximum number of messages to keep in the conversation history. Default is `20`, which is 10 exchanges. Older messages are dropped when the limit is reached.                                       |
| File Download Timeout         | The timeout in seconds for downloading files referenced in responses. Default is `30`.                                                                                                                  |
| Advanced Thinking / Reasoning | Enables extended thinking mode where the model supports it.                                                                                                                                             |
| Enable Web Search             | Allows the model to search the web during generation.                                                                                                                                                   |
| Enable Code Execution         | Allows the model to run code during generation.                                                                                                                                                         |
| Custom Tools                  | A JSON array of custom tool descriptors appended to the request tools list, for MCP servers and Anthropic skill, memory, and bash tools. The descriptor shape is vendor specific. Leave empty for none. |
| Skills                        | AI Suite skill files (`.md`, `.txt`) bundled into the prompt on every event, selected by checkmark in the UI. Leave empty to disable.                                                                   |
| Instruction Files             | AI Suite instruction files prepended to the prompt on every event as always-on guidance, selected by checkmark in the UI. Leave empty to disable.                                                       |
| Context Files                 | AI Suite image and PDF files attached as multimodal content blocks, sent inline as base64. Leave empty to disable.                                                                                      |
| Enable Litmus CLI Tool        | Exposes a `litmus_cli` tool that runs the Litmus Edge SDK CLI locally with the arguments the model provides.                                                                                            |
| Litmus CLI Path               | The path to the `litmus-sdk-cli` binary. Default is `/ftp-data/bin/litmus-sdk-cli`.                                                                                                                     |
| Litmus CLI Environment        | The environment for the CLI, one `KEY=VALUE` per line (`EDGE_URL`, `EDGE_API_CLIENT_ID`, `EDGE_API_CLIENT_SECRET`). Lines starting with `#` are ignored.                                                |
| Enable DataHub Read Tool      | Exposes a read-only `datahub_read` tool that subscribes to a DataHub topic and returns live values.                                                                                                     |
| Enable TSDB Query Tool        | Exposes a read-only `tsdb_query` tool that queries historical data from the time-series database.                                                                                                       |
| Max Tool Iterations           | The maximum number of tool-call round trips per event. Default is `5`.                                                                                                                                  |
| Tools                         | AI Suite tool definition files (`.json`) exposed to the model, re-read on every event. Each targets a Webhook `hook_path` in this instance or an external `url`. Leave empty to disable.                |
| MCP Servers                   | AI Suite MCP server registrations whose tools are exposed to the model, selected by checkmark in the UI. Leave empty to disable.                                                                        |
| Enable Memory                 | Gives the model a persistent memory folder it manages itself with the `memory_*` tools, plus a memory index injected into the prompt on every event.                                                    |
| Enable Knowledge Graph        | Adds a `knowledge_sync` tool that maintains a Knowledge Graph of observed entities in the memory folder. Requires memory.                                                                               |
| Shared Memory Write           | The shared memory namespace this instance writes, which makes it the namespace's only writer. Leave empty for a private agent.                                                                          |
| Shared Memory Read            | The shared memory namespaces this instance reads but cannot change, as a JSON array of names. Leave empty for none.                                                                                     |
| Timer Interval                | Timer in milliseconds in which to resend the last payload. Enter `0` to disable this timer.                                                                                                             |
| Pass Through Value            | Joins the input with the output of the processor.                                                                                                                                                       |

