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

# Generate text with Agent

> Generate text using a Cassidy Agent, which includes Knowledge Base access, brand voice, and configured capabilities.

Generate text using one of your [Agents](/agents/overview). Unlike the standard [Generate Text](/reference/actions/generate-text) action, this action uses the Agent's full configuration — including its Knowledge Base access, brand voice, instructions, and capabilities.

Use this when you want the same quality and context-awareness you get from chatting with an Agent, but inside a Workflow step.

<Steps>
  <Step title="Add the action">
    In the Workflow builder, click **+** between blocks and select **Generate Text with Cassidy Agent** from the action library.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-0.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=b1454b903ee912a210bff46c4cc6cfdf" alt="Action library with Generate Text with Cassidy Agent selected" width="944" height="594" data-path="images/reference/generate-text-with-cassidy-agent-img-0.png" />
    </Frame>

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-1.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=84db728bf9141b4fb3a3eb95bf8a0489" alt="Adding the Generate Text with Cassidy Agent action between blocks" width="910" height="1382" data-path="images/reference/generate-text-with-cassidy-agent-img-1.png" />
    </Frame>
  </Step>

  <Step title="Rename the action (optional)">
    Enter a descriptive name to make the action easier to identify and reference as a variable in later steps.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-2.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=50a12b66c5631724fb60f43e1acaf733" alt="Renaming the action block" width="1018" height="174" data-path="images/reference/generate-text-with-cassidy-agent-img-2.png" />
    </Frame>
  </Step>

  <Step title="Select an Agent">
    Choose which [Agent](/agents/overview) to use for this step. The Agent's [Knowledge Base](/knowledge-base/overview) access, instructions, and brand voice will all apply.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-3.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=c9d079d911fe7bc1cb941ed44373f008" alt="Agent selector dropdown" width="631" height="122" data-path="images/reference/generate-text-with-cassidy-agent-img-3.png" />
    </Frame>
  </Step>

  <Step title="Write a prompt">
    Enter the prompt for the Agent. [Reference variables](/guides/prompt-engineering#workflow-prompts) from previous steps or the trigger using the **#** symbol to provide dynamic context.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-4.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=ad5b0c9cb469d1c7da8bed2cc56e4268" alt="Prompt field with variable references" width="631" height="342" data-path="images/reference/generate-text-with-cassidy-agent-img-4.png" />
    </Frame>
  </Step>

  <Step title="Configure Structured Output Fields (optional)">
    If you need the AI to return data in a specific format with defined fields, set up [structured outputs](/workflows/advanced/structured-output-fields). This gives you named fields with specific data types you can reference individually in later steps.

    <Frame>
      <img src="https://mintcdn.com/cassidy/PSOwom-PV6-w07rd/images/reference/generate-text-with-cassidy-agent-img-5.png?fit=max&auto=format&n=PSOwom-PV6-w07rd&q=85&s=a0c3b41a48a96ace9f5db669c86d661e" alt="Structured Output Fields configuration" width="900" height="504" data-path="images/reference/generate-text-with-cassidy-agent-img-5.png" />
    </Frame>
  </Step>

  <Step title="Configure Conversation Memory (optional)">
    Enable [Conversation Memory](/workflows/advanced/conversation-memory) if you want the Workflow to retain conversation history and carry context across runs.
  </Step>

  <Step title="Adjust advanced model settings (optional)">
    Under **Advanced Model Settings**:

    * **Temperature** — Controls randomness. Lower values (e.g., 0.1) produce focused results; higher values (e.g., 1.0) produce more creative outputs. Default is 0.70.
    * **Include Citations** — Toggle to include Knowledge Base citations in the output.

    <Frame>
      <img src="https://mintcdn.com/cassidy/RPk-aW2ZmzE0KYzC/images/reference/generate-text-with-cassidy-agent-img-6.png?fit=max&auto=format&n=RPk-aW2ZmzE0KYzC&q=85&s=ee3ef0c0009a2e82b7819fd8ad6f5ffd" alt="Advanced Model Settings panel with temperature and citations" width="1078" height="588" data-path="images/reference/generate-text-with-cassidy-agent-img-6.png" />
    </Frame>

    <Info>This action inherits [Connectors](/agents/connectors/overview), [Capabilities](/agents/capabilities/overview), and advanced settings from the selected Agent. To add tools like Web Search, configure them on the Agent itself. To enable data analysis and file generation, turn on [Code Execution & File Creation](/agents/advanced/code-execution-file-creation) for the Agent. If you need per-action control over connectors and capabilities, use the standard [Generate Text](/reference/actions/generate-text) action instead.</Info>
  </Step>
</Steps>

## Related

* [Generate Text](/reference/actions/generate-text)
* [Agents overview](/agents/overview)
* [Call a Workflow from an Agent](/agents/call-workflow)
