> ## 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.

# Code Execution & File Creation

> Control whether Agents can analyze data, generate files, and process large connector results by writing and running code.

**Code Execution & File Creation** lets an [Agent](/agents/overview) write and run code when a request needs more than a normal text response. Agents use it to analyze spreadsheets, generate charts, create downloadable files, and work with large results from [Connectors](/agents/connectors/overview) or [Workflows](/workflows/overview).

New custom Agents have **Code Execution & File Creation** enabled by default.

<Info>
  If you're looking for Data Analysis, it has moved into this setting. Data
  analysis is one of the main things Code Execution & File Creation enables.
</Info>

## What it enables

When this setting is on, your Agent can:

* Analyze CSVs, spreadsheets, and structured files
* Create charts, summaries, and calculations from data
* Generate downloadable documents, spreadsheets, presentations, and PDFs
* Read large Connector or Workflow results that would otherwise be cut off
* Work with files attached in Chat or referenced from the [Knowledge Base](/knowledge-base/overview)

## Check or change the setting

<Steps>
  <Step title="Open the Agent editor">
    Go to **Agents**, find the Agent you want to configure, click the **⋯** menu, and select **Edit**.
  </Step>

  <Step title="Open Advanced Settings">
    In the **Customize** section, expand **Advanced Settings**.
  </Step>

  <Step title="Turn Code Execution & File Creation on or off">
    Use the **Code Execution & File Creation** toggle.

    <Frame>
      <img src="https://mintcdn.com/cassidy/AmLM8RqJQYmxK10C/images/agents/code-sandbox-advanced-settings.png?fit=max&auto=format&n=AmLM8RqJQYmxK10C&q=85&s=5562646de66cc7d239047b607994df49" alt="Agent Advanced Settings showing Code Execution & File Creation enabled" width="1024" height="646" data-path="images/agents/code-sandbox-advanced-settings.png" />
    </Frame>
  </Step>

  <Step title="Publish your Agent">
    Click **Publish** to save the setting.
  </Step>
</Steps>

## Internet access

Organization admins can also control whether code execution can access the internet while processing files or installing packages. See [Control code execution and file creation internet access](/settings/code-sandbox).

## Related

<CardGroup cols={2}>
  <Card title="Analyze data with an Agent" icon="chart-bar" href="/guides/analyze-data-with-agent">
    Ask Agents to analyze spreadsheets, CSVs, and structured files.
  </Card>

  <Card title="Create files in Cassidy" icon="file-export" href="/guides/create-files">
    Generate documents, spreadsheets, presentations, and reports.
  </Card>

  <Card title="Analyze data in Workflows" icon="diagram-project" href="/workflows/advanced/data-analysis">
    Use Code Execution & File Creation inside Generate Text actions.
  </Card>
</CardGroup>
