> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kapso.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# AI fields

> Dynamic content generation using AI at runtime

AI fields generate dynamic content using AI models during workflow execution. Instead of static text, you provide prompts that are resolved at runtime with context and variables.

## How it works

1. **Define prompt**: Provide your generation prompt
2. **Runtime resolution**: AI generates content based on prompt and workflow context
3. **Variable access**: Use `{{variable_name}}` to include workflow variables
4. **Context aware**: AI has access to conversation history and user data

## Variable interpolation

Access workflow variables in your prompts using `{{variable_name}}` syntax.

Available variables:

* Workflow variables: `{{variable_name}}`
* User context: `{{phone_number}}`, `{{conversation_id}}`
* System info: `{{flow_id}}`, `{{current_time}}`

## Requirements

* **AI model required**: Must specify `provider_model_name` when using AI fields
* **Credits consumption**: AI field resolution consumes processing credits
* **Runtime resolution**: Fields are resolved during workflow execution, not at build time
