Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat(openai-agents) Add guardrail spans #4847

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
antonpirker wants to merge 5 commits into master
base: master
Choose a base branch
Loading
from antonpirker/openai-agents-guardrail-span

Conversation

@antonpirker
Copy link
Contributor

@antonpirker antonpirker commented Sep 23, 2025
edited
Loading

Description

Add spans for input- and output-guardrails defined in OpenAI agents SDK.
Right now the spans have a new op set (gen_ai.guardrail.input or gen_ai.guardrail.output) but the rest of the attributes follows the convention of a tool (because guardrails are kind of a special tool).

One new span attribute is introduced "gen_ai.guardrail.tripwire_triggered" because guardrails is not part of thee OTel Semantic Conventions for AI.

  • Tests are missing to make sure guardrail spans are added correctly and that errors in guardrails are handled properly.

Issues

  • resolves: PY-1703

Copy link

linear bot commented Sep 23, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

AltStyle によって変換されたページ (->オリジナル) /