Skip to content

feat(platform): add source=agents baggage to guardrails trace headers#1770

Merged
ctiliescuuipath merged 1 commit into
mainfrom
feat/guardrails-source-baggage
Jun 29, 2026
Merged

feat(platform): add source=agents baggage to guardrails trace headers#1770
ctiliescuuipath merged 1 commit into
mainfrom
feat/guardrails-source-baggage

Conversation

@ctiliescuuipath

Copy link
Copy Markdown
Contributor

Summary

  • Passes extra_baggage=["source=agents"] to build_trace_context_headers() in GuardrailsService.evaluate_guardrail() so the server can identify requests originating from the agents runtime
  • Bumps uipath-platform to 0.1.78 and updates uipath dependency accordingly

Test plan

  • Existing guardrails service tests pass (16/16) — no test changes needed since the extra_baggage param is an internal detail not asserted by tests
  • Verified build_trace_context_headers already accepts the extra_baggage parameter

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings June 29, 2026 09:18

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds an agents source marker into trace context headers for Guardrails evaluations so downstream services can attribute guardrails traffic to the agents runtime, and bumps the uipath-platform dependency/version to include this behavior across the SDK.

Changes:

  • Passes extra_baggage=["source=agents"] into build_trace_context_headers() from GuardrailsService.evaluate_guardrail().
  • Bumps uipath-platform from 0.1.77 to 0.1.78 and updates uipath’s dependency constraint accordingly.
  • Regenerates uv.lock files (including updated exclude-newer metadata and the uipath-platform version entry).

Reviewed changes

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/uipath-platform/src/uipath/platform/guardrails/_guardrails_service.py Adds source=agents baggage to guardrails trace headers.
packages/uipath-platform/pyproject.toml Bumps uipath-platform version to 0.1.78.
packages/uipath-platform/uv.lock Lockfile update reflecting 0.1.78 and regenerated exclude-newer metadata.
packages/uipath/pyproject.toml Updates uipath-platform dependency minimum to 0.1.78.
packages/uipath/uv.lock Lockfile update reflecting 0.1.78 and regenerated exclude-newer metadata.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

)
# Include trace context headers for server-side span correlation
trace_headers = build_trace_context_headers()
trace_headers = build_trace_context_headers(extra_baggage=["source=agents"])

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines 126 to 128
# Include trace context headers for server-side span correlation
trace_headers = build_trace_context_headers()
trace_headers = build_trace_context_headers(extra_baggage=["source=agents"])
request_headers = {**(spec.headers or {}), **trace_headers}
… headers

Pass extra_baggage=["source=agents"] to build_trace_context_headers() in
GuardrailsService so the server can distinguish guardrail validation
requests originating from the agents runtime.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@ctiliescuuipath ctiliescuuipath force-pushed the feat/guardrails-source-baggage branch from 4e33784 to 4b885b5 Compare June 29, 2026 09:28
@github-actions github-actions Bot added test:uipath-langchain Triggers tests in the uipath-langchain-python repository test:uipath-integrations labels Jun 29, 2026
@ctiliescuuipath ctiliescuuipath enabled auto-merge (squash) June 29, 2026 09:29
@ctiliescuuipath ctiliescuuipath merged commit aa84456 into main Jun 29, 2026
92 checks passed
@ctiliescuuipath ctiliescuuipath deleted the feat/guardrails-source-baggage branch June 29, 2026 09:30
@sonarqubecloud

Copy link
Copy Markdown

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants