> 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/advanced-ai/examples/using-the-fromai-function.md).

# Use $fromAI for tool parameters in Duaer

In Duaer: $fromAI marks a parameter the AI Agent fills when it calls a tool. Keys may only use letters, numbers, underscores, and hyphens.
## Let the model fill the parameter

On tool nodes connected to an AI Agent, many fields can be filled by the model from the task context. The auto-fill control on a field writes the expression for you. You can also write $fromAI yourself.

$fromAI is only for tools connected to an Agent. It is not an ordinary canvas variable, and it does not read [$vars](/code/variables.md).

## Syntax and examples

The smallest form:

```
$fromAI('email')
```

With a description, type, and default:

```
$fromAI('name', "The commenter's name", 'string', 'Jane Doe')
```

The key must be 1–64 characters and may only use letters, numbers, underscores, and hyphens. Spaces are not allowed. An invalid key throws from the expression.

## When the model requires a dynamic parameter

Google Gemini, Vertex, and similar setups require at least one dynamic parameter when tools are used. With no $fromAI at all, the node tells you to open this page. Add $fromAI on fields the model should really fill. Do not invent a meaningless key only to pass the check.
## Questions

### Where do you use $fromAI in Duaer?

On parameters of tool nodes connected to an AI Agent. Write $fromAI('key'). You can add a description, a type, and a default. The key may only use letters, numbers, and underscores.

### Why do some models in Duaer require at least one dynamic parameter?

Google Gemini, Vertex, and similar setups need at least one parameter filled by the model when tools are used. Mark that parameter with $fromAI. With none at all, the node links here.

