feat: Add deterministic guardrails filtering action#364
Merged
apetraru-uipath merged 1 commit intomainfrom Dec 22, 2025
Merged
Conversation
9466d59 to
b3a5dea
Compare
b3a5dea to
8d2584d
Compare
edc660b to
c867d87
Compare
Contributor
valentinabojan
left a comment
There was a problem hiding this comment.
Please bump the package version (and update it in uipath-agents).
Also, please update the PR description to reflect the latest state of the changes.
a369899 to
25b108d
Compare
| if not msgs: | ||
| return {} | ||
|
|
||
| # Find the AIMessage with tool calls (might not be the last message at POST_EXECUTION) |
Contributor
There was a problem hiding this comment.
Why do we have logic for POST execution for input filtering?
Contributor
Author
There was a problem hiding this comment.
It was an obsolete comment. I update it!
435583a to
44daf41
Compare
valentinabojan
approved these changes
Dec 22, 2025
44daf41 to
6e452d2
Compare
mjnovice
pushed a commit
that referenced
this pull request
Mar 31, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Filter Action Implementation - PR Summary
Overview
Implements filter action for deterministic tool guardrails, allowing selective removal of input/output fields based on guardrail rules.
Key Features
✅ Execution Stage Awareness
✅ Python Dict String Handling
ast.literal_eval()fallback for tool outputs stored as dict string representations✅ Type Safety & Code Quality
BaseGuardrailannotationstest_utils.py→test_guardrails_utils.py)GuardrailSelectortypesImplementation Details
Modified Files
filter_action.py- Core filtering logic with stage-aware field filteringutils.py- Enhanced data extraction with dict literal parsingguardrails_factory.py- Type safety improvementsguardrails_subgraph.py- Bug fix for POST_EXECUTION node routingTest Coverage
Validation
Tested against 7 agent configurations covering: