> For the complete documentation index, see [llms.txt](https://doc.duaer.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.duaer.com/integrations/builtin/cluster-nodes/root-nodes/n8n-nodes-langchain.agent/common-issues.md).

# Common issues with AI Agent in Duaer

Common AI Agent errors and key parameters in Duaer: empty prompt, no model connected, memory errors, and the iteration limit.
## Key Duaer AI Agent parameters <a href="#parameters" id="parameters"></a>

- Source for Prompt (User Message): Connected Chat Trigger Node reads chatInput from the previous step. Define below lets you write Prompt (User Message) yourself, with data from earlier nodes.
- Require Specific Output Format: connect an output parser, such as Structured Output Parser.
- Enable Fallback Model: when the main model fails, the model on the Fallback Model input answers.
- System Message: instructions sent before the conversation. Default: You are a helpful assistant.
- Max Iterations: the most rounds of tool calls. Default 10.
- Return Intermediate Steps: include which tool each step called in the output.
- Automatically Passthrough Binary Images / PDFs: pass input images (on by default) or PDFs (off by default) straight to the model.
- Enable Streaming: return text as it is generated. On by default.
- Batch Processing: Batch Size for items in parallel, Delay Between Batches in milliseconds, for rate limits.
- Force Tool Call on First Iteration: the first round of each run must call a tool. Useful for smaller models.

## No prompt specified <a href="#no-prompt-specified-error" id="no-prompt-specified-error"></a>

With Source for Prompt set to Connected Chat Trigger Node, AI Agent looks for a chatInput field. If the previous step is not a Chat Trigger and has no such field, you get this error. Change it to Define below and write the prompt.

With Define below, the error means Prompt (User Message) is empty or its expression did not resolve.

## Internal error: 400 Invalid value for 'content' <a href="#internal-error-400-invalid-value-for-content" id="internal-error-400-invalid-value-for-content"></a>

The prompt resolved to null. With Define below, check that the expression references fields that exist. With Connected Chat Trigger Node, drop input items whose chatInput is null.

## Please connect a model to the Chat Model input <a href="#a-chat-model-sub-node-must-be-connected-error" id="a-chat-model-sub-node-must-be-connected-error"></a>

AI Agent has no chat model. Select + on the Chat Model input under the node and pick a model, such as Duaer Chat Model. With Enable Fallback Model on and no fallback connected, Duaer asks you to connect one or turn the option off.

## Error in sub-node Simple Memory <a href="#error-in-sub-node-simple-memory" id="error-in-sub-node-simple-memory"></a>

Usually an old Simple Memory version copied from an old template. Delete it and add it again to get the current version.

## The agent stops at Max Iterations <a href="#max-iterations" id="max-iterations"></a>

The model kept calling tools without answering and hit the limit. Check that each tool description states its purpose and parameters, then raise Max Iterations if needed.
## Questions

### What fixes No prompt specified on a Duaer AI Agent?

Set Source for Prompt on the Duaer AI Agent to Define below and write the prompt, or make sure the previous step is a Chat Trigger with chatInput in its output.

### What is the default Max Iterations on a Duaer AI Agent?

10. The Duaer AI Agent stops after that many rounds of tool calls.

