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

# Workflows with AI

> Configure an AI Agent that collects data from your users

In this guide you will replicate the flow from `Your first workflow`, but using an AI Agent node to request and store structured data from the user.

<Steps>
  <Step title="Drag an AI Agent node">
    From the `start` node, drag a connection and choose the `AI Agent` node. In the instruction field paste:

    ```txt title="ai-agent.txt" wrap theme={null}
    You must ask the user for their name and email address.

    When the user provides their name and email, end the interaction with the schema in JSON format:

    {"name": [name], "email": [email]}
    ```

    All our AI Agents can end the interaction with a structured format that saves the information in memory. More details in the [variables](/guides/variables/guia-rapida) guide.
  </Step>

  <Step title="Save the response">
    In the lower section of the node configuration, type `userData` in the **Save response as** field. This will store the output JSON in memory under that key.
  </Step>

  <Step title="Connect a text node">
    From the AI node's output, connect a `text` node with the following content:

    ```txt title="texto.txt" wrap theme={null}
    Welcome, {{$memory.userData.name}}. Your email is {{$memory.userData.email}}
    ```

    This text uses the `userData` memory variable to personalize the response with the data provided by the agent.
  </Step>

  <Step title="Test it">
    In the upper-right corner, click **Test**. Interact with the flow from the tester or via WhatsApp to verify that the AI Agent requests the data and that the text node displays the stored information.

    <Note>
      Make sure the AI Agent node saves the response as `userData` so the text node can access the data.
    </Note>
  </Step>
</Steps>
