Skip to content

feat(studio): Add multiple choice UI for the Nemo Agent - #1001

Merged
htolentino-nvidia merged 3 commits into
mainfrom
studio-agent-add-multiple-options/htolentino
Jul 31, 2026
Merged

feat(studio): Add multiple choice UI for the Nemo Agent#1001
htolentino-nvidia merged 3 commits into
mainfrom
studio-agent-add-multiple-options/htolentino

Conversation

@htolentino-nvidia

@htolentino-nvidia htolentino-nvidia commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
image

Summary by CodeRabbit

  • New Features
    • Added selectable options pickers for finite-choice questions via a dedicated user-question tool.
    • Enhanced selectors for models and evaluation configurations with optional labels and defaults.
    • Extended job progress updates to include workspace context.
  • Improvements
    • Agents now follow stricter single-clarification behavior when details are missing or ambiguous.
    • Discrete choices route through the options picker; open-ended prompts remain concise for free-form input.
  • Bug Fixes
    • Improved responses for declined prompts and invalid question payloads, with clearer error messaging.

Signed-off-by: Henrique Tolentino <htolentino@nvidia.com>
@htolentino-nvidia
htolentino-nvidia requested review from a team as code owners July 30, 2026 20:09
@github-actions github-actions Bot added the feat label Jul 30, 2026
Signed-off-by: Henrique Tolentino <htolentino@nvidia.com>
@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 81dfd44a-39d6-4576-906d-2d04e144b9b0

📥 Commits

Reviewing files that changed from the base of the PR and between d101b6b and 4cd1feb.

📒 Files selected for processing (2)
  • agents/nemo-agent-local/src/nemo_agent/register.py
  • agents/nemo-agent-local/tests/test_nemo_agent.py

📝 Walkthrough

Walkthrough

The NeMo agent now routes finite-choice clarification through Studio’s selectable picker, adds a validated ask_user_question tool, forwards new selector and progress parameters, and updates Studio prompt adaptation and tests.

Changes

Agent tooling updates

Layer / File(s) Summary
Prompt and Studio tool contract updates
agents/nemo-agent-local/src/nemo_agent/register.py
Clarification rules now stop after one focused question, finite choices use ask_user_question, and model, evaluation-config, and job-progress tools forward additional parameters.
Studio-backed question flow
agents/nemo-agent-local/src/nemo_agent/register.py, agents/nemo-agent-local/tests/test_nemo_agent.py
ask_user_question validates question JSON, calls Studio approval, returns selections or decline/errors, is registered with the agent, and is covered by routing, schema, and validation tests.
Studio prompt and deployed-agent adaptation
services/studio/src/nmp/studio/coding_agent_mcp_tools.py, services/studio/src/nmp/studio/coding_agents.py, services/studio/tests/unit/test_coding_agents.py
Finite-choice prompts require AskUserQuestion; deployed NeMo prompts rename it to ask_user_question, pass session context, and verify both behaviors in tests.

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant NeMoAgent
  participant ask_user_question
  participant Studio
  User->>NeMoAgent: Request requiring finite-choice clarification
  NeMoAgent->>ask_user_question: questions and studio_session_id
  ask_user_question->>Studio: approval_prompt with AskUserQuestion
  Studio-->>User: Selectable options picker
  User-->>Studio: Selection or decline
  Studio-->>ask_user_question: Approval result
  ask_user_question-->>NeMoAgent: Updated selections or decline message
Loading

Possibly related PRs

Suggested reviewers: ngoncharenko, a2bondar, albcui

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title matches the main change: adding a multiple-choice UI for the NeMo Agent in Studio.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch studio-agent-add-multiple-options/htolentino

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

@htolentino-nvidia

Copy link
Copy Markdown
Contributor Author

@CodeRabbit review it now

@coderabbitai

coderabbitai Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

@htolentino-nvidia Reviewing PR #1001 now.

✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@agents/nemo-agent-local/src/nemo_agent/register.py`:
- Around line 568-608: Remove the framework-level `@tool` implementation of
ask_user_question and integrate this question flow through the existing NVIDIA
NAT-wrapped LangGraph integration. Reuse the repository’s established NAT
integration patterns and registration mechanisms rather than adding new
LangChain or other agent-framework tool code, while preserving the JSON
validation and user-decline behavior.
- Around line 597-605: Validate the parsed value in the AskUserQuestion flow
after json.loads and before _call_studio_tool: require a non-empty list whose
elements are question objects, returning the documented input error for objects,
scalars, empty arrays, or invalid elements. Preserve the existing JSON parsing
error handling and only call Studio for valid question arrays.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 2a5f5692-182c-4714-8adc-f7c7af1c9176

📥 Commits

Reviewing files that changed from the base of the PR and between 9b0f9ad and d101b6b.

📒 Files selected for processing (5)
  • agents/nemo-agent-local/src/nemo_agent/register.py
  • agents/nemo-agent-local/tests/test_nemo_agent.py
  • services/studio/src/nmp/studio/coding_agent_mcp_tools.py
  • services/studio/src/nmp/studio/coding_agents.py
  • services/studio/tests/unit/test_coding_agents.py

Comment thread agents/nemo-agent-local/src/nemo_agent/register.py
Comment thread agents/nemo-agent-local/src/nemo_agent/register.py
@github-actions

github-actions Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 28411/36247 78.4% 62.8%
Integration Tests 16992/34965 48.6% 21.2%

Signed-off-by: Henrique Tolentino <htolentino@nvidia.com>

@dmariali dmariali left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nice!

@htolentino-nvidia
htolentino-nvidia added this pull request to the merge queue Jul 31, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to failed status checks Jul 31, 2026
@htolentino-nvidia
htolentino-nvidia added this pull request to the merge queue Jul 31, 2026
Merged via the queue into main with commit 3a13f10 Jul 31, 2026
60 checks passed
@htolentino-nvidia
htolentino-nvidia deleted the studio-agent-add-multiple-options/htolentino branch July 31, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants