Get started

Introduction

Enterprise-grade policy, SOP, contract, and knowledge resolution over one managed HTTP or MCP API.

Mackerel is a managed, enterprise-grade search and retrieval API for a company's knowledge base, especially policies, SOPs, product rules, contracts, wikis, and many more.

Company documents are often unstructured, messy, and contradict each other on purpose: a regional addendum narrows a global policy, a customer rider waives a standard fee, and last year's handbook sits beside this year's update. Half the battle in deploying autoregressive AI agents is wrangling years, if not decades, of messy data into structured, orderly ontologies—a near-impossible feat for anything beyond a small business. Deploying agents as-is results in poor accuracy and high latency, leaving the agent to re-figure out how to navigate your files every time it looks for an answer. Instead of returning overlapping chunks and asking an LLM to guess, one call to Mackerel enforces acl permissions, resolves overrides, excludes superseded_by revisions, and returns the exact governing clause in milliseconds.

Mackerel pairs a compilation engine with a fast System 1 search and retrieval agent. Our compiler takes existing, messy SOPs, contracts, and documentation and organizes them into clean, structured, easily crawlable interfaces—preserving permissions, exceptions, and revision history without forcing your team to maintain a hand-built ontology. At query time, Mackerel's System 1 retrieval agent deploys directly onto that compiled corpus to resolve and return the authoritative clause in milliseconds, giving your downstream reasoning agents and applications fast, deterministic grounding on every request.

Core concepts

Traditional keyword and vector search treat every paragraph as equal text. Mackerel treats rules as versioned, permissioned primitives with explicit precedence so answers stay deterministic as your documentation grows.

TermMeaning
CorpusAn isolated collection of rules or documents queried as a single unit (such as demo_sops, support_policies, or internal_runbooks).
RuleAn addressable statement with a stable ID, source citation, optional ACL groups, and optional override or supersession links.
ACL groupsCaller permission tags passed in groups. Permissions are evaluated before retrieval so unauthorized rules are never read, counted, or returned.
Governing ruleThe active rule that controls the answer after more specific exceptions beat broader defaults.
Overridden vs. supersededAn overridden rule still applies generally, just narrowed by a more specific exception. A superseded rule has been replaced by a newer version and stays out of active answers.
AbstentionAn explicit abstained: true response when no permitted rule covers the question, so your application or agent never invents a fallback.
Zero Data RetentionOptional per-request, per-key, or workspace-wide mode (X-Mackerel-ZDR: true) that omits raw query text from logs while keeping billing and trace metadata.

How Mackerel works

  1. Ingest policies and exceptions once

    Connect or upload policies, regional addenda, contract riders, and supersession links through the API or MCP.
  2. Enforce permissions before retrieval

    Caller groups filter restricted rules before candidates are evaluated. Unauthorized clauses never enter results or traces.
  3. Resolve override chains automatically

    Regional addenda, entity rules, and customer-tier exceptions automatically override broader defaults while retired revisions stay out of active answers.
  4. Return typed citations or abstain cleanly

    Every response returns governing, overridden, superseded, and a reproducible trace—or abstained: true when no authorized rule covers the question.

What Mackerel returns

POST/v1/search

DACH addendum (€95 cap) overrides the global €150 meal cap and keeps the retired 2024 handbook out.

Caller ACL groups:
Request JSON
{
  "corpus": "demo_sops",
  "query": "Can a contractor on our German entity expense a €140 client dinner?",
  "groups": [
    "finance-emea"
  ],
  "model": "mackerel-flash"
}
Response JSON

Click Run to query the demo_sops corpus.

Choose your path

Common questions