Skip to content

fix(nemo-agents): add support for translation of mcp/skills/tools from agent.yaml to FabricConfig#890

Merged
mmogallapalli merged 1 commit into
mainfrom
mmogallapall/aircore-946-translate-shared-platform-agent-config-fields-into
Jul 24, 2026
Merged

fix(nemo-agents): add support for translation of mcp/skills/tools from agent.yaml to FabricConfig#890
mmogallapalli merged 1 commit into
mainfrom
mmogallapall/aircore-946-translate-shared-platform-agent-config-fields-into

Conversation

@mmogallapalli

@mmogallapalli mmogallapalli commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR extends the Platform-owned nemo-agents-spec-v1 config translation for Fabric-backed NeMo Agents.

The main boundary remains:

Platform agent.yaml -> AgentConfig -> typed in-memory FabricConfig

This change adds support for translating shared Platform config fields that have direct FabricConfig targets today: skills, mcp, and tools.

Changes

  • Added typed AgentConfig models for shared capability sections:
    • skills.paths
    • mcp.servers
    • tools.blocked
  • Updated the Fabric translator to pass those sections through to FabricConfig.
  • Kept prompt settings harness-specific for now, since Fabric does not currently expose a shared top-level prompts field.
  • Added explicit rejection for non-empty top-level prompts during Fabric translation so prompt config is not silently ignored.
  • Updated the example agent.yaml with neutral shared capability sections.
  • Updated the example README to describe the Platform/Fabric boundary for shared fields and prompt settings.
  • Added focused unit coverage for config validation and Fabric translation.

Out Of Scope

  • A shared Platform prompt contract.
  • Per-turn prompt overrides.
  • Full translation of every optional FabricConfig field.
  • Runtime/session lifecycle changes.
  • NAT-specific harness translation for shared fields.

Those should be handled once the RFC 121/122 object shapes and runtime story are finalized.

Validation

Passed:

uv run --frozen pytest plugins/nemo-agents/tests/unit/test_agent_config.py plugins/nemo-agents/tests/unit/test_fabric_translator.py
tools/lint/lint-python-style.sh plugins/nemo-agents/src/nemo_agents_plugin/agent_config.py plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py plugins/nemo-agents/tests/unit/test_agent_config.py plugins/nemo-agents/tests/unit/test_fabric_translator.py

Result:

26 passed
All checks passed

Summary by CodeRabbit

  • New Features

    • Added support for configuring shared skills, MCP servers, and tools in agent configurations.
    • Added validation for these capability settings and translated them into Fabric configurations.
    • Added harness-specific system prompt configuration.
  • Bug Fixes

    • Top-level prompt settings are now rejected with guidance to configure prompts under the selected harness.
  • Documentation

    • Updated configuration guidance for shared capability fields and harness-specific prompts.

Signed-off-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
@mmogallapalli
mmogallapalli requested review from a team as code owners July 24, 2026 17:06
@github-actions github-actions Bot added the fix label Jul 24, 2026
@coderabbitai

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Agent configuration now uses typed skills, mcp, and tools sections, translates them into FabricConfig, and rejects unsupported top-level prompts. The example configuration moves the system prompt into the codex harness and adds coverage for parsing and translation.

Changes

Shared capability translation

Layer / File(s) Summary
Typed capability configuration
plugins/nemo-agents/src/nemo_agents_plugin/agent_config.py, plugins/nemo-agents/examples/nemo-agent-config/*, plugins/nemo-agents/tests/unit/test_agent_config.py
Adds strict Pydantic models for skills, MCP, and tools; updates the example YAML and README; validates defaults and populated sections.
Fabric translation and validation
plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py, plugins/nemo-agents/tests/unit/test_fabric_translator.py
Maps shared capability sections into Fabric types and rejects top-level prompts with dedicated test coverage.

Sequence Diagram(s)

sequenceDiagram
  participant AgentYAML
  participant AgentConfig
  participant translate_agent_config
  participant FabricConfig
  AgentYAML->>AgentConfig: Load skills, mcp, and tools
  AgentConfig->>translate_agent_config: Provide validated configuration
  translate_agent_config->>translate_agent_config: Reject top-level prompts
  translate_agent_config->>FabricConfig: Translate capability sections
Loading

Possibly related PRs

Suggested labels: feat

Suggested reviewers: stefan-kickoff, mikeknep

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: translating skills, mcp, and tools from agent.yaml into FabricConfig.
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 mmogallapall/aircore-946-translate-shared-platform-agent-config-fields-into

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

@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.

🧹 Nitpick comments (2)
plugins/nemo-agents/examples/nemo-agent-config/README.md (1)

14-16: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Keep this page a HOW-TO.

Move the shared-field contract explanation to a reference page and link it here. As per coding guidelines, “Each documentation page should fit ONE Diataxis quadrant.”

Source: Coding guidelines

plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py (1)

99-116: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Type these helpers with Fabric models. _skills_config, _mcp_config, and _tools_config should return fabric.SkillConfig | None, fabric.McpConfig | None, and fabric.ToolsConfig | None instead of Any.

🤖 Prompt for 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.

In `@plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py` around lines
99 - 116, Update the return annotations of _skills_config, _mcp_config, and
_tools_config to use fabric.SkillConfig | None, fabric.McpConfig | None, and
fabric.ToolsConfig | None respectively, replacing Any while preserving their
existing None handling and Fabric model construction.

Source: Coding guidelines

🤖 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.

Nitpick comments:
In `@plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py`:
- Around line 99-116: Update the return annotations of _skills_config,
_mcp_config, and _tools_config to use fabric.SkillConfig | None,
fabric.McpConfig | None, and fabric.ToolsConfig | None respectively, replacing
Any while preserving their existing None handling and Fabric model construction.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 61632f57-2af5-4c28-904a-b188c3012f9b

📥 Commits

Reviewing files that changed from the base of the PR and between 009588a and a95c5b8.

📒 Files selected for processing (6)
  • plugins/nemo-agents/examples/nemo-agent-config/README.md
  • plugins/nemo-agents/examples/nemo-agent-config/agent.yaml
  • plugins/nemo-agents/src/nemo_agents_plugin/agent_config.py
  • plugins/nemo-agents/src/nemo_agents_plugin/fabric/translator.py
  • plugins/nemo-agents/tests/unit/test_agent_config.py
  • plugins/nemo-agents/tests/unit/test_fabric_translator.py

@AjayThorve AjayThorve 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.

Looks good

@github-actions

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 27158/34869 77.9% 62.1%
Integration Tests 15970/33581 47.6% 20.0%

@mmogallapalli
mmogallapalli enabled auto-merge July 24, 2026 17:35
AjayThorve added a commit to AjayThorve/nemo-platform that referenced this pull request Jul 24, 2026
Build on the shared Platform-to-Fabric config translation from NVIDIA-NeMo#890 and apply NAT-native MCP and blocked-tool mappings before the workflow runtime starts.

Co-authored-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
AnuradhaKaruppiah added a commit to AnuradhaKaruppiah/nemo-platform that referenced this pull request Jul 24, 2026
Signed-off-by: Anuradha Karuppiah <26330987+AnuradhaKaruppiah@users.noreply.github.com>
@mmogallapalli
mmogallapalli added this pull request to the merge queue Jul 24, 2026
Merged via the queue into main with commit 28e33c8 Jul 24, 2026
108 of 110 checks passed
@mmogallapalli
mmogallapalli deleted the mmogallapall/aircore-946-translate-shared-platform-agent-config-fields-into branch July 24, 2026 18:14
AjayThorve added a commit to AjayThorve/nemo-platform that referenced this pull request Jul 24, 2026
Build on the shared Platform-to-Fabric config translation from NVIDIA-NeMo#890 and apply NAT-native MCP and blocked-tool mappings before the workflow runtime starts.

Co-authored-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
AjayThorve added a commit to AjayThorve/nemo-platform that referenced this pull request Jul 24, 2026
Build on the shared Platform-to-Fabric config translation from NVIDIA-NeMo#890 and apply NAT-native MCP and blocked-tool mappings before the workflow runtime starts.

Co-authored-by: Manjesh Mogallapalli <mmogallapall@nvidia.com>
Signed-off-by: Ajay Thorve <athorve@nvidia.com>
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