Microsoft Agent Framework ↔ ASAP (interop)
July 19, 2026 · View on GitHub
How Microsoft Agent Framework (MAF) tool surfaces (in-process AIFunction / AITool, MCP) sit beside ASAP Host/Agent JWT and capability grants. Naming and packages below are accurate as of 2026-07-13 (MAF 1.0 GA).
!!! warning "Research / experimental — not maintained"
This page is **interop guidance** from Adapter Lab II (v2.5.3). It is **not** a first-class ASAP adapter like [Mastra](./mastra.md) or [OpenAI Agents](./openai-agents.md): there is **no** ASAP .NET SDK, **no** NuGet package, and **no** in-repo C# sample under `examples/`. Treat recommendations as research notes — they may change without a deprecation cycle.
Purpose
Use this when a .NET (or Python MAF) agent already speaks MAF tools / MCP and you need ASAP identity and authorization to remain the source of truth for remote capability execution.
This guide:
- Maps ASAP Agent JWT + capability grants to how MAF registers tools (
AIFunctionFactory/ MCPAITools). - States honest limits: conceptual interop only — you wire HTTP/JSON-RPC yourself (or via Python ASAP + MCP bridge).
- Points Semantic Kernel readers at Microsoft’s migration path (SK is legacy here).
Contrast with Lab I adapters: Mastra and OpenAI Agents ship TypeScript packages that turn ASAP capabilities into framework tools. MAF has no equivalent ASAP package in this release.
Requirements (your stack — not ASAP packages)
| Piece | Note |
|---|---|
| MAF .NET | NuGet Microsoft.Agents.AI (and MEAI AIFunction / AITool types) |
| MAF Python | PyPI agent-framework |
| ASAP side | Python asap-protocol (identity, grants, transport) and/or TypeScript @asap-protocol/client — not a .NET SDK |
| Docs | aka.ms/AgentFramework/Docs · microsoft/agent-framework |
Capability mapping
ASAP authorizes who may invoke which skill under which constraints. MAF decides how a model-visible tool is registered and invoked inside the agent runtime. Keep those layers distinct.
| ASAP concept | MAF-side analogue | Interop note |
|---|---|---|
| Capability / skill id (URN or manifest skill) | Tool name on an AIFunction / MCP tool | Prefer stable ids that match the ASAP grant / manifest skill — do not invent a parallel naming scheme |
| Capability input/output JSON Schema | Function parameters / MCP tool schema | Discover via ASAP describeCapability (or manifest); mirror into AIFunctionFactory.Create or MCP tool metadata |
| Agent JWT (caller identity) | Not a MAF primitive | Attach on outbound ASAP HTTP (Bearer / client config) or, for MCP stdio tools, _meta.asap_agent_jwt when using MCP Auth Bridge |
| Capability grant + constraints | Tool allowlist on the agent | Register only tools that correspond to granted capabilities; enforce again on the ASAP host (never trust MAF alone) |
| Approval / escalation | MAF human-in-the-loop (optional) | ASAP capability escalation remains the protocol path for expanding grants |
| Host identity / registration | Out of band | See Security and Migration — per-runtime agent identity |
Pattern A — In-process AIFunction wrapping ASAP execute
Register one MAF tool per granted ASAP capability. The tool body calls ASAP (task.request / capability execute) with the Agent JWT and capability URN.
Conceptual shape (.NET naming as of MAF 1.0):
// Pseudocode — no ASAP .NET SDK; use HttpClient / your JSON-RPC client.
AIFunction asapEcho = AIFunctionFactory.Create(
async (string message, CancellationToken ct) =>
{
// POST ASAP provider: execute granted capability with Agent JWT.
// capability id must match the grant (e.g. urn:...:echo).
return await ExecuteAsapCapabilityAsync("urn:asap:cap:echo", new { message }, ct);
});
AIAgent agent = chatClient.AsAIAgent(
instructions: "Use ASAP tools only when they match the user task.",
tools: [asapEcho]);
MAF docs: Function tools.
Pattern B — MCP tools as AITools (ASAP behind MCP)
MAF can list MCP server tools and pass them to the agent as AITool instances (MCP C# SDK → cast to AITool). If the MCP server is an ASAP-backed stdio process protected with protect_server, each protected tools/call must carry _meta.asap_agent_jwt; the bridge verifies JWT and grants.
MAF agent --MCP tools/call--> MCP server (asap.adapters.mcp.protect_server)
|
+-- verify Agent JWT + capability grant
+-- invoke underlying tool / ASAP skill
- MAF MCP client: Using MCP tools
- ASAP enforcement: MCP Auth Bridge, MCP integration
Do not treat MCP tool discovery alone as authorization — grants still live on the ASAP host.
What ASAP still owns
Regardless of MAF registration style:
- Identity — Host/Agent JWT lifecycle (register, revoke, rotate). See Security.
- Authorization — Capability grants, constraints, approval/escalation. See Capabilities.
- Wire contract — Envelope + JSON-RPC over HTTP/WebSocket; no protocol fork for MAF.
- MCP Mode A — Opt-in JWT + grant checks on stdio
tools/callvia the Auth Bridge.
MAF owns session memory, model routing, and local tool orchestration. ASAP owns remote trust.
Semantic Kernel (legacy / migration)
Semantic Kernel (SK) is on a maintenance track. Prefer MAF (Microsoft.Agents.AI / agent-framework) for new work. If you still run SK plugins/kernel functions, treat them like Pattern A: thin wrappers that call ASAP with a valid Agent JWT — then plan migration to MAF tools.
Microsoft migration: From Semantic Kernel. Background: SK and Microsoft Agent Framework.
Limits and non-goals
| Claim | Reality in v2.5.3 |
|---|---|
| First-class MAF adapter package | No — guide only |
| ASAP .NET / NuGet SDK | Does not exist |
In-repo C# sample / setup-dotnet CI | No (see S1b 2b.3 — deferred) |
| Protocol changes for MAF | Out of scope |
| Parity with Mastra / OpenAI Agents | Not claimed |
If you need a maintained TypeScript path today, use Mastra or OpenAI Agents. For HTTP workflow hosts → ASAP skills, see Workflow connectors.
Related
- Spike lock:
engineering/tasks/v2.5.3/research-semantic-kernel.md - Security — Agent JWT / Host identity
- Capabilities · Escalation
- MCP Auth Bridge · MCP integration
- Mastra · OpenAI Agents — maintained Lab I adapters
- MAF overview: learn.microsoft.com/agent-framework