feat(guardrails): forward agent_input to deterministic pre-evaluation [AL-410]#815
Open
valentinabojan wants to merge 1 commit intomainfrom
Open
feat(guardrails): forward agent_input to deterministic pre-evaluation [AL-410]#815valentinabojan wants to merge 1 commit intomainfrom
valentinabojan wants to merge 1 commit intomainfrom
Conversation
When an input_schema is configured, the agent's validated input parameters are extracted from graph state and passed to DeterministicGuardrailsService.evaluate_pre_deterministic_guardrail so rules can reference FieldSource.AGENT_INPUT (uipath-core 0.5.14+). Plumbs input_schema through create_tool_guardrail_node / _create_guardrail_node; extraction reuses extract_input_data_from_state. Post-execution is unchanged — agent_input rules are pre-only by design. AL-410 / AL-405 (Phase A).
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.
Summary
input_schemais configured, the agent's validated input dict is extracted from graph state via the existingextract_input_data_from_statehelper and passed toDeterministicGuardrailsService.evaluate_pre_deterministic_guardrailso rules can referenceFieldSource.AGENT_INPUT.input_schemathroughcreate_tool_guardrail_node/_create_guardrail_node(additions are positional with safe defaults).Depends on the SDK changes in https://github.com/UiPath/uipath-python (uipath-core ≥ 0.5.14 carrying
FieldSource.AGENT_INPUT). Phase A of AL-405; tracked under AL-410.Test plan
pytest tests/agent/guardrails/ tests/cli/test_agent_with_guardrails.py tests/cli/test_guardrails_in_langgraph.py— 294 passed (with locally-installed editable uipath-core 0.5.14)ruff check .andruff format --check .— cleanmypy src/uipath_langchain/agent/guardrails/ src/uipath_langchain/agent/react/guardrails/— clean🤖 Generated with Claude Code