Skip to content

feat(skills-next): add python SDK references#248

Merged
evanpurkhiser merged 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-python-sdk-references
Jul 9, 2026
Merged

feat(skills-next): add python SDK references#248
evanpurkhiser merged 1 commit into
mainfrom
evanpurkhiser/feat-skills-next-add-python-sdk-references

Conversation

@evanpurkhiser

Copy link
Copy Markdown
Member

Direct LLM port of the existing python SDK skill into the skills-next per-SDK reference layout under skills-next/references/sdks/python/. This content has NOT been reviewed at all — it is a machine-generated port of the existing SDK skill, and every file should be treated as unverified.

Comment thread skills-next/references/sdks/python/index.md
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-skills-next-add-python-sdk-references branch from bf4b990 to 2a8e75f Compare July 2, 2026 21:14
Comment thread skills-next/references/sdks/python/index.md Outdated
Comment thread skills-next/references/sdks/python/index.md Outdated
@dingsdax dingsdax requested a review from a team July 6, 2026 08:49
| Anthropic | `sentry-sdk` | anthropic 0.16.0+ | ✅ Yes | Stable |
| LangChain | `sentry-sdk` | langchain 0.1.0+ | ✅ Yes | Stable |
| LangGraph | `sentry-sdk` | langgraph 0.6.6+ | ✅ Yes | Stable |
| OpenAI Agents SDK | `sentry-sdk` | agents 0.0.19+ | ✅ Yes | ⚠️ Beta |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why is this beta?

| HuggingFace Hub | `sentry-sdk` | huggingface_hub 0.24.7+ | ✅ Yes | Stable |
| LiteLLM | `sentry-sdk` | litellm 1.77.5+ | ❌ **No** | Stable |
| MCP | `sentry-sdk` | mcp 1.15.0+ | ✅ Yes | Stable |
| Pydantic AI | `sentry-sdk` | pydantic-ai 1.0.0+ | ✅ Yes | ⚠️ Beta |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

why is this beta?

Comment on lines +189 to +198
### `gen_ai.handoff` — Agent-to-agent transition

```python
import sentry_sdk

with sentry_sdk.start_span(op="gen_ai.handoff",
name="handoff Billing → Refund Agent") as span:
span.set_data("gen_ai.agent.name", "Refund Agent")
result = refund_agent.run(context=billing_context)
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Please remove, a handoff is a just a special tool execution.

import sentry_sdk.ai

# Set at the start of a conversation
sentry_sdk.ai.set_conversation_id("conv_abc123")

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Don't use this API

Suggested change
sentry_sdk.ai.set_conversation_id("conv_abc123")
sentry_sdk.set_attribute("gen_ai.conversation.id", "conv_abc123")

@alexander-alderman-webb alexander-alderman-webb left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I guess this is just a port, that's fine then

@evanpurkhiser

Copy link
Copy Markdown
Member Author

Well, I'm trying to get these as correct as we can :)

@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-skills-next-add-python-sdk-references branch from 2a8e75f to 059df49 Compare July 7, 2026 15:16
@evanpurkhiser

Copy link
Copy Markdown
Member Author

Automated fixes pushed addressing the review feedback on this PR:

  • index.md + tracing.md: added the missing import os to snippets that use os.environ.
  • index.md: fixed the "Auto-enabled vs Explicit" table — AI integrations map to OpenAIIntegration/AnthropicIntegration/etc. (not OpenTelemetryIntegration), and logging is auto-enabled (not paired with WSGI/ASGI); reworded the Django "before any imports" note.
  • ai-monitoring.md: removed the gen_ai.handoff section (a handoff is just a special tool execution); replaced the discouraged API with sentry_sdk.set_attribute("gen_ai.conversation.id", ...).

Note: the "why is this beta?" labels (OpenAI Agents SDK, Pydantic AI) were verified correct against the docs and left as-is.

Comment thread skills-next/references/sdks/python/index.md
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/feat-skills-next-add-python-sdk-references branch from 059df49 to 884c26f Compare July 8, 2026 19:54
@evanpurkhiser evanpurkhiser merged commit 1f54c53 into main Jul 9, 2026
18 checks passed
@evanpurkhiser

Copy link
Copy Markdown
Member Author

Merging these ahead of review to get the ball rolling on the new skills layout. @cleptric will follow up with SDK teams to finesse the content of the SDK references.

@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/feat-skills-next-add-python-sdk-references branch July 9, 2026 18:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants