Proposal
Add an official Python example/docs integration showing HOL Guard as a concrete FunctionMiddleware enforcement layer for Agent Framework tool calls.
Agent Framework already has the right runtime boundary for this without a new generic API: FunctionMiddleware receives the FunctionInvocationContext before the wrapped function runs, and MiddlewareFailure provides an explicit fail-closed abort path.
The proposed official example would:
- install and configure HOL Guard as the named security runtime;
- evaluate the current function name and validated arguments in
FunctionMiddleware.process(...) before call_next();
- call
call_next() only for an allow decision;
- on deny, review-required, or Guard-unavailable/error paths, terminate before the wrapped tool executes, using Agent Framework's existing fail-closed middleware semantics;
- include a focused test/example demonstrating
allow => tool executes once and deny/failure => tool executes zero times.
This is intentionally a direct HOL Guard integration example, not a request for a new provider-neutral middleware abstraction or framework API. It would live in Agent Framework's official sample/docs surface so users can adopt the integration from the project itself.
If this placement sounds useful, I'm happy to send the smallest fork-first PR against main and keep it limited to the example/docs plus the minimal verification requested by maintainers.
Proposal
Add an official Python example/docs integration showing HOL Guard as a concrete
FunctionMiddlewareenforcement layer for Agent Framework tool calls.Agent Framework already has the right runtime boundary for this without a new generic API:
FunctionMiddlewarereceives theFunctionInvocationContextbefore the wrapped function runs, andMiddlewareFailureprovides an explicit fail-closed abort path.The proposed official example would:
FunctionMiddleware.process(...)beforecall_next();call_next()only for an allow decision;allow => tool executes onceanddeny/failure => tool executes zero times.This is intentionally a direct HOL Guard integration example, not a request for a new provider-neutral middleware abstraction or framework API. It would live in Agent Framework's official sample/docs surface so users can adopt the integration from the project itself.
If this placement sounds useful, I'm happy to send the smallest fork-first PR against
mainand keep it limited to the example/docs plus the minimal verification requested by maintainers.