-
Notifications
You must be signed in to change notification settings - Fork 69
fix: fixed examples #83
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
Conversation
WalkthroughSwitches example dependencies from stream-agents-* to vision-agents-* in pyproject files. Updates GitHub MCP demo scripts to open the demo UI only after the agent joins the call. Adds a new OpenAI Realtime + GitHub MCP demo script. Introduces a gemini plugin dependency and UV source entry. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant U as User
participant A as Agent
participant C as Call
participant UI as Demo UI
U->>A: configure agent
U->>C: create call
Note over A,C: Previous: UI opened before join
A->>C: join(call)
activate C
C-->>A: joined
deactivate C
A->>UI: open_demo(call)
UI-->>U: browser UI available
sequenceDiagram
autonumber
participant Env as Env
participant GH as GitHub MCP Server
participant R as OpenAI Realtime LLM
participant E as Streaming Edge
participant A as Agent
participant C as Call
participant UI as Demo UI
Env-->>A: load env vars
A->>GH: init MCP server
A->>R: init Realtime LLM
A->>E: init transport
A->>A: on participant_join -> surface MCP tools
A->>C: create call
A->>C: join(call)
C-->>A: joined
A->>UI: open_demo(call)
UI-->>A: user prompts / interactions
A->>A: cleanup (close) after session
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Disabled knowledge base sources:
- Linear integration is disabled by default for public repositories
You can enable these sources in your CodeRabbit configuration.
⛔ Files ignored due to path filters (1)
examples/other_examples/09_github_mcp_demo/uv.lockis excluded by!**/*.lock
📒 Files selected for processing (5)
examples/other_examples/07_function_calling_example/pyproject.toml(2 hunks)examples/other_examples/09_github_mcp_demo/gemini_realtime_github_mcp_demo.py(1 hunks)examples/other_examples/09_github_mcp_demo/github_mcp_demo.py(1 hunks)examples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py(1 hunks)examples/other_examples/09_github_mcp_demo/pyproject.toml(1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
**/*.py
📄 CodeRabbit inference engine (.cursor/rules/python.mdc)
**/*.py: Never adjust sys.path (e.g., sys.path.append/insert/assignment)
Docstrings must follow the Google style guide
Files:
examples/other_examples/09_github_mcp_demo/github_mcp_demo.pyexamples/other_examples/09_github_mcp_demo/gemini_realtime_github_mcp_demo.pyexamples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py
🧬 Code graph analysis (2)
examples/other_examples/09_github_mcp_demo/github_mcp_demo.py (1)
tests/test_realtime_base.py (1)
open_demo(136-137)
examples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py (5)
agents-core/vision_agents/core/agents/agents.py (2)
Agent(52-1020)say(501-517)agents-core/vision_agents/core/mcp/mcp_server_remote.py (1)
MCPServerRemote(13-146)agents-core/vision_agents/core/edge/types.py (1)
User(16-19)agents-core/vision_agents/core/llm/llm.py (1)
get_available_functions(180-182)agents-core/vision_agents/core/cli.py (1)
start_dispatcher(37-60)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: unit / Test "not integration"
- GitHub Check: unit / Ruff & mypy
- GitHub Check: unit / Ruff & mypy
🔇 Additional comments (6)
examples/other_examples/09_github_mcp_demo/pyproject.toml (1)
19-19: LGTM! Gemini plugin integration is complete.The addition of the vision-agents-plugins-gemini dependency and its corresponding UV source entry are correctly configured and consistent with the other plugin declarations.
Also applies to: 26-32
examples/other_examples/09_github_mcp_demo/gemini_realtime_github_mcp_demo.py (1)
97-99: LGTM! Improved timing for demo UI initialization.Moving the demo UI opening inside the join context ensures the agent is fully connected before users interact with it, improving reliability and user experience.
examples/other_examples/07_function_calling_example/pyproject.toml (1)
10-13: LGTM! Namespace migration is complete and consistent.The transition from stream-agents to vision-agents is correctly applied across dependencies and UV sources, with appropriate path adjustments.
Also applies to: 25-28
examples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py (2)
1-46: LGTM! Environment setup and validation are correct.The imports, logging configuration, and environment variable checks are properly implemented.
77-119: LGTM! Agent lifecycle and demo flow are well-structured.The event handling, call management, UI initialization timing, and cleanup logic are correctly implemented.
examples/other_examples/09_github_mcp_demo/github_mcp_demo.py (1)
111-113: No changes needed for open_demo invocation
In this demoagent.edge.open_demouses the synchronous coreEdgeTransportimplementation and must be called withoutawait; the realtime demos use the async getstream plugin edge and correctly await theiropen_demo.Likely an incorrect or invalid review comment.
| edge = getstream.Edge() | ||
| agent_user = User(name="GitHub AI Assistant", id="github-agent") | ||
|
|
||
| # Create agent with GitHub MCP server and Gemini Realtime LLM |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the copy-paste error in the comment.
The comment mentions "Gemini Realtime LLM" but the code creates an agent with OpenAI Realtime (defined on lines 56-58).
Apply this diff to correct the comment:
- # Create agent with GitHub MCP server and Gemini Realtime LLM
+ # Create agent with GitHub MCP server and OpenAI Realtime LLM📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| # Create agent with GitHub MCP server and Gemini Realtime LLM | |
| # Create agent with GitHub MCP server and OpenAI Realtime LLM |
🤖 Prompt for AI Agents
In examples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py
around line 64, the inline comment incorrectly says "Gemini Realtime LLM";
update that comment to reflect the actual LLM used by the code (OpenAI Realtime)
so it matches the agent creation on lines 56-58 — replace the comment text with
something like "Create agent with GitHub MCP server and OpenAI Realtime LLM".
Summary by CodeRabbit
New Features
Refactor
Chores