Skip to content

Python: add vendor-neutral command guard filter sample - #14636

Closed
varunc12502-oss wants to merge 1 commit into
microsoft:mainfrom
varunc12502-oss:varunc12502-oss-issue-14573
Closed

varunc12502-oss wants to merge 1 commit into
microsoft:mainfrom
varunc12502-oss:varunc12502-oss-issue-14573

Conversation

@varunc12502-oss

Copy link
Copy Markdown

Addresses the discussion in #14573.

Python SK already supports function invocation filters, but there is no example of using one as a guard that blocks a tool call before it runs.

What this adds:

  • samples/concepts/filtering/command_guard_filter.py: a filter factory that takes any scanner with scan(command) (sync or async) and skips the call if it is not allowed. No third-party dependency.
  • 5 unit tests in tests/unit/kernel/test_command_guard_filter_sample.py.
  • An entry in the concepts README.

Opening as a draft to get maintainer feedback on whether this belongs in the samples.

@semantic-kernel-automation semantic-kernel-automation Bot added python Pull requests for the Python Semantic Kernel documentation labels Oct 21, 2026
@varunc12502-oss

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@eavanvalkenburg

Copy link
Copy Markdown
Member

Thank you for the contribution. We are not currently accepting new features in Semantic Kernel. This PR adds a new command-guard sample. Please direct new feature work to Microsoft Agent Framework instead.

Closing this PR under that policy.

@varunc12502-oss
varunc12502-oss deleted the varunc12502-oss-issue-14573 branch November 2, 2026 13:37

This branch was previously deployed

1 inactive deployment
github-app-auth — 807fec60 Deployed Oct 21, 2026 by varunc12502-oss via team_check #655
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation python Pull requests for the Python Semantic Kernel

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants