You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #6528 (merged) added a sample demonstrating deterministic validation at the tool-execution boundary (#5366), delegating detection to the open-source Agent Threat Rules (ATR) ruleset via the pyatr engine: python/samples/02-agents/middleware/atr_validation_middleware.py.
Today it is only a sample. This proposes promoting it to a first-class installable package, agent-framework-atr, mirroring the agent-framework-purview security-middleware package, so it gets pip-installable distribution, IDE autocompletion, and docs.
ATRAgentMiddleware (AgentMiddleware): scans inbound user messages and blocks the run on a match.
ATRDetector: a shared wrapper over the local pyatr engine; detection is deterministic with no model call in the enforcement path.
Depends on agent-framework-core + pyatr (MIT, pure-Python, only needs pyyaml which core already ships).
Open questions for maintainers
Do you want ATR as a first-class packaged provider, or should it stay a sample?
Package name: agent-framework-atr — acceptable?
Namespace: Purview is surfaced under agent_framework.microsoft. ATR is an independent, open standard (not a Microsoft product), so I have kept the public import path as agent_framework_atr and deliberately did not add it to agent_framework.microsoft. Does that match your preference, or would you rather it be surfaced under a namespace?
I have an implementation ready and will open a PR referencing this issue. Happy to adjust naming, scope, or namespace based on your answer.
Background
PR #6528 (merged) added a sample demonstrating deterministic validation at the tool-execution boundary (#5366), delegating detection to the open-source Agent Threat Rules (ATR) ruleset via the
pyatrengine:python/samples/02-agents/middleware/atr_validation_middleware.py.Today it is only a sample. This proposes promoting it to a first-class installable package,
agent-framework-atr, mirroring theagent-framework-purviewsecurity-middleware package, so it gets pip-installable distribution, IDE autocompletion, and docs.Proposed scope
ATRFunctionMiddleware(FunctionMiddleware): deterministic block at the tool-execution boundary (the Add deterministic validation at execution boundary for agent actions #5366 pattern) — checks beforecall_next(), so a matched tool never runs.ATRAgentMiddleware(AgentMiddleware): scans inbound user messages and blocks the run on a match.ATRDetector: a shared wrapper over the localpyatrengine; detection is deterministic with no model call in the enforcement path.agent-framework-core+pyatr(MIT, pure-Python, only needs pyyaml which core already ships).Open questions for maintainers
agent-framework-atr— acceptable?agent_framework.microsoft. ATR is an independent, open standard (not a Microsoft product), so I have kept the public import path asagent_framework_atrand deliberately did not add it toagent_framework.microsoft. Does that match your preference, or would you rather it be surfaced under a namespace?I have an implementation ready and will open a PR referencing this issue. Happy to adjust naming, scope, or namespace based on your answer.