Enterprise Search

What is a context layer for AI agents? The document half, explained (2026)

A context layer gives AI agents company knowledge with each user's permissions intact. How the document half works, how to evaluate one, and where it fits.

A context layer gives AI agents company knowledge with each user's permissions intact. How the document half works, how to evaluate one, and where it fits.

Shekhar Kadyan

Co-founder

A context layer is the shared system that sits between a company's tools and its AI agents. It collects what the agents need to know, checks what the person they act for is allowed to see, and hands over only the relevant pieces, with a source for each.


For documents, chats and tickets, that takes four things. Connectors keep a searchable index in sync with the source apps. Permission checks run at query time. Retrieval finds the right passages, and citations show where each one came from. Agents receive all of this over an API or over MCP, the Model Context Protocol, which is a standard way for agents to connect to outside tools.


PipesHub publishes this article. PipesHub is an open-source product in the category described here, and we have tried to describe other vendors fairly, with dated sources.


Key takeaways

  • "Context layer" means four different things in 2026. It can mean governed metadata (Atlan), the data warehouse (Fivetran with dbt, Airbyte, CData), engineering knowledge (Unblocked), or documents, chats and tickets. This article covers the last one.

  • The layers work side by side. Atlan's own definition page calls RAG and its metadata context layer "complementary". RAG, or retrieval-augmented generation, means fetching relevant passages and having a language model answer from them.

  • A document context layer is judged mostly on permissions. The questions to ask are whose access it applies, when it checks, what happens when the check fails, and how fast a revoked share disappears from results.

  • Good retrieval mixes keyword search and vector search, which matches text by meaning. A knowledge graph adds the ability to follow relationships. Every answer should cite the passage it came from.

  • Agents should reach the layer as a named user, through MCP or an API. They should never use a shared app identity that sees everything.


What is a context layer?


An AI agent is only as useful as what sits in its context window. The context window is the text a language model can see when it answers.


In June 2025 Shopify's Tobi Lütke and Andrej Karpathy popularised the term context engineering for the work of filling that window well. Karpathy called it "the delicate art and science of filling the context window" with the right information (Simon Willison, 27 Jun 2025).


Engineers say "context engineering". Vendors and analysts mostly say context layer. By that they mean the infrastructure that does this work for every agent in the company, so that each team does not have to build it again.


Atlan, which ranks highly for the term, defines it as "the infrastructure between your data systems and the AI that queries them" (Atlan, updated 11 Sep 2026). That is a good general definition. The disagreement is about which data systems.


The four meanings of "context layer"


Meaning

Who uses it (dated)

What "context" is

Real strength

What it is not built for

Metadata

Atlan uses "The Context Layer for AI" as its homepage title (Nov 2026).

Context is the definitions, lineage, glossary terms and policies that describe structured data.

It offers deep governance of tables and metrics. Atlan is a Gartner Leader for metadata management (Nov 2025).

It is not built for searching the text of documents. Atlan calls RAG "complementary".

Data warehouse

Fivetran Context Layer (16 Sep 2026), Airbyte context layer (27 Oct 2026) and CData Connect AI use it this way.

Context is the tables and models in Snowflake or BigQuery, or live SQL-shaped access to SaaS systems.

It gives accurate answers about numbers. Fivetran also parses and indexes Confluence, Drive, Jira and Zendesk content.

Fivetran's launch post says context sits "under the access controls you already enforce" in the warehouse. It does not say whether each user's permissions on the source documents carry over (checked 20 Nov 2026).

Engineering

Unblocked calls itself "the context layer for agentic software development".

Context is code, pull requests, issues and engineering chat.

It is purpose-built for coding agents.

Unblocked itself says a suite platform covers "CRM records or HR policy" better.

Docs, chats, tickets

Glean, Box (with Nvidia, 5 Nov 2026), Onyx, RAGFlow, PipesHub and others use it this way.

Context is files, wiki pages, messages, emails and tickets.

It answers the question "what did we decide and where is it written?"

It is not built for metrics, lineage or SQL accuracy.


Fivetran's tagline is "Turn your data warehouse into your context layer" (Fivetran, 16 Sep 2026). Airbyte's context layer runs "direct reads from your Snowflake or BigQuery warehouse", with semantic search "coming soon" (Airbyte, 27 Oct 2026). CData reports 350+ downloadable MCP servers (CData).


Unblocked's admission about CRM and HR content comes from its own comparison post (Unblocked, 11 Nov 2026). It is an honest line that more vendors should write.


Most companies will run several of these layers. Take an agent that is asked "why did churn rise in Q3?" It needs the metric definition from a metadata layer and the number from the warehouse. It also needs the post-mortem and the customer tickets from the document layer.


Context layer vs enterprise search vs RAG


Enterprise search is a search box that people use across company apps. RAG (retrieval-augmented generation) is a technique: fetch relevant passages and have a language model answer from them.


A document context layer is the shared service underneath both. It provides the index, the permission checks and the retrieval. Good enterprise search already contains most of one.


The difference is the audience. A context layer must serve an agent calling an API at 3 a.m. as well as a person typing in a box.


What a document context layer must do


Diagram: company tools feed a document context layer that syncs, indexes, checks permissions at query time and answers with citations for people, AI agents and apps

A document context layer in four steps. The permission check happens at query time, for the person asking.


1. Connect and keep in sync


Connectors pull content from Slack, Drive, Jira, Confluence and the other apps a company uses. They then keep up with edits and deletions.


Ask whether each connector syncs on a schedule, from change events, or both. The answer sets how stale a result can be.


2. Carry permissions through to query time


Each source has its own access rules, often called ACLs (access control lists). The layer must copy those rules alongside the content and apply them on every query, for the specific person asking.


A shared service account breaks this. The filter has no person to filter for, so the agent sees everything the account can see.


3. Fail closed


"Fail closed" means that when the permission check cannot run, the layer returns an error or nothing. It never returns unfiltered results.


You can test this. Stop the permission store and run a query. The right answer is an error.


4. Measure revocation latency


Revocation latency is the time between someone losing access in the source app and that content leaving their results. It is usually bounded by the permission sync interval.


You can test this too. Un-share a document and time how long it stays retrievable.


5. Retrieve with more than one method


Vector search matches text by meaning, so it misses exact identifiers such as error codes and ticket numbers. Keyword search, such as BM25, matches exact words, so it misses paraphrases. Running both and merging the results is called hybrid retrieval.


A knowledge graph is a store of records, people and the links between them. It adds relationships that neither search method sees, such as which ticket a document answers or who owns a project.


6. Cite every claim


An answer should point to the exact passage it relied on, with a link a person can open. People can then check the answer, and agents can pass the source on.


7. Deliver to agents through MCP and an API


MCP, the Model Context Protocol, is the standard way AI agents such as Claude, Cursor and Gemini CLI plug into outside tools and data. A context layer should offer an MCP server for agents and an HTTP API for developers. Both should authenticate as a user.


Agents should also treat retrieved text as data, not as instructions. A document can hide text written to hijack an agent, which is known as a "prompt injection".


How to evaluate a context layer: a checklist


  • [ ] Does it connect to the sources your teams actually use? Does it index files, chats and tickets, and not only metadata?

  • [ ] Does it copy each source's permissions? Does it apply them at query time for the user an agent acts for?

  • [ ] Does a failed permission check return an error? What is the revocation latency for each connector?

  • [ ] Does retrieval combine keyword and vector search? Is there a knowledge graph?

  • [ ] Does every answer cite a passage with a working link?

  • [ ] Is there an MCP server and an API, and do both authenticate as a user?

  • [ ] Can you self-host it, choose your own models and inspect the code? Is quality tested on a public benchmark?

  • [ ] Does it work alongside your metadata and warehouse layers, rather than asking you to replace them?


Where PipesHub fits, and where it doesn't


Where it fits. PipesHub is the open-source, permission-aware context layer for your company's documents, chats and tickets. It provides enterprise search and cited RAG answers for people and AI agents. Here is how it measures against the checklist, based on its public repository and docs.

  • Open source and self-hostable. PipesHub is licensed under Apache-2.0 and deploys with Docker Compose or Kubernetes. It works with any LLM provider, or with a local model through Ollama (GitHub). PipesHub Cloud is the managed option.

  • 50+ connectors. These include Slack, Google Drive, Gmail, Jira, Confluence and SharePoint (docs). Connectors sync on a schedule, and real-time sync is available for some connectors in the Enterprise edition.

  • Per-user permissions. The docs state: "An agent connects as a specific person rather than as the application, so it retrieves exactly what that person is allowed to see." They also tell agents not to use the OAuth client-credentials grant, a login method in which the application signs in as itself. That method has no user identity, so "permission filters collapse" (for agents).

  • Fails closed on the Retrieval API. If "the search index or permission check is unavailable", the API returns a 503 error rather than results (Retrieval API).

  • Hybrid retrieval and a knowledge graph. PipesHub stores dense vectors for meaning-based search and BM25 sparse vectors for keyword search in Qdrant. It keeps a knowledge graph in Neo4j or ArangoDB (system overview). The hybrid search lives in the repository's shared retrieval code, which search, chat and the Retrieval API all use.

  • Citations and delivery. Citations deep-link to the passage. Agents and developers reach PipesHub through a remote MCP server at /mcp, which is listed on the official MCP registry, through a Retrieval API, and through Python, TypeScript and Go SDKs.

  • Retrieval quality. PipesHub ranked #1 on the public EnterpriseRAG-Bench leaderboard (Hugging Face) as of 14 Nov 2026, with 93.24 overall (95.0% answer correctness) among 43 entries (leaderboard). Onyx, which makes a competing open-source product, runs the leaderboard.


Where it doesn't. PipesHub covers the document half. Three kinds of team should choose something else, or run it alongside PipesHub.

  • Teams that need lineage, glossary terms and certified metric definitions should use a metadata layer such as Atlan.

  • Teams that ask questions such as "what was revenue last quarter" should use the warehouse layers above.

  • Engineering-only teams should look at Unblocked, which is purpose-built for coding agents. PipesHub indexes GitHub and GitLab, but its focus is company-wide knowledge.


Other good document-side choices exist. Glean is a mature commercial enterprise search product, and Onyx is a well-known open-source one. RAGFlow is a popular open-source RAG engine that also describes itself as a "context layer for AI agents" (ragflow.io, accessed 14 Nov 2026).


FAQ


What is a context layer in AI?


A context layer is the shared infrastructure between a company's data and its AI agents. It gathers the knowledge agents need, applies each user's access rights, and returns only the relevant, cited pieces when an agent asks. Depending on the vendor, the knowledge can be metadata, warehouse tables, code, or documents, chats and tickets.


Is a context layer the same as enterprise search?


Not quite. Enterprise search is a product for people searching across company apps. A document context layer is the service underneath it: the synced index, the permission checks and the retrieval. It serves people, chat assistants and AI agents through an API or MCP. Good enterprise search products contain most of a context layer.


Is a context layer the same as RAG?


No. RAG, retrieval-augmented generation, is a technique: fetch relevant passages and have a language model answer from them. A context layer is the infrastructure that makes RAG safe and repeatable across a company, with connectors, sync, permissions, ranking and citations shared by every application and agent.


Do I need a context layer if Claude or ChatGPT already has connectors?


Built-in connectors usually search one app at a time, live. A context layer indexes many sources ahead of time, so one query can span Slack, Drive and Jira together, with consistent ranking, citations and permissions. Many teams use both: official connectors for single-app lookups and actions, a context layer for questions that cross sources.


What is an open-source context layer?


It is a context layer whose source code is public under an open-source licence, so you can read how permissions are enforced, self-host it inside your own network and choose your own models. PipesHub, Onyx and RAGFlow are open-source projects on the document side.


How does a context layer handle permissions?


A good one copies each source's access rules along with the content, then checks them on every query for the person asking. Agents must connect as a named user, not a shared service account. If the permission check cannot run, the layer should return an error rather than unfiltered results.


Does a document context layer replace Atlan or a data warehouse?


No. Metadata layers such as Atlan govern definitions and lineage for structured data, and warehouse layers such as Fivetran and Airbyte serve tables and metrics. A document context layer covers files, chats and tickets. The three work side by side, and an agent can call each one through MCP.


Related reading



Sources


  • Simon Willison, "Context engineering", 27 Jun 2025: https://simonwillison.net/2025/Jun/27/context-engineering/

  • Atlan, "What is a context layer?", updated 11 Sep 2026, accessed 20 Nov 2026: https://atlan.com/know/what-is-context-layer/

  • Atlan homepage, accessed 14 Nov 2026: https://atlan.com/

  • Business Wire, Atlan named a Leader in the 2025 Gartner Magic Quadrant for Metadata Management Solutions, 24 Nov 2025: https://businesswire.com/news/home/20251124723002/en/Atlan-Named-a-Leader-in-the-2025-Gartner-Magic-Quadrant-for-Metadata-Management-Solutions

  • Fivetran, "Announcing Fivetran Context Layer", 16 Sep 2026, accessed 20 Nov 2026: https://www.fivetran.com/blog/announcing-fivetran-context-layer

  • Airbyte, "Airbyte MCP Server and Context Layer", 27 Oct 2026 (updated 4 Nov 2026), accessed 20 Nov 2026: https://airbyte.com/blog/airbyte-mcp

  • CData, "Vibe querying: 2025 wrapped", accessed 14 Nov 2026: https://cdata.com/blog/vibe-querying-2025-wrapped

  • Unblocked homepage, accessed 14 Nov 2026: https://getunblocked.com/

  • Unblocked, "Best context platforms for agentic applications", 11 Nov 2026, accessed 20 Nov 2026: https://getunblocked.com/blog/best-context-platforms-for-agentic-applications/

  • RAGFlow homepage, accessed 14 Nov 2026: https://ragflow.io/

  • SiliconANGLE, "Box taps Nvidia's AI models to build a rich context layer for autonomous enterprise agents", 5 Nov 2026: https://siliconangle.com/2026/11/05/box-taps-nvidias-ai-models-to-build-a-rich-context-layer-for-autonomous-enterprise-agents/

  • Glean, "Key features to evaluate in an AI context layer", accessed 14 Nov 2026: https://www.glean.com/perspectives/key-features-to-evaluate-in-an-ai-context-layer

  • EnterpriseRAG-Bench leaderboard on Hugging Face, run by Onyx: https://huggingface.co/spaces/onyx-dot-app/EnterpriseRAG-Bench-Leaderboard

  • PipesHub repository and README: https://github.com/pipeshub-ai/pipeshub-ai

  • PipesHub docs, For coding agents: https://docs.pipeshub.com/for-agents

  • PipesHub docs, System overview: https://docs.pipeshub.com/system-overview

  • PipesHub docs, Connectors overview: https://docs.pipeshub.com/connectors/overview

  • PipesHub docs, Retrieval API: https://docs.pipeshub.com/developer/retrieval-api

  • PipesHub docs, MCP server overview: https://docs.pipeshub.com/mcp/overview

No headings found on page

Check out more blogs