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

# Author dags with the Astro IDE

<Info>
  **Preview**

  This feature is in [Preview](/docs/astro/feature-previews).
</Info>

The Astro IDE supports building, updating, understanding, and customizing Airflow dags with or without the Astronomer AI assistant. The AI features in the IDE are powered by [Otto](/docs/astro/otto-overview), Astronomer's data engineering agent. Otto brings Airflow-specific context, team memory, and specialized skills to code generation. For more details on Otto's capabilities, including memory, skills, and Airflow tools, see the [Otto overview](/docs/astro/otto-overview).

<Note>
  AI features can be enabled or disabled Organization-wide by an Organization Owner. When disabled, all AI-driven capabilities in the IDE are unavailable for all users. To learn how to configure this setting, see [Enable or disable AI features for your Organization](/docs/astro/enable-disable-astro-ai).
</Note>

## Author dag code with or without AI

The Astro IDE allows you to write or modify dag code directly. Or, you can use AI-powered features to generate or refactor code, including:

* Use context-aware AI tools to suggest, generate, or improve dag code, operator logic, and project structure.
* Ask the Astro IDE questions about the project to better understand existing dag code structure, logic, and dependencies.
* View the Astro IDE's reasoning, streaming live in the AI panel as it proposes changes.
* Review all proposed code changes before choosing to accept or reject them.
* Manually edit Python scripts, dag files, and supporting resources in the built-in editor.

<Warning>
  When you author dags in the Astro IDE, this consumes some of your Workspace AI credits. See the [Preview FAQs](https://www.astronomer.io/product/ide/#faq) for more details.
</Warning>

## Add custom project rules for code generation

You can define custom instructions or rules that guide the AI for all code generation tasks within your Airflow project.

<Steps>
  <Step title="Open Project Settings">
    Open the **Project Settings** from the **More Actions** menu in the toolbar.
  </Step>

  <Step title="Add custom instructions">
    Enter your linting rules, conventions, or any special instructions for the Astro IDE in the **Custom Instructions** field.
  </Step>

  <Step title="Save your changes">
    Click **Update Project** to apply your custom rules. These instructions will be used for all AI-generated code in this project.
  </Step>
</Steps>
