Skip to content

Conversation

@d3xvn
Copy link
Contributor

@d3xvn d3xvn commented Oct 9, 2025

Summary by CodeRabbit

  • New Features

    • Added a real-time GitHub MCP demo showcasing OpenAI Realtime with browser-based demo UI and guided prompts.
  • Refactor

    • Updated GitHub MCP demos to open the demo UI after the agent joins a call, improving reliability and user flow.
  • Chores

    • Switched example dependencies to the vision-agents plugin namespace and aligned editable source paths.
    • Added a new vision-related plugin to example dependencies and sources.

@coderabbitai
Copy link

coderabbitai bot commented Oct 9, 2025

Walkthrough

Switches 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

Cohort / File(s) Summary
Dependency namespace switch (examples/other_examples/07_function_calling_example)
examples/other_examples/07_function_calling_example/pyproject.toml
Replace stream-agents-* deps with vision-agents-; update [tool.uv.sources] paths from ../../ to ../../../ under the new vision-agents- names.
GitHub MCP demo control-flow adjustment
examples/other_examples/09_github_mcp_demo/github_mcp_demo.py, examples/other_examples/09_github_mcp_demo/gemini_realtime_github_mcp_demo.py
Remove pre-join call.get_or_create and pre-join UI open; move UI open into the with await agent.join(call) context using agent.edge.open_demo(call).
New OpenAI Realtime GitHub MCP demo
examples/other_examples/09_github_mcp_demo/openai_realtime_github_mcp_demo.py
Add a script wiring GitHub MCP server, OpenAI Realtime LLM, streaming edge, Agent, event handler on participant join, call lifecycle, demo UI, and cleanup.
Gemini plugin dependency addition (examples/other_examples/09_github_mcp_demo)
examples/other_examples/09_github_mcp_demo/pyproject.toml
Add dependency vision-agents-plugins-gemini; add corresponding [tool.uv.sources] entry pointing to ../../../plugins/gemini (editable).

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
Loading
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
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • maxkahan
  • Nash0x7E2

Poem

The call is a hush, then a bell in the wire,
UI blooms only after the door unlatches.
Names shed their skins—streams into visions—
a cold star pinned to the pyproject’s sleeve.
Realtime hums; tools gather like quiet bees.
We join, then open—the window learns to breathe.

Pre-merge checks and finishing touches

❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 75.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
Title Check ❓ Inconclusive The PR title “fix: fixed examples” is too vague and generic to convey the specific updates made across the example projects, including switching plugin namespaces from stream-agents to vision-agents and adjusting demo UI control flow. It only indicates that examples were “fixed” without describing the nature or purpose of those fixes. A teammate scanning the PR list would not understand what was actually changed or why. Consider renaming the PR to something like “chore: update example projects to use vision-agents plugins and move demo UI launch inside agent.join context” so that the title clearly summarizes the core changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/mcp-examples

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link

@coderabbitai coderabbitai bot left a 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.

📥 Commits

Reviewing files that changed from the base of the PR and between 6a05c30 and 5d81e0b.

⛔ Files ignored due to path filters (1)
  • examples/other_examples/09_github_mcp_demo/uv.lock is 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.py
  • examples/other_examples/09_github_mcp_demo/gemini_realtime_github_mcp_demo.py
  • examples/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 demo agent.edge.open_demo uses the synchronous core EdgeTransport implementation and must be called without await; the realtime demos use the async getstream plugin edge and correctly await their open_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
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

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.

Suggested change
# 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".

@dangusev dangusev merged commit 288e6c7 into main Oct 9, 2025
5 checks passed
@dangusev dangusev deleted the fix/mcp-examples branch October 9, 2025 12:11
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.

3 participants