Company Knowledge Bases for AI Agents: Curation, Drift, and Live Access
The wrong default: ingest and index everything
In this context, indexing means building a searchable copy of content for agents: a keyword index, an embedding store, or both, so retrieval can find passages without opening every upstream system on every question. Ingest is how text enters that copy. Reindex is how the searchable layer refreshes after an accepted change. None of that requires copying the whole company into one vector database on day one.
When teams first give coding agents “company context,” the instinct is still to dump Drive folders, Confluence spaces, ticket exports, and Slack history into that index. Retrieval gets noisy, permissions get wrong, and yesterday’s process doc still ranks above the runbook people actually use. The same mistake shows up on the tool side: expose every API and every agent skill “just in case,” burn tokens on definitions the agent never needs, and widen the attack surface.
The useful default is narrower: ingest only approved sources, then keep those sources honest. Subscribe to change notifications (webhooks, git hooks, ticket events). When something changes, decide whether to reingest. New pages in an approved space often deserve a fresh ingest. Body edits on pages you already hold usually do not need an immediate embedding rebuild; a daily reindex is enough for most RAG setups, and keyword catalogs can refresh from content hashes without calling a model. Live connectors still answer “what is true in this system right now” without duplicating every row into the corpus.
Curation beats coverage
Deciding what is allowed into the company knowledge base stays a curated process, even when AI drafts candidates. Automation owns sync and reindex after approval, not the membership of the allowlist. Treat tools the same way: a short allowlist of capabilities beats a discoverable catalog of everything the company can call.
- Prefer company-approved, continuously updated sources (living standards, owned runbooks, current API contracts) over abandoned Word docs that still sit in search.
- Vet before ingest. Named ownership, freshness, audience, and whether the doc still matches how the company works today. If nobody owns the process, do not put it in the default retrieval path.
- Keep legacy out of default rank until someone rewrites or retires it. Archive is fine; default retrieval is not.
- Curate tools and skills on demand. Load specialized procedures when the task needs them. Do not park every integration in permanent agent context.
Keeping approved material aligned with real process is hard even without AI. AI can propose updates and flag stale pages. It does not remove the need for human approval before those edits affect every coworker’s assistant.
Drift across the central KB, subprojects, and tools
The main failure mode is not a cold index. It is drift between the approved central knowledge repository and everywhere else the company writes process: subproject READMEs, wiki forks, ticket macros, Notion spaces inside tools, help-center drafts, and “docs” tabs bolted onto products. Teams paste a link to the central KB, or copy a paragraph into a tool, and then nobody checks whether the copy still matches. Agents happily cite whichever copy ranked first.
When existing code and a documented pattern disagree, follow the documented pattern (company skill, owned runbook, approved KB page), not “a sibling module does the same.” Repos hold stale rollouts, workarounds, and mistakes. If you defend a design choice, cite the rule. If no approved rule exists, say so instead of laundering a local hack into company policy through the agent.
You need a continuous process that watches the tools the company owns, not a quarterly wiki clean-up. A practical loop:
- Ingest change signals from approved sources and from satellite docs (webhooks, repo events, export diffs), not a blind full crawl of the enterprise.
- Score cheap drift first. Compare the new text (or a hash/embedding delta) to the last approved central version. Accumulate a daily drift score so small edits do not wake an expensive model every time.
- Run an AI drift check only past a threshold. That step explains what diverged, whether the satellite copied stale policy, or whether the central page itself is behind reality.
- Act with an owner on the hook: notify the tool or doc owner, and/or open a note on the central repository so the approved corpus records the conflict. Do not auto-merge either side without review.
That loop only works if every relevant tool and doc surface has ownership at a person or team level. Someone must be accountable to act on insights: retire a fork, update the central page, or mark a satellite as non-authoritative. Unowned tools become silent drift sources forever.
Architecture that works in practice
Put the pieces together as layers. Names vary; the jobs do not. Goal: one shared, governed knowledge surface many agents can read, instead of each team holding a private copy of “the company,” plus the drift loop above to keep satellites honest.
- Source systems of record with real ACLs (git, ticket tools, wiki, warehouse, CRM). Prefer querying with the caller’s identity over copying secrets into a flat index.
- Approved-source connectors with change notifications that ingest new pages when needed, schedule reindex for body changes (often daily for embeddings), and expose live tools for “current state” questions. Agents should not bypass the owning system to hit databases or indexes directly.
- Curated central corpus for stable standards: cleaned text, stable IDs, ownership, priority, and citations. Separate read scopes from write scopes so a retrieval-only agent cannot silently edit the store.
- Retrieval and ranking that combine keyword and semantic search, boost approved/fresh/high-priority sources, and apply permission filters before generation.
- Agent tools and skills as governed contracts: schemas, permissions, rate limits, egress, and identity. Teach search-then-cite, when to use live systems versus the corpus, and when to ask a human.
- Write path with gates so agent-proposed doc changes are reviewed before they go live for everyone.
- Ownership maps + drift pipeline as first-class architecture (not a wiki afterthought): who owns each satellite surface, and how cheap scores escalate to AI review and owner action.
Tech that is useful nowadays
Architecture names the jobs. This section goes deeper on how to implement them: retrieval quality first, then sync and drift machinery, then how you operate agents on cost, models, telemetry, and evals.
Retrieval and answers
- Hybrid retrieval: keyword search (exact IDs, owners, error strings, policy names) plus embeddings for paraphrased questions, then a rank that also boosts approved, fresh, high-priority sources. Metadata filters (space, product, audience) cut noise before the model sees candidates. Pure “embed the company once” usually fails on both precision and permissions. Rebuild embeddings on a calm schedule after accepted ingest; do not re-embed on every webhook if a daily pass is enough.
- Citation-first RAG: every answer returns document IDs and links. No citation, no trust for process questions. Treat retrieved text as untrusted input: it can carry indirect prompt injection the same way a poisoned web page can.
- Least-privilege tool design: prefer tools already scoped to the current case (this ticket, this customer, this repo) over tools that take an ID parameter the model can be tricked into swapping. Capability handles beat ambient god-mode credentials.
Sync, drift, and durable jobs
- Durable sync and review workflows: webhook-driven ingest for approved sources, human gates on new membership in the corpus, automatic reindex after acceptance, retries and visible history when a sync fails. That is operative workflow work (queues with durability), not a weekend cron that silently drops events. See operative flows vs ETL vs analytics for why that lane stays separate from batch warehouse jobs.
- Implement the drift loop cheaply: on each change signal, compare satellite text (or a hash / embedding) to the last approved central version and accumulate a daily drift score. Only past a threshold do you spend a stronger model to explain what diverged. Then notify the owner and/or file a note on the central KB. The process is in the drift section; the tech is thresholding cost so continuous watch stays affordable.
Operating agents: cost, models, telemetry, evals
- Agent monitoring and cost control: treat production agents like any other paid workload. Watch spend and quality continuously: tokens in and out, cache hit rate, retries, tool-call volume, loop length, latency per turn, and failure modes. Set budgets and alerts per use case before the bill becomes a surprise. Optimize by shrinking context, caching stable prefixes, capping tool loops, and routing cheap work away from frontier models.
- Multi-model routing: run several models at once for different jobs. Models in the same family differ on price, latency, and reasoning depth; models across families differ on tool use, long context, code, and stubbornness under messy company docs. Use a small fast model for classification, routing, and cheap drift scoring; a stronger one for synthesis and citations; a specialized one where it wins. Keep the routing table explicit and owned so cost and quality tradeoffs stay intentional.
- MLOps telemetry linked to use-case ROI: store every call and agent turn with enough structure to decide: use case / product ID, model, prompt and completion sizes, cache hits, tools invoked, latency, tokens, cost, outcome, and user or ticket identity when allowed. Aggregate by use case so finance and owners see budget, unit cost, success rate, and ROI, not a single opaque “AI” line item. Without that join key, you cannot tell which workflows earn their keep and which only burn tokens.
- Eval sets and frozen fixtures: agents that call live tickets, wikis, and APIs are hard to score unless you freeze the world. Snapshot or mock every external resource the agent can touch for a given suite, pin the curated corpus revision under test, and grow that fixture set as new failure modes appear. Automation and AI make building and refreshing those mocks practical now; guessing against a moving production tenant does not. Ownership maps still matter: failed evals and drift alerts need a person or team who must act.
Where to start
This differs from a personal knowledge base: there you optimize for your own taste on machines you control; here you need shared ownership, permissions, continuous approval, and drift checks across company tools. Keep the deployments separate. Start with:
- List the five sources agents must not get wrong (security, billing, deploy, support, hiring).
- Mark each as live query, curated corpus, or out of scope; name a person or team owner.
- Wire change notifications for those approved sources (webhooks or git events).
- Shrink the default tool catalog to what those five need; load the rest on demand.
- Turn off default retrieval for known legacy spaces and unowned satellite docs.
- Add citation filters and hybrid retrieval before you scale embeddings.
- Stand up one cross-tool drift loop (cheap daily delta score → thresholded AI check → notify owner / note on central KB) and a human review queue for writes.
- Tag production traffic with a use-case ID from day one so cost, quality, and ROI can be read per workflow, not as one AI blob.
Get in touch if you want a second opinion on the boundary between personal agent setup and company corpus design.