feat: add OpenAI Agents SDK example with PostHog instrumentation#31
feat: add OpenAI Agents SDK example with PostHog instrumentation#31andrewm4894 merged 2 commits intomainfrom
Conversation
- Add python/openai_agents/ module with multi-agent example - TriageAgent routes to WeatherAgent, MathAgent, or GeneralAgent - Includes weather tool and calculate tool demonstrations - Maintains conversation history across messages - Uses RunConfig group_id to link related traces in PostHog - Add provider option 13 in main.py menu - Add openai-agents dependency to requirements.txt
… demo - Add input/output guardrails demo (GuardedAgent) - Add custom spans demo for nested span tracking - Add error demo agent with unreliable tool - Add mode selection menu when choosing OpenAI Agents SDK - Show brief description for each mode - All modes properly track events to PostHog
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5b64da0465
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| # Add user message to history | ||
| self._history.append({"role": "user", "content": user_input}) |
There was a problem hiding this comment.
Handle image inputs in Agents runner
The new provider advertises the same chat(user_input, base64_image) interface as other providers and is selectable in Image Test mode, but base64_image is ignored and only the text is appended to history. That means image tests (and any callers expecting vision support) will silently run without the image, producing misleading outputs and traces. Consider rejecting image inputs or converting them to an image-capable input format so the image test actually exercises vision.
Useful? React with 👍 / 👎.
Summary
Adds OpenAI Agents SDK example demonstrating PostHog LLM analytics integration.
Features
$ai_error_typecategorizationRelated