-
Notifications
You must be signed in to change notification settings - Fork 446
Implement Non-session-aware Per-user MCPClient
#1230
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
base: develop
Are you sure you want to change the base?
Implement Non-session-aware Per-user MCPClient
#1230
Conversation
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
…user-function Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
… add e2e tests Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
…r-mcp-client Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
|
Important Review skippedDraft detected. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ 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 |
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
cbf8a91 to
5d9f241
Compare
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Summary of changes: - Removed the NVIDIA_API_KEY from the agent runtime - updated Dockerfile to install AWSCLI and dependencies - Created shell scripts to fetch NVIDIA_API_KEY from AWS Secrets Manager and invoke NAT framework - Updated README.md with new usage including setting up AWS Secrets Manager and new IAM policy - eliminated some of the requirements to update scripts using env variables - added a script to obtain the agent Runtime_id to provide QOL for users. - Added .dockerignore to reduce the overall container size - Updated Dockerfile to remove uneeded files after install - Other misc bug fixes - Closes ## 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.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** * Standardized runtime/agent naming and placeholder formats across guides; updated secrets/examples, README wording, and path references; clarified OTEL placeholder usage. * **Chores** * Default startup switched to non‑instrumented entry; expanded image/build cleanup and workspace sanitation; propagate AWS_DEFAULT_REGION through runs and envs; unified entrypoint usage. * **Bug Fixes** * Added runtime discovery with clearer error handling; updated scripts to use the new runtime name and surface runtime IDs/status. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - https://github.com/BuildOnCloud - Bryan Bednarski (https://github.com/bbednarski9) Approvers: - Bryan Bednarski (https://github.com/bbednarski9) URL: NVIDIA#1220 Signed-off-by: Yuchen Zhang <[email protected]>
Closes - Brought out agents to emphasize on what they offer and how users can use them - Removed any repeated details in their overview sections / features sections - Rephrased verbiage for clarity - Ran docs through cursor to ensure it meets style guide requirements ## 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.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** * Added docs for new agents: ReAct, Reasoning, ReWOO, Router, Tool Calling, and Responses API & Agent * Added Sequential Executor documentation * Consolidated workflow navigation to a single About page and updated related links across docs and examples * Rewrote many workflow pages to emphasize configuration-first guides with YAML examples and clearer installation instructions * Updated quick-start link labels and multiple example README links for consistency <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - https://github.com/lvojtku - David Gardner (https://github.com/dagardner-nv) Approvers: - David Gardner (https://github.com/dagardner-nv) URL: NVIDIA#1173 Signed-off-by: Yuchen Zhang <[email protected]>
This PR: 1. Adds an a2a subpackage with support for a2a client and servers. This is base support which models the remote-agent as a tool. 2. Adds examples demonstrating NAT workflows with NAT A2A servers (math assistant) and external A2A servers (currency agent) 3. Adds a2a CLI commands for troubleshooting 4. Adds docs 5. Adds unit and end2end tests Pending items that will be addressed in a separate PR: 1. Data part and file part support 2. Auth 3. Unified Telemetry and Logging **Sever CLI** 1. Start server using the NAT a2a frontend: ``` nat a2a serve --config_file examples/getting_started/simple_calculator/configs/config.yml ``` **Client CLI:** 1. agent card discovery ``` nat a2a client discover --url http://localhost:10000 ``` <img width="1114" height="611" alt="image" src="https://github.com/user-attachments/assets/d7edca10-5bf9-4804-b1b0-41a337580b2c" /> 2. high level agent call ``` nat a2a client call --url http://localhost:10000 --message "Is the product of 2 and 4 greater than the hour of the day" ``` ``` Query: Is the product of 2 and 4 greater than the hour of the day No, the product of 2 and 4 is less than the hour of the day. ``` ## 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.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 * **New Features** * Agent-to-Agent (A2A) support: client & server integrations, workflow publishing, and CLI commands (serve, discover, info, skills, call). * **Documentation** * Comprehensive A2A docs: protocol overview, client/server/CLI guides, installation, configuration, examples, usage samples, and troubleshooting. * **Examples** * Two end-to-end A2A examples with READMEs, configs, sample queries, and project setup. * **Tests** * Client, server, agent-card generation, and end-to-end workflow tests. * **Chores** * Packaging, license, CLI wiring, and project configuration for new A2A package. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - Anuradha Karuppiah (https://github.com/AnuradhaKaruppiah) Approvers: - David Gardner (https://github.com/dagardner-nv) - Will Killian (https://github.com/willkill07) - Yuchen Zhang (https://github.com/yczhang-nv) URL: NVIDIA#1147 Signed-off-by: Yuchen Zhang <[email protected]>
…DIA#1234) Closes NVIDIA#1233 This PR resolves an observability issue where traces were not exported when individual tools were called via MCP clients. Previously, traces were only exported when the MCP server's main workflow was invoked directly. The fix wraps each registered function in a lightweight workflow and uses `SessionManager` to route all tool calls through the `Runner` execution path, which automatically handles observability event emission and exporter lifecycle management. ## 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.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 * **Improvements** * Optimized session and workflow management for MCP tool execution * Enhanced observability and error handling in tool registration * Streamlined integration of functions and workflows in MCP services <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - Matthew Penn (https://github.com/mpenn) Approvers: - David Gardner (https://github.com/dagardner-nv) URL: NVIDIA#1234 Signed-off-by: Yuchen Zhang <[email protected]>
…gins using the square bracket form (NVIDIA#1238) * This allows the `ci/release/update_toml_dep.py` script to correctly update the dependency version when performing nightly builds and during the release process. ## 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.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 * **Chores** * Consolidated dependency management to streamline package installation and resolution. <sub>✏️ Tip: You can customize this high-level summary in your review settings.</sub> Authors: - David Gardner (https://github.com/dagardner-nv) Approvers: - Yuchen Zhang (https://github.com/yczhang-nv) URL: NVIDIA#1238 Signed-off-by: Yuchen Zhang <[email protected]>
Signed-off-by: Yuchen Zhang <[email protected]>
Description
As the Per-user function feature (PR-1206) becomes available, the
MCPClientcomponent can be initialized per-user so every user gets their own separate instance. Thus theMCPClientimplementation can be significantly simplified (PerUserMCPClientin this PR) by removing the session management anddefault_user_id(since users will get themselves authenticated lazily upon the first request).Note that the
PerUserMCPClientonly works with per-user workflow. This requires updating any existing workflow that's not per-user to be registered with@register_per_user_function. To making it a smooth migration, the previous implementation was kept in this PR and a migration guide is provided.This PR needs to be merged after PR-1206.
Closes AIQ-2507
By Submitting this PR I confirm: