autogen demo: LA traffic example#1426
Conversation
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
WalkthroughReplaces the weather/time multi-agent example with an LA traffic-status workflow: adds a time-aware Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant TrafficAgent as TrafficAgent
participant TimeTool as mcp_functions__current_datetime
participant TrafficTool as traffic_status_tool
participant FinalAgent as FinalResponseAgent
User->>TrafficAgent: Submit LA highway traffic query
TrafficAgent->>TimeTool: Request current datetime
TimeTool-->>TrafficAgent: Return current hour
TrafficAgent->>TrafficTool: Call traffic_status(highway, hour)
TrafficTool-->>TrafficAgent: Return traffic status
TrafficAgent->>FinalAgent: Provide gathered time and status
FinalAgent-->>User: Formatted response (APPROVE)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~30 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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.
Actionable comments posted: 4
🤖 Fix all issues with AI agents
In `@examples/frameworks/nat_autogen_demo/README.md`:
- Line 23: The sentence uses possessive ’s with inanimate objects ("Microsoft's
AutoGen framework" and "AutoGen's conversation system"); update the wording to
remove possessives by rephrasing to e.g. "the AutoGen framework from Microsoft"
and "the AutoGen conversation system" (or similar), replacing both occurrences
in the README sentence so it reads naturally without possessive ’s.
In
`@examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/data/toy_data.json`:
- Around line 1-3: The examples/frameworks/nat_autogen_demo data file
toy_data.json is an LFS pointer and users who clone without running git-lfs will
see the pointer instead of real JSON; update the example README (or contributing
notes) to clearly state that Git LFS is required and provide exact commands to
set it up (e.g., git lfs install and git lfs pull) plus a note to run
get_lfs_files() in CI or before running validation; reference the toy_data.json
file name in the message so users know which example needs LFS content pulled.
In `@examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/register.py`:
- Line 17: Remove the unused "# noqa: F401" directive from the import line that
brings in traffic_status_tool (imported for side effects) in register.py; leave
the import and any necessary pylint disable (e.g., "# pylint: disable=W0611 #
imported for side effects (registration)") but delete the redundant "noqa: F401"
portion to avoid RUF100 warnings.
In
`@examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/traffic_status_tool.py`:
- Line 17: The highway-matching logic (the substring scan that looks up highway
keys around the matching block at lines ~116-127) should normalize inputs and
require an explicit direction to avoid false positives: trim and normalize the
user input (lowercase or uppercase consistently), replace spaces with hyphens or
canonicalize hyphens, normalize common direction tokens (N/S/ north/south -> a
single canonical direction token) and only match keys when the normalized
highway number plus normalized direction exactly matches a map key (instead of
doing a loose substring search); update the matching routine to parse an
explicit direction from the input (reject or prompt when missing) and use the
normalized "highway_key" when looking up status to prevent cases like "405
South" matching "110-..." or hyphen-mismatches.
examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/data/toy_data.json
Show resolved
Hide resolved
examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/traffic_status_tool.py
Show resolved
Hide resolved
willkill07
left a comment
There was a problem hiding this comment.
Overall changes are good and I like the new example.
Just some feedback changes on setup flow and some minor nits.
examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/configs/config-eval.yml
Outdated
Show resolved
Hide resolved
Salonijain27
left a comment
There was a problem hiding this comment.
approved from a dependency point of view
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@examples/frameworks/nat_autogen_demo/README.md`:
- Around line 50-53: The README uses the possessive "Microsoft's AutoGen
framework" in the "AutoGen Framework Integration" bullet; change it to a
non-possessive phrasing such as "Microsoft AutoGen framework" or "the AutoGen
framework from Microsoft" in that bullet (and any other occurrences) to comply
with the Markdown style guideline; update the bullet text in the README's
"AutoGen Framework Integration" section accordingly while preserving the
original meaning.
♻️ Duplicate comments (2)
examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/traffic_status_tool.py (1)
119-125: Highway matching logic issue (previously flagged).The substring scan logic
if key in hwy_lowerwill fail for common inputs like "405 South" because the key uses a hyphen ("405-south"). This was already identified in a previous review.examples/frameworks/nat_autogen_demo/README.md (1)
23-23: Avoid possessive 's with inanimate objects (previously flagged).This line uses "Microsoft's AutoGen framework" and "AutoGen's conversation system" which violates the Markdown style guidelines.
Signed-off-by: Bryan Bednarski <bbednarski@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
examples/frameworks/nat_autogen_demo/README.md (1)
271-271: Avoid possessive 's with inanimate objects.Line 271 uses "AutoGen's RoundRobinGroupChat system" which should be rephrased per the Markdown style guidelines.
✏️ Suggested rewording
-The agents communicate through AutoGen's RoundRobinGroupChat system, which manages the conversation flow and ensures proper termination when the task is complete. +The agents communicate through the AutoGen RoundRobinGroupChat system, which manages the conversation flow and ensures proper termination when the task is complete.As per coding guidelines, avoid possessive 's with inanimate objects in Markdown.
🤖 Fix all issues with AI agents
In `@examples/frameworks/nat_autogen_demo/README.md`:
- Line 54: Update the README line that reads "AutoGen's RoundRobinGroupChat" to
avoid the possessive form for the inanimate project name; replace it with a
phrasing such as "RoundRobinGroupChat from AutoGen" or "AutoGen
RoundRobinGroupChat" in the "Round-Robin Group Chat" description so it follows
the Markdown style guideline.
♻️ Duplicate comments (2)
examples/frameworks/nat_autogen_demo/src/nat_autogen_demo/register.py (1)
17-17: Remove unused# noqa: F401directive.The static analysis still flags this line for RUF100 (unused noqa directive). The previous review comment was marked as addressed, but the
# noqa: F401portion remains in the code.🔧 Suggested fix
-from . import traffic_status_tool # noqa: F401 # pylint: disable=W0611 `#imported` for side effects (registration) +from . import traffic_status_tool # pylint: disable=W0611 # imported for side effects (registration)examples/frameworks/nat_autogen_demo/README.md (1)
50-50: Avoid possessive 's with inanimate objects.Line 50 uses "Microsoft's AutoGen framework" which should be rephrased per the Markdown style guidelines. This was flagged in a previous review but appears unaddressed.
✏️ Suggested rewording
-- **AutoGen Framework Integration:** Demonstrates the NVIDIA NeMo Agent toolkit support for Microsoft's AutoGen framework alongside other frameworks like LangChain/LangGraph and Semantic Kernel. +- **AutoGen Framework Integration:** Demonstrates the NVIDIA NeMo Agent toolkit support for the AutoGen framework from Microsoft alongside other frameworks like LangChain/LangGraph and Semantic Kernel.As per coding guidelines, avoid possessive 's with inanimate objects in Markdown.
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
Signed-off-by: Will Killian <wkillian@nvidia.com>
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
examples/frameworks/nat_autogen_demo/README.md (1)
271-271: Avoid possessive 's with inanimate objects.Line 271 uses "AutoGen's RoundRobinGroupChat system" which should be rephrased per the Markdown style guidelines.
✏️ Suggested rewording
-The agents communicate through AutoGen's RoundRobinGroupChat system, which manages the conversation flow and ensures proper termination when the task is complete. +The agents communicate through the AutoGen RoundRobinGroupChat system, which manages the conversation flow and ensures proper termination when the task is complete.As per coding guidelines, avoid possessive 's with inanimate objects in Markdown.
♻️ Duplicate comments (1)
examples/frameworks/nat_autogen_demo/README.md (1)
50-50: Avoid possessive 's with inanimate objects.Line 50 still uses "Microsoft's AutoGen framework" which should be rephrased per the Markdown style guidelines that were flagged in previous reviews.
✏️ Suggested rewording
-- **AutoGen Framework Integration:** Demonstrates the NVIDIA NeMo Agent toolkit support for Microsoft's AutoGen framework alongside other frameworks like LangChain/LangGraph and Semantic Kernel. +- **AutoGen Framework Integration:** Demonstrates the NVIDIA NeMo Agent toolkit support for the AutoGen framework from Microsoft alongside other frameworks like LangChain/LangGraph and Semantic Kernel.As per coding guidelines, avoid possessive 's with inanimate objects in Markdown.
|
/merge |
This PR reworks the autogen integration example by improving the example workflow and toy dataset. Previous toy example was deems insufficient for publication. New example demonstrates multi-tool, multi-agent orchestration in a toy example finding current traffic estimates. Additionally, some improvements to the README and user workflow. Closes 5812113 ## By Submitting this PR I confirm: - I am familiar with the [Contributing Guidelines](https://github.com/NVIDIA/NeMo-Agent-Toolkit/blob/develop/docs/source/resources/contributing/index.md). - We require that all contributors "sign-off" on their commits. This certifies that the contribution is your original work, or you have rights to submit it under the same license, or a compatible license. - Any contribution which contains commits that are not Signed-Off will not be accepted. - When the PR is ready for review, new or existing tests cover these changes. - When the PR is ready for review, the documentation is up to date with these changes. ## Summary by CodeRabbit * **Documentation** * Demo refocused from weather/time to Los Angeles traffic: walkthroughs, install/run steps, sample prompts/outputs, evaluation guidance, and observability notes updated. * **New Features** * Added a time-of-day–aware LA traffic status tool and updated the multi-agent workflow to query and present highway traffic status. * **Configuration** * Updated evaluation dataset/output paths and profiling/metric settings to support traffic-focused evaluations. * **Chores** * Project metadata updated to enable MCP-related integrations. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - Bryan Bednarski (https://github.com/bbednarski9) - Will Killian (https://github.com/willkill07) Approvers: - https://github.com/Salonijain27 - Will Killian (https://github.com/willkill07) URL: NVIDIA#1426 Signed-off-by: Yuchen Zhang <yuchenz@nvidia.com>
Description
This PR reworks the autogen integration example by improving the example workflow and toy dataset. Previous toy example was deems insufficient for publication. New example demonstrates multi-tool, multi-agent orchestration in a toy example finding current traffic estimates. Additionally, some improvements to the README and user workflow.
Closes
5812113
By Submitting this PR I confirm:
Summary by CodeRabbit
Documentation
New Features
Configuration
Chores
✏️ Tip: You can customize this high-level summary in your review settings.