Skip to content

feat(guardrails): AGENT_INPUT field source for pre-execution rules [AL-410]#1604

Open
valentinabojan wants to merge 1 commit intomainfrom
valentinabojan/al-410-agent-input-source
Open

feat(guardrails): AGENT_INPUT field source for pre-execution rules [AL-410]#1604
valentinabojan wants to merge 1 commit intomainfrom
valentinabojan/al-410-agent-input-source

Conversation

@valentinabojan
Copy link
Copy Markdown
Contributor

@valentinabojan valentinabojan commented Apr 29, 2026

Summary

  • Adds FieldSource.AGENT_INPUT so deterministic guardrail rules can reference the agent's validated input parameters (caller-context gating: role/tier/region/dry-run, etc.).
  • Threads an optional agent_input dict through evaluate_pre_deterministic_guardrail only — agent_input rules are pre-execution by design.
  • Validates DeterministicGuardrail configs to reject mixing AGENT_INPUT with output-dependent rules (such guardrails would be classified as post-execution and silently no-op).

Phase A of AL-405. This PR ships the SDK data-model + evaluator. Sibling PRs in uipath-langchain-python and uipath-agents-python thread agent_input from graph state and surface it in observability.

Tracked: AL-410.

Test plan

  • uv run pytest tests/guardrails/ — 48 passed (40 existing + 8 new)
  • uv run mypy src/uipath/core/guardrails/ — clean
  • uv run ruff check . && ruff format --check . — clean
  • New tests cover: pre-evaluation matching/violating agent_input, missing agent_input (silent pass), all-fields selector, validator rejecting AGENT_INPUT+OUTPUT in same rule, validator rejecting AGENT_INPUT paired with output universal rule, post-evaluation does NOT receive agent_input, JSON PascalCase normalization.

🤖 Generated with Claude Code

Lets deterministic guardrail rules reference the agent's validated
input parameters via FieldSource.AGENT_INPUT (e.g. caller-context
gating: role/tier/region/dry-run). Pre-execution only — agent_input
is not threaded into post evaluation; a config validator rejects
guardrails that mix AGENT_INPUT with output-dependent rules.

AL-410 / AL-405 (Phase A).
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime test:uipath-integrations labels Apr 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test:uipath-integrations test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-runtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant