Agents Schema
Agents Schema is an open-source standard for storing context about your data in your warehouse. It acts as a map that helps AI agents navigate your data, understand what it means, and use it to answer your questions.
Overview
Table and column names describe how your data is structured, but they do not explain how your organization uses it. To answer business questions, AI agents also need context, such as metric definitions, documentation, and relationships between datasets.
Fivetran builds and populates the AGENTS schema in your warehouse with this context, including a knowledge graph that maps the objects represented in your data and their relationships. AI agents can query this context using SQL to find relevant data and understand how it connects.
You can use Agents Schema to:
- Help agents find relevant datasets: Give agents a shared starting point for discovering curated tables, models, and semantic objects.
- Provide business context: Make documentation and definitions available alongside warehouse data so agents can interpret what they query.
- Bring metadata from multiple tools together: Publish metadata from sources such as dbt, Looker, and Omni into the same schema.
- Use context through SQL: Query the metadata from warehouse-connected agents, notebooks, and internal tools.
How it works
Fivetran Context Layer writes context - metadata from your data sources - to the AGENTS schema by modeling source data, parsing documents, creating search indexes, and extracting analytical metadata. Learn more about the build process in the Context Layer Setup FAQ.
Once you ask your AI agent a question, it starts by querying the AGENTS.ROOT table to learn what context is available and which tables contain it. The agent then queries the relevant tables for more detail to formulate its answer.
The context available to an agent depends on the providers, or the source systems or tools that contribute metadata.
Root directory
AGENTS.ROOT is the entry point to the AGENTS schema. This table identifies available providers and describes the context they provided, helping an agent determine where to look next.
An agent can inspect the directory with the following query:
SELECT provider, key, content
FROM AGENTS.ROOT;
The directory makes the schema self-documenting. Each provider explains its own tables, so agents can discover context as providers are added or updated.
Search indexes
Fivetran builds search indexes that help AI agents find relevant content in your destination based on meaning. For example, if you ask a question about canceling a subscription, the AI agent can still find a related document about account closure, even though the language differs.
The AGENTS.FIVETRAN_SEARCH_INDICES table tells agents which search indexes are available for a table and how to use them. It acts as a directory for searching the content, but it does not contain the content itself.
Concepts, entities, and relationships
Agents Schema uses the following tables to describe the information in your context layer and how it connects:
| Table | Purpose |
|---|---|
AGENTS.FIVETRAN_CONTEXT_LAYER_CONCEPT | Describes an idea or business term represented in your context. |
AGENTS.FIVETRAN_CONTEXT_LAYER_ENTITY | Represents an object in your context. |
AGENTS.FIVETRAN_CONTEXT_LAYER_EDGE | Describes a relationship in the graph. |
Using the information in these tables, search indexes then help agents find relevant content.
Connect AI agents
While Agents Schema provides context in your warehouse, you need to connect your AI agents to that context.
You can connect an AI tool directly to your warehouse and configure it to discover context through AGENTS.ROOT. Consider this method if your agent already queries the warehouse and you want it to retrieve context through the same SQL connection. Follow the direct warehouse connection instructions in the Context Layer Setup FAQ.
Alternatively, you can connect using Agent Context MCP, which provides an interface through which AI agents can query the context. For instructions, see the Agent Context MCP Setup Guide.
Publish additional metadata
The open-source Agents Schema repository provides GitHub Actions workflows for publishing metadata from dbt, Looker, Omni, Open Semantic Interchange (OSI), and Sigma. These workflows read source metadata from your repository and write it to the AGENTS schema in your warehouse.
For example, if your repository contains a dbt project or an existing target/manifest.json, use the dbt workflow to publish its metadata. You can combine workflows when your repository contains multiple metadata sources.
For prerequisites and source-specific instructions, see the Agents Schema README.
Additional support
If you have questions about Agents Schema in Fivetran Context Layer, contact Fivetran Support.