# Agent Response Node

The **Agent Response** node is used to send information back to the **Agent** that triggered the Workflow with an **Agent Request Node**.

It closes the communication loop between your Workflow and the Agent.

***

### 🛠️ How It Works

* A Workflow starts with an **Agent Request Node** (called by the Agent).
* The Workflow executes its steps (variables, API calls, logic).
* The **Agent Response Node** returns the final result to the Agent.
* The Agent can then use this data to answer the user or take the next action.

***

### ⚙️ Configuration Options

* **Response Body** → the content returned to the Agent (can include variables created in the Workflow).
* **Format** → JSON or text, depending on the type of output expected.
* **Error Handling** → optionally define error messages if the Workflow fails.

***

### 📌 Example Use Cases

* Agent asks: *“What’s the status of order #123?”*\
  → Workflow queries a database and **returns the order status** via Agent Response.
* Agent asks: *“Create a new lead with this info.”*\
  → Workflow inserts the data into a CRM and **returns the new lead ID**.
* Agent asks: *“Run analysis on these numbers.”*\
  → Workflow uses an LLM node to analyze data and **returns a summary**.

***

⚡ **Tip:** Always make sure the response is **clear and structured**, so the Agent can use it naturally in a conversation.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.zaia.app/workflows/workflow-nodes/agent-response-node.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
