Skip to content
Context for agents

Semantic Kernel with internal company data, scope and an audit trail

Use Microsoft Semantic Kernel to orchestrate plugins and agents while keeping corporate context under control: approved sources, scope per collection, permissions and evidence per interaction. You keep the SDK; Contextfy governs the knowledge it consumes, over REST or MCP.

Assess how to give your Semantic Kernel governed context

What Semantic Kernel is and what it solves

Microsoft Semantic Kernel is an open-source SDK from Microsoft for orchestrating language models, plugins and agents inside an application. It provides abstractions to connect to different model providers, expose functions as plugins, chain calls and compose agents that decide which tools to invoke. It is available in languages such as C#, Python and Java, and is designed to drop into existing applications.

The SDK handles orchestration: how the agent reasons, when it calls a plugin and how it combines model output. What it does not define is where the corporate knowledge each plugin uses comes from, which version of that content is in force, or who is allowed to access it. That is where feeding Semantic Kernel with internal data stops being an API call and becomes a question of context governance.

In practice, teams usually write a retrieval plugin that fetches internal documents and injects the result into the prompt. It works in the demo. The risk shows up when that plugin has to respect permissions, separate approved material from drafts and prove where each answer came from in production.

Why connecting Semantic Kernel to company data needs governance

Connecting the SDK to enterprise knowledge is what makes the agent genuinely useful, and also what creates exposure. An agent orchestrating plugins over contracts, policies, proposals and tickets only delivers value if it answers from what is correct and authorized, not from whatever snippet retrieval returns.

The enterprise buyer reads this through the outcome: a Semantic Kernel pilot that demos well but that nobody trusts to serve a customer or support a decision never reaches production. The gap between experiment and operational capability is not in the SDK; it is in the context it consumes.

Governance here is not a brake. It is the mechanism that lets you put more agents into production with less manual review rework and lower operational risk. When the knowledge a plugin retrieves already arrives approved, with scope applied and an evidence trail, internal sign-off happens faster and the path from pilot to operation gets shorter.

Risks of a retrieval plugin without governed context

When each Semantic Kernel plugin builds its own search over internal data, the same problems recur in production:

  • Answers without a source. The plugin injects snippets into the prompt, but the application cannot prove where the answer came from or which version backed each claim.
  • Scope in plugin code. Controlling who sees what inside each plugin is brittle; one execution path is enough for an agent to reach content outside its remit.
  • Drafts treated as official. Without separating approved material from drafts, the agent cites a document that has not been through curation yet.
  • Duplicated retrieval. Several plugins and agents reimplement search in different ways, producing divergent answers to the same question.
  • No honest refusal. With no criterion for missing sources, the agent fills the gap with a guess instead of admitting there is no approved basis to answer.

Where Contextfy fits: governed context + Semantic Kernel

Instead of each Semantic Kernel plugin carrying its own retrieval, it calls a governed context layer. Contextfy ingests and versions corporate sources, applies scope per collection and permissions at query time, and records evidence per interaction. The SDK stays responsible for orchestration; the knowledge it consumes becomes consistent, authorized and traceable.

The flow is simple: sources feed the context layer; the Semantic Kernel retrieval plugin queries that layer over REST or MCP; the agent answers from approved sources and refuses when context is insufficient.

Fontes

Drive, SharePoint, ERP, CRM, PDFs, APIs

Contextfy · Context Engine

Organiza · versiona · governa · observa o contexto

Runtimes

via MCP · API · conectores · pipelines

How to connect Semantic Kernel to governed context

You keep orchestration as it is. The change lives in the retrieval plugin: instead of querying indexes or documents directly, it calls governed tools over MCP, such as search_context and ask_with_sources, or the REST endpoints /v1/search and /v1/ask. The plugin stops carrying its own search logic and starts receiving snippets with a source, a score and a signal for when context is insufficient.

Scope is defined outside the plugin code. Each API key carries its allowed collections, and serving intersects that scope with what the query asks for, so an agent never reaches content outside its remit. Approved sources and drafts stay separated by the approval cycle, so the agent only consumes what has already been curated.

MCP is usually the cleaner path when the application already speaks the protocol and you want minimal changes to the kernel; REST fits better when there is pre or post-processing between plugins. In both cases Contextfy is an independent layer connected over open interfaces. There is no promised native connector and no dependency on a specific SDK version; the compatibility described is architectural, based on REST and MCP, not an off-the-shelf integration.

Where governed Semantic Kernel fits in real operations

The pairing fits best where answering correctly, with a source, matters more than sounding clever:

Support and service

An agent that answers from the official procedure in force, cites its source and refuses when no approved basis exists, instead of inventing a step outside the playbook.

Sales and pre-sales

Plugins that assemble technical and commercial answers from playbooks, pricing policies and materials in their current version, with a trail of what was used.

Operations and back office

A copilot over SOPs, manuals and contracts, with scope per area and inherited permissions, reducing dependence on key people.

Customer success and onboarding

Standardized operational knowledge across units and shifts, with consistent, traceable answers.

Frequently asked questions

Does Contextfy replace Semantic Kernel?

No. Semantic Kernel is the SDK that orchestrates models, plugins and agents in your application. Contextfy is the layer that prepares and governs the context those plugins consume. They are complementary: you keep Semantic Kernel and gain control over the knowledge.

How do I give Semantic Kernel governed context from company data?

Centralize plugin retrieval in Contextfy's context layer, consumed over MCP (tools such as search_context and ask_with_sources) or over REST (/v1/search and /v1/ask). The kernel stays yours; each plugin starts receiving snippets with an approved source, scope applied and a trail keyed by traceId, instead of building its own search.

Can I control which sources each Semantic Kernel agent accesses?

Yes. Scope is defined per collection and tied to the API key, outside the plugin code. At serving time, the key's scope is intersected with the query, so no agent reaches content outside its remit. Approved sources and drafts stay separated by the approval cycle.

Can the agent refuse when there is no trustworthy source?

Yes, when retrieval is governed. Without an approved source covering the question, the plugin receives insufficient_context and the agent refuses instead of inventing. Each interaction is recorded in the Evidence Log with sources, outcome and a traceId, giving traceability for audit and security.

Is there a native integration or official partnership with Microsoft?

No. Contextfy is an independent governed-context layer and does not claim official partnership, certification or native integration with Microsoft or Semantic Kernel. The connection is architectural, over open interfaces (REST and MCP), and does not depend on a specific SDK version.

Can I switch SDKs or use another runtime later?

Yes. The context base is framework-independent. Migrating from Semantic Kernel to another runtime, or running both in parallel, does not require rebuilding the context layer, because governed knowledge is served over the same interfaces.

Free assessment: we design the retrieval plugin and the context scope for the pilot.

Assess how to give your Semantic Kernel governed context