Policy-first capability filtering before agent execution #14305
Replies: 2 comments
|
Every stage in that chain narrows what can be invoked, and the provenance you record is of the selection rather than of what the selection then did. The case that decides the layer is the one after execution: a permitted capability ran and wrote the wrong thing, and reversing it needs the tenant and policy scope that middleware still holds and application code has already dropped. Where does the reversal live in AgentWeave today, given routing provenance stops at the selection? |
|
In Semantic Kernel (.NET and Python), spreading capability filtering across ad-hoc application code quickly creates security leaks and token bloat. The cleanest architectural split aligns with how SK structures its execution pipeline: 1. Hard Scope / RBAC at the DI & Kernel Boundary (Orchestration Layer)Deterministic filtering (tenant isolation, user identity, IAM roles, license tiers) should happen before tools ever touch the Why this must never be deferred to prompts or middleware:
In .NET SK, we handle this by creating scoped Kernels per request or filtering plugins during service resolution: // Only register plugins permitted for the active tenant/role
var kernel = new Kernel(serviceProvider);
var allowedPlugins = pluginCatalogService.GetAuthorizedPlugins(userContext);
foreach (var plugin in allowedPlugins)
{
kernel.Plugins.Add(plugin);
}2. Runtime Invocations & Safeguards (Middleware Layer:
|
Uh oh!
There was an error while loading. Please reload this page.
I’m exploring a production-oriented pattern for large agent/tool catalogs:
catalog
→ authorization / policy scope
→ optional task-aware routing
→ selected capabilities
→ normal agent execution
The key principle is that dynamic routing should not be mandatory.
If identity, role, tenant, permissions, or policy already reduce the catalog sufficiently, deterministic filtering should be preferred.
Only when the remaining action space is still large or heterogeneous should task-aware routing be added.
I’ve implemented this experimentally in AgentWeave with explicit routing provenance and runtime recovery.
I’d value feedback from Semantic Kernel users on where this responsibility should live:
planner, middleware, orchestration layer, or application code?
Repo: https://github.com/sauravsingla/agentweave
All reactions