Skip to main content

Methodology

How ClariLayer approaches the context layer

Useful memory is selected, attributable and correctable. ClariLayer brings durable work into later projects and sessions without turning connection into blanket collection. Analytics adds a distinct, evidence-aware contract path.

Both posts describe the same architecture from different angles: accuracy comes from giving the agent structured, checked, maintained context — not from a better SQL generator and not from dumping more documents into retrieval. Both also describe an internal machine: canonical datasets, curated annotations, eval suites, and engineers to keep it all fresh.

ClariLayer applies the same demand for context discipline to general AI work. The default object is a durable fact, preference, decision, rule or lesson in a selected space. Analytics definitions, SQL and CRM contracts remain the specialist extension.

ClariLayer — where it fits in your data stackClaude Code, Cursor, and Codex connect to ClariLayer over MCP with a context key; claude.ai connects as an OAuth custom Connector. In the personal MCP reconciliation path, the client queries a warehouse, dbt, or HubSpot with its own authorized access and sends supported evidence to ClariLayer. ClariLayer does not hold source credentials or connect to the live source on that path. It runs bootstrap, recall, remember and reconcile, and surfaces Diff to Canon when saved and canonical context differ. You get a grounded agent, a Context Console, and an Inbox with Activity and Replay. It runs on Supabase Postgres with row-level security. Status is caveat or asserted, never verified. The separate gated Governed Context Edge team-connector surface is outside this diagram and uses its own controls.ClariLayerwhere it fits in your data stackcontext · MCP, in-flowdata · your agent's source accesslocal agents / claude.aiMCPcontext key / OAuthSQL / CRMYour AI agentClaudeCursorCodexWarehouse, dbt, or HubSpotyour client's own source access —personal path: no direct connectionClariLayeryour context layerbootstraprecallrememberreconcileDiff to Canonyours · active_user = last 28 dayscanon · active_user = last 7 days⚠ differs — flagged on recallstatus: caveat or asserted · never “verified”Your agent, groundedstops repeating mistakeswrong table · join · refundsContext Consolesee + manage your contextstatus · provenance · where-usedInbox · Activity · Replayapprove proposalswatch the recall loopSupabase Postgres + row-level security · MCP (context key or OAuth) · served-trace storepersonal path shown · gated team connectors use separate controls
The same architecture, in one picture: structured, checked context served to the agent over MCP — beside the warehouse, HubSpot, and artifacts it already reads through its own access.

The failure we build against

An agent can have the right context served and still not use it. Anthropic reported a sharp ablation: giving the agent raw retrieval access to thousands of prior queries moved accuracy by less than a point. The information was available, but unstructured retrieval still could not map a new question to the right precedent. The bottleneck was structure, not access.

Our internal Analytics tests reproduced the same failure: the right definition retrieved, then a filter invented that was never in it, an aggregate computed at the wrong grain, a stale note preferred over a checked contract. Serving context is table stakes. The work — and everything below — is about making the checked contract the thing the agent actually uses.

We also ran the counterfactual. In our internal paired Analytics eval — three batteries, 38 pre-registered data questions, the same agent with and without the layer — the agent scored 36/38 with ClariLayer connected against 26/38 without. This result is not a general-memory benchmark, independent certification or guarantee for every task.

Six principles

What we build by.

Each one is a response to a failure we have actually watched an agent make. Together they are the difference between a notes file your agent might read and a context layer it can be held to. For the mechanics underneath these principles, see how the context layer works.

Selected-space recall

The connected agent can recall durable facts, preferences, decisions, rules and lessons from the selected authorized space. Source and applicability stay attached, and a scoped request does not silently expand to every space.

Reviewed input over ambient collection

Selected supported local history becomes a bounded preview before import. The user accepts the exact initial proposal; later capture is optional, separately configured and limited by its own authorization and exclusions.

Analytics checks stay scoped

Each explicit Analytics reconcile checks one compatible saved definition. Warehouse contracts use agent-supplied actual_sample; HubSpot contracts use bounded, recursively row-free crm_evidence. A declared-vs-actual mismatch surfaces as a caveat. Otherwise the entry stays asserted.

Source and applicability stay attached

Remembered work carries where it came from and where it applies. Analytics caveats remain part of the specialist contract; they are not presented as a certification for general memory or external work.

People can correct and forget

When a durable rule changes, correct it or forget it in scope. The system does not silently rewrite canon, and initial import acceptance does not authorize ongoing capture.

Evidence claims remain bounded

The 36/38 versus 26/38 result is an internal paired Analytics evaluation across 38 pre-registered data questions. It is not a general-memory benchmark, independent certification or guarantee for every task.

Where it sits

Beside your agent — never between it and your source

Recall, routing, and labels travel over MCP. Reconcile is agent-mediated: warehouse contracts accept actual_sample columns, an optional row count, and optional preview rows; HubSpot contracts accept bounded property metadata and aggregate distributions in crm_evidence, with CRM rows forbidden. HubSpot reconcile is generally available. In this personal MCP path, ClariLayer never holds source credentials, executes SQL, or calls HubSpot. The full data-flow, including what we will not pretend about preview rows, is on the security page.

Bounded completion receipt

A receipt for the agent's context declaration — nothing more.

Managed instructions establish a concrete completion loop for relevant data work: recall first, make any confirmed live write or reconcile update, then call context_checkpoint. If nothing durable changed, no_update_required is allowed only after the relevant metric, mapping, filter, grain, and source-of-truth facets were reviewed. A pending proposal alone cannot complete the loop, and update_failed explicitly blocks completion.

A successful checkpoint durably and idempotently persists the agent's constrained context_updated or no_update_required declaration and validates ownership and eligibility of referenced ClariLayer objects. It does not independently prove an entry changed or external work happened, and it does not certify code, deployment, Databricks validation, query output, HubSpot state, or semantic correctness in any external system.

The standard we hold

Plenty of tools will happily stamp your definition “verified.” We won’t — a false all-clear is the one failure a trust product can’t survive. Today reconcile emits caveat on a declared-vs-actual mismatch and asserted otherwise. The stronger verified status is not live and remains gated off, with no public release timeline. Every mark you see today is one we can back.

Keep one decision available when the next session begins.

Start free with no credit card. Connect a compatible client, choose the authorized space and save one confirmed rule. Add selected history or bounded capture only when you want those paths.