Guide · Context layer

What is a context layer for AI agents?

For teams deciding how to give agents reliable knowledge of their business.

Updated

A context layer sits between your business sources and your AI agents. It ingests schema, documents and events, turns them into structured, source-attributed knowledge that people review, and serves the right slice to an agent at query time. The Brain is BrainBox's context layer: a typed Domain Model, a Wiki, Intelligence Traces, Skills and a loop of learnings, served over MCP.

  • It answers what your terms mean, which table backs what, which rules apply and what happened, so the agent need not guess.
  • A context layer is reviewed and shared, unlike per-user agent memory.
  • It does not replace your agent runtime, your model, your guardrails or your systems of record.

The problem it solves

An agent can read your schema and your documents, but it cannot read your business: what "active customer" means, which of three tables is the real one, which policy applies, what was decided last quarter. Teams end up building the same layer under every agent to hold this. A context layer is that layer, built once and shared.

Our take: the Brain

A Brain is what is known about how one business works. It has a Domain Model (typed and curated), a Wiki (your documents and written briefs), Traces (interpreted events), Skills (procedures) and Learnings (corrections from agents and people). Elements carry their source, a person approves what ingestion proposes, and agents read it over MCP. We call the category the context layer and the product the Brain.

What it is not

A context layer is not your agent runtime or orchestration, your LLM gateway, the inline guardrails that check an agent's output, your system of record, or your data pipelines. It reads from those and records knowledge about them. Business rules can live in the layer as content; enforcing them stays in your harness.

When you do not need one

If one assistant answers questions from a small document set, plain retrieval may be enough. If you only need consistent KPI numbers, a semantic layer may be enough. A context layer earns its place when several agents need the same reliable view of the business, when meaning lives in people's heads, and when knowledge changes and needs review.

  1. Your sources
    Database schema, docs, meetings, email, tickets
  2. Ingest and review
    Connectors propose; people approve
  3. The Brain
    Domain Model, Wiki, Traces, Skills, Learnings
  4. MCP, CLI, SDK
    Scoped to a project, organization or tenant
  5. Your agents
    Claude, ChatGPT, Codex, your own
Where a context layer sits
The building blocks of a context layer, and the Brain's version of each
Building blockQuestion it answersIn the Brain
IngestionWhere does knowledge come from?Connectors for SQL, docs, dbt, MCP servers and NoSQL; events through process_event
OntologyWhat do our terms and entities mean?Domain Model: entities, relationships, vocabulary, rules, processes, metrics
RetrievalWhat is the right slice for this question?get_index, recall_domain, recall_wiki, get_wiki_page
MemoryWhat happened, and how do we do things?Traces, wiki briefs, skills, personal pages
FeedbackHow does it correct itself?Learnings and context gap reports
Tenancy and accessWho can see and change what?Tenants, scoped keys, OAuth 2.0
Review and auditWho approved this, and where did it come from?Drafts approved by people, source attribution, an audit log

FAQ

What is a context layer?
The layer between your business sources and your AI agents that holds structured, curated, source-attributed knowledge about how the business works and serves it to agents at query time.
How is the Brain different from a vector database?
A vector database stores embeddings for search. The Brain also holds typed entities, relationships, vocabulary, rules and metrics that people review, plus a wiki, traces and skills. It has its own full-text search over wiki pages.
Does a context layer run my agent?
No. Agent runtime, model choice, guardrail enforcement, the system of record and data movement stay with you.
How do agents reach it?
Over MCP, through endpoints scoped to a project, an organization or a tenant, and through a CLI and SDK.

Give your agents a brain.

Sign in and ask your first question.

Book a Demo