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

# Create a semantic layer

> Describe the data and business context AgentFlow should understand, as a shared, versioned layer.

export const DocMeta = ({type, applies, owner}) => {
  const LABELS = {
    tutorial: "Tutorial",
    "how-to": "How-to guide",
    explanation: "Explanation",
    reference: "Reference"
  };
  return <div className="e6-meta">
      <span className={type === "how-to" || type === "tutorial" ? "e6-eyebrow" : "e6-eyebrow e6-eyebrow--quiet"}>{LABELS[type] || type}</span>
      {applies ? <span>Applies to: {applies}</span> : null}
      {owner ? <span>Owner: {owner}</span> : null}
    </div>;
};

<DocMeta type="how-to" applies="All deployments" />

A semantic layer is a shared, versioned description of selected data: catalogs, schemas, tables, columns, business context, and generated metadata or embeddings. Semantic layers are top-level resources, so several projects can use the same one.

A project needs a **built** semantic-layer version before anyone can use chat, workflows or metrics in it.

## Create a semantic layer

1. Open **Semantic Layers** and choose **Create semantic layer**.
2. Enter a durable name. You can't change it after creation.
3. Select the active cluster when a cluster choice is shown.
4. Browse the catalog and schema. Choose at least one table and the columns AgentFlow should understand.
5. Add table and business context, including domain language, measures, known relationships and important rules.
6. Optionally configure an available enricher, such as OpenMetadata.
7. Create the layer. AgentFlow starts its first build automatically.
8. Wait until the version is **Built**. If a build fails, inspect and resolve it before continuing.

## Versions

Each build creates a new version. Projects adopt a version deliberately, by pinning it, so a rebuild never silently changes a project's data context. See [Project settings](/agentflow/setup/project-settings).

## Use external Cube instead

A project can query through the built-in semantic layer, or through an external Cube source when one is configured. See [Connect data sources and systems](/agentflow/extend/connectors).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.