Skip to content

Conversation

@andrewm4894
Copy link
Member

Summary

Adds OpenAI Agents SDK example demonstrating PostHog LLM analytics integration.

Features

  • Multi-agent system with handoffs (Triage → Weather/Math/General agents)
  • Mode selection menu with 5 modes:
    1. Triage - Multi-agent handoffs
    2. Simple - Single agent with tools
    3. Guarded - Input/output guardrails demo
    4. Error Demo - Error tracking demo
    5. Custom Spans - Nested span tracking
  • Tool usage (weather, math, unreliable_tool)
  • Input/output guardrails for content filtering
  • Custom spans for tracking custom operations
  • Error tracking with $ai_error_type categorization

Related

- 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
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 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".

Comment on lines +149 to +150
# Add user message to history
self._history.append({"role": "user", "content": user_input})

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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