> For the complete documentation index, see [llms.txt](https://craft-agent.gitbook.io/home/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://craft-agent.gitbook.io/home/node-reference/ai-chat-node.md).

# AI Agent Node

The AI Agent node is the core of every workflow. It receives a goal, selects a model, applies a persona, and uses tools to generate its response.

## How It Works

The Agent node doesn't have its own settings — it gets everything from connected nodes:

| Connected Node  | What It Provides                                  |
| --------------- | ------------------------------------------------- |
| **Model**       | Which AI model to use (GPT-4o Mini, Claude, etc.) |
| **Persona**     | The agent's role and behavior (system prompt)     |
| **User Prompt** | The task or question to process                   |
| **Tool**        | Tools the agent can use (web search, etc.)        |
| **Memory**      | Context from previous conversations               |

## Inputs

| Port            | Type   | Description                                 |
| --------------- | ------ | ------------------------------------------- |
| **Model**       | Config | Model selection and temperature             |
| **Persona**     | Text   | System prompt defining the agent's behavior |
| **User Prompt** | Text   | The task or question                        |
| **Tools**       | Config | Optional tools the agent can call           |
| **Memory**      | Config | Optional memory strategy                    |

## Outputs

| Port       | Type | Description          |
| ---------- | ---- | -------------------- |
| **Output** | Text | The agent's response |

## Example Setup

```
[Trigger] → [Agent] ← [Model: GPT-4o Mini]
                    ← [Persona: "Content Writer"]
                    ← [User Prompt: "Write about AI trends"]
                    ← [Tool: search_web]
           [Agent] → [Response]
```

## Model Settings

Configure the connected **Model** node:

| Setting         | Description                  | Default     |
| --------------- | ---------------------------- | ----------- |
| **Model**       | AI model to use              | GPT-4o Mini |
| **Temperature** | Creativity level (0.0 - 1.0) | 0.7         |

## Credit Usage

Each workflow execution costs **1 credit**, regardless of model or prompt length.

***

> **Pro tip:** Chain multiple Agent nodes with different personas for multi-step processing. For example: Research Agent → Writing Agent → Review Agent.
