Skip to content

Python: [Feature]: Add an AgentFuse FunctionMiddleware sample #7723

Description

@MkaliezZ

Description

Add a focused Python sample showing how an external AgentFuse RuntimeGuard can use the existing FunctionMiddleware boundary immediately before tool dispatch.

The sample should:

  • preserve the host-provided call_id without fabricating one when it is missing;
  • let allowed calls continue through the existing FunctionTool.invoke path;
  • return a terminal non-execution result for policy blocks or guard evaluation failures;
  • leave handler failures after an allow decision under Agent Framework ownership;
  • preserve task cancellation;
  • remain sample-only, with no framework API or production packaging changes.

This is a concrete external-policy example of the execution-boundary pattern discussed in #5366, but it does not attempt to close that broader issue.

Code Sample

Draft implementation: #7719

Language/SDK

Python

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

pythonUsage: [Issues, PRs], Target: Python

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions