> For the complete documentation index, see [llms.txt](https://docs.zerve.ai/zerve-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.zerve.ai/zerve-docs/data-and-assets/dags.md).

# DAGs

Save connected blocks as a reusable pipeline, and reuse it across projects.

A **DAG** asset saves a set of connected blocks, such as a data cleaning or feature engineering pipeline, so you can reuse it in other projects instead of rebuilding it each time.

{% hint style="info" %}
DAG assets may not be enabled for every organization yet. If you don't see the options below, contact your Zerve administrator.
{% endhint %}

## Creating a DAG

{% stepper %}
{% step %}

### Select the blocks

In a notebook, select the blocks you want to save. The selection must:

* Contain **at least one block**
* Form **a single connected graph**, so every selected block is connected to the others
* Have **no cycles**

You need write access to the project.
{% endstep %}

{% step %}

### Choose Create DAG

Select **Create DAG** in the toolbar that appears above your selection, or right-click one of the selected blocks and choose **Create DAG Asset**. To save a single block, choose **Create DAG Asset** from its toolbar.

If the selection can't be saved as a DAG, the option is disabled and shows why.
{% endstep %}

{% step %}

### Name it

Enter a **name** (up to 255 characters) and, optionally, a **description** (up to 2,048 characters), then select **Create DAG**.
{% endstep %}
{% endstepper %}

The DAG saves a copy of the blocks and their connections as they are when you create it.

## Finding your DAGs

Your organization's DAGs are under **Assets → DAGs**. Each shows its name, its description and who owns it.

| To               | Do this                                                                                                                                             |
| ---------------- | --------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Share a DAG**  | Select **Share**. DAGs follow the same sharing rules as other assets. See [Sharing and privacy](/zerve-docs/administration/sharing-and-privacy.md). |
| **Delete a DAG** | Choose **Delete** from its menu. You need write access.                                                                                             |

## Using a DAG in a project

When you add a DAG to a project, Zerve copies its blocks and connections into the project as **new blocks**, laid out automatically. If a block's name is already used in the project, a number is added to the copy's name, such as `clean_data_1`.

The copied blocks are ordinary blocks: you can edit and run them like any other, and changing them doesn't change the saved DAG.

## DAGs and other assets

| Asset                                                      | Reuses                                          |
| ---------------------------------------------------------- | ----------------------------------------------- |
| **DAG**                                                    | A whole pipeline of connected blocks            |
| [**Function**](/zerve-docs/data-and-assets/functions.md)   | A single piece of code, called from your blocks |
| [**Skill**](/zerve-docs/agents-in-the-workspace/skills.md) | Instructions for the agent                      |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

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

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.zerve.ai/zerve-docs/data-and-assets/dags.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
