Repository navigation
feat(skills): Switch build agent skill to use Fabric and LC DeepAgents #1779
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
Merged
Merged
Changes from 8 commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
febb52b
Refine build agent skill for Fabric
yamini 7b409b2
Harden build agent onboarding and dependency boundary
yamini 960eb17
Align build agent harness dependency checks
yamini 7cbe551
Update build agent benchmark evidence
yamini b9267cd
Remove build agent review artifacts from package
yamini 4876957
fix(skills): add copyright headers
yamini 27ff8f0
fix(skills): defer agent registration until gates pass
mmogallapalli 30f52b7
fix(skills): preserve agent deployment scope
mmogallapalli d28cd7b
fix(skills): clarify optional agent environment
mmogallapalli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
612 changes: 220 additions & 392 deletions
612
packages/nemo_platform_ext/src/nemo_platform_ext/skills/nemo-build-agent/SKILL.md
Large diffs are not rendered by default.
Oops, something went wrong.
132 changes: 132 additions & 0 deletions
132
packages/nemo_platform_ext/src/nemo_platform_ext/skills/nemo-build-agent/evals/evals.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,132 @@ | ||
| [ | ||
| { | ||
| "id": "nemo-build-agent-001-ethos-approval", | ||
| "question": "Build a NeMo Platform helpdesk agent from these answers: employees use it for password resets and VPN access; account changes require approval; it must never expose credentials; representative cases are a successful reset, an unauthorized reset and an unavailable identity provider. Persist the design first. Do not implement until I approve it.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent explains the supported Fabric Deep Agents path, creates one canonical agents/helpdesk-ethos/ETHOS.md through nemo-ethos, shows it for review and creates no implementation artifacts before explicit approval.", | ||
| "expected_behavior": [ | ||
| "The agent reads nemo-build-agent before acting", | ||
| "The agent explains Ethos as a plain-language design contract and does not assume the user knows NeMo Platform terminology", | ||
| "The agent explains the supported LangChain Deep Agents and Fabric path and asks whether to continue", | ||
| "The agent records representative successful and unsuccessful cases in the Ethos", | ||
| "The agent keeps the Ethos under agents/helpdesk-ethos/ETHOS.md", | ||
| "The agent stops for explicit Ethos approval before creating agent.yaml, Python source or deployment resources", | ||
| "The agent does not create a NAT workflow" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-002-mcp-reachability", | ||
| "question": "The approved Ethos is at agents/refund-ethos/ETHOS.md. Build the refund agent with custom Python behavior that verifies identity before issuing a refund. Use fake services for tests. Create and validate the local project, but do not register or deploy it.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The generated agent is config centric. It uses explicit nemo-agents-spec-v1 with the deepagents harness, exposes executable refund behavior through a declared MCP server and does not create an unreferenced agent.py. The identity and refund invariant is implemented inside a deterministic operation and tested on happy and unhappy paths.", | ||
| "expected_behavior": [ | ||
| "The project is rooted at agents/refund-ethos and keeps ETHOS.md and agent.yaml together", | ||
| "agent.yaml declares config_format nemo-agents-spec-v1 and a configured deepagents harness", | ||
| "The agent verifies the optional NeMo Agents plugin and Deep Agents harness, reuses them when present and does not add a separate harness version constraint", | ||
| "Custom Python behavior is installed as an MCP console script and declared under mcp.servers", | ||
| "The implementation does not rely on Fabric importing src package agent.py", | ||
| "Tests prove an unverified or failed identity cannot issue a refund", | ||
| "No registration or deployment command runs" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-003-missing-credential", | ||
| "question": "The support agent Ethos is approved. Build its mock based tests now. The production CRM credential is unavailable, so record the live test as skipped and do not register or deploy.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent builds and tests the local Fabric compatible project with a mocked CRM, records the exact live test prerequisite as skipped, performs no remote mutation and does not describe the result as production ready.", | ||
| "expected_behavior": [ | ||
| "The agent keeps credentials out of source, YAML, fixtures and logs", | ||
| "The agent tests CRM errors, timeouts and malformed responses with a mock", | ||
| "The live test is reported as skipped because the named credential is absent", | ||
| "The agent does not register or deploy", | ||
| "The final status is Built, not Production candidate" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-004-fabric-failure", | ||
| "question": "Build the approved agent and onboard it, but the supplied Deep Agents adapter setting is not supported by the installed Fabric descriptor. Stop safely if validation fails.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent checks the installed adapter contract, reports the unsupported setting and stops before registration or deployment. It does not invent a NAT wrapper or bypass validation.", | ||
| "expected_behavior": [ | ||
| "The agent validates settings against the installed Fabric adapter contract", | ||
| "The agent reports the specific unsupported setting", | ||
| "The agent does not use skip validation", | ||
| "The agent performs no registration or deployment after the failed gate", | ||
| "The agent does not create a NAT fallback" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-005-existing-resource", | ||
| "question": "Build and deploy the approved claims agent. A Platform Agent and deployment with the requested names already exist. Preserve them unless I explicitly approve replacement.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent inspects the existing resources, presents reuse, rename and replace choices and makes no destructive or replacement change without immediate explicit approval.", | ||
| "expected_behavior": [ | ||
| "The agent detects both name collisions before create or deploy", | ||
| "The agent does not overwrite local or remote resources", | ||
| "The agent presents reuse, rename and replace choices", | ||
| "The agent requires explicit approval immediately before any replacement", | ||
| "The agent verifies the result of each approved state change" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-006-runtime-approval-gap", | ||
| "question": "The approved claims agent Ethos requires a human to approve or reject each payment during the deployed agent run. Build and deploy it using Deep Agents interrupt_on.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent distinguishes accepted adapter configuration from a working runtime contract, reports that the deployed Deep Agents path has no verified approve, edit or reject resume flow and stops before producing or deploying a misleading implementation.", | ||
| "expected_behavior": [ | ||
| "The agent inspects the installed adapter and deployment invocation contract", | ||
| "The agent does not treat interrupt_on configuration acceptance as end to end support", | ||
| "The agent reports the missing deployed resume path", | ||
| "The agent stops before registration or deployment", | ||
| "The agent does not replace the approval with prompt instructions or a NAT workflow" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-007-plugin-install-declined", | ||
| "question": "The Ethos is approved, but this NeMo Platform environment does not have the optional Agents plugin. Continue without installing anything.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent explains that Fabric agent management is optional but required for this build, asks before installation and stops when installation is declined. It does not install Deep Agents independently or fall back to NAT.", | ||
| "expected_behavior": [ | ||
| "The agent checks both the Agents plugin and Deep Agents harness instead of assuming they are present", | ||
| "The agent explains what capability the optional plugin provides", | ||
| "The agent performs no installation after the user declines", | ||
| "The agent does not install Deep Agents or its Fabric adapter independently", | ||
| "The agent does not create a NAT fallback" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-008-existing-harness", | ||
| "question": "The approved Ethos is ready. The NeMo Agents plugin, Fabric Deep Agents adapter and Deep Agents runtime are already installed in the Platform environment. Build without changing installed package versions.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent verifies the installed plugin, adapter and runtime, reuses them and does not reinstall or add a separate harness version constraint to the generated project.", | ||
| "expected_behavior": [ | ||
| "The agent verifies the plugin through the NeMo CLI and checks the active Python environment", | ||
| "The agent reuses the installed harness", | ||
| "The agent does not reinstall the Agents plugin", | ||
| "The agent does not change installed harness versions", | ||
| "The generated project does not add Deep Agents or its Fabric adapter unless project code directly imports that API" | ||
| ] | ||
| }, | ||
| { | ||
| "id": "nemo-build-agent-009-broken-plugin-install", | ||
| "question": "The approved Ethos is ready. The NeMo Agents plugin appears in the plugin list, but its Fabric Deep Agents adapter is missing from the active Python environment.", | ||
| "expected_skill": "nemo-build-agent", | ||
| "expected_script": null, | ||
| "ground_truth": "The agent reports a broken Agents plugin installation and asks before reinstalling that plugin. It does not repair the environment by installing an independently pinned harness package.", | ||
| "expected_behavior": [ | ||
| "The agent reports that plugin presence alone does not prove harness availability", | ||
| "The agent stops before implementation while the required adapter is missing", | ||
| "The agent offers to reinstall the same Agents plugin only after approval", | ||
| "The agent does not install or pin Deep Agents independently", | ||
| "The agent repeats plugin and Python environment checks after any approved reinstall" | ||
| ] | ||
| } | ||
| ] |
81 changes: 81 additions & 0 deletions
81
.../src/nemo_platform_ext/skills/nemo-build-agent/references/fabric-deep-agents.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,81 @@ | ||
| # Fabric Deep Agents contract | ||
|
|
||
| Use this reference when choosing the agent's implementation shape. | ||
|
|
||
| ## Ownership boundary | ||
|
|
||
| NeMo Platform stores `agent.yaml` and translates it into a Fabric config. The | ||
| Fabric Deep Agents adapter constructs `create_deep_agent` from that normalized | ||
| config. It does not import a customer `agent.py` or accept Python callables in | ||
| `harnesses.<name>.settings`. | ||
|
|
||
| Use only these supported surfaces: | ||
|
|
||
| | Requirement | Delivery surface | | ||
| |---|---| | ||
| | System behavior and model | `instructions` and `models` in `agent.yaml` | | ||
| | Reusable instruction package | Agent Skill referenced by `skills.paths` | | ||
| | Executable custom tool | MCP server declared by `mcp.servers` | | ||
| | Specialized delegate | Declarative subagent under `harnesses.deepagents.settings.deepagents.subagents` | | ||
| | Remote background delegate | Supported asynchronous subagent configuration | | ||
|
|
||
| Never create `src/<package>/agent.py` as an entry point for this path. Fabric | ||
| will not load it. | ||
|
|
||
| ## Custom tools | ||
|
|
||
| Expose local Python tools as an MCP server. The generated project should install | ||
| a console script: | ||
|
|
||
| ```toml | ||
| [project.scripts] | ||
| support-tools = "support_agent.server:main" | ||
| ``` | ||
|
|
||
| Declare that executable in `agent.yaml`: | ||
|
|
||
| ```yaml | ||
| mcp: | ||
| servers: | ||
| support-tools: | ||
| transport: stdio | ||
| url: support-tools | ||
| ``` | ||
|
|
||
| Keep credentials out of the config and source tree. Declare environment | ||
| variable names and resolve secrets through the selected NeMo environment. | ||
|
|
||
| For local testing, run the MCP server and its tools from the generated `uv` | ||
| project. For deployment, package the project as an image so the console script | ||
| is installed on the runtime `PATH`. Do not assume a nested project virtual | ||
| environment is visible to a Platform subprocess deployment. | ||
|
|
||
| ## Ordering and approvals | ||
|
|
||
| Prompt instructions and subagent delegation do not guarantee execution order. | ||
| When several steps form one safety or transactional invariant, expose one MCP | ||
| operation that implements the state machine and tests the complete transition. | ||
| For example, `issue_verified_refund` should verify identity and issue the refund | ||
| inside one controlled operation instead of exposing two freely ordered tools. | ||
|
|
||
| Do not use `interrupt_on` for a deployed workflow until the selected Platform | ||
| runtime exposes and tests an end-to-end pause and resume contract. The current | ||
| adapter accepts the setting, but deployed invocation does not provide a verified | ||
| approve, edit or reject resume path. Configuration acceptance is not runtime | ||
| support. | ||
|
|
||
| A local compiled LangGraph subagent cannot be serialized through the current | ||
| Platform config. If the required behavior cannot be represented by a | ||
| deterministic MCP operation, a supported declarative subagent or a supported | ||
| remote agent, stop and report the adapter gap. | ||
|
|
||
| ## Version boundary | ||
|
|
||
| Read the installed Fabric Deep Agents adapter descriptor and the NeMo Agents | ||
| config model before emitting adapter settings. The optional NeMo Agents plugin | ||
| supplies the adapter and its Deep Agents runtime dependency. Reuse the installed | ||
| versions and let the plugin dependency metadata select compatible versions. Do | ||
| not add a separate harness constraint to the generated customer project unless | ||
| its own code directly imports that API. | ||
|
mmogallapalli marked this conversation as resolved.
Resolved
|
||
| <!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> | ||
| <!-- SPDX-License-Identifier: Apache-2.0 --> | ||
98 changes: 98 additions & 0 deletions
98
...tform_ext/src/nemo_platform_ext/skills/nemo-build-agent/references/packaging.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,98 @@ | ||
| # Package and deploy custom agent code | ||
|
|
||
| Use this reference when the agent contains a local MCP server or another Python | ||
| package that must run with the deployed agent. | ||
|
|
||
| ## Project layout | ||
|
|
||
| Keep the complete deployable package under the canonical Ethos directory: | ||
|
|
||
| ```text | ||
| agents/<agent-name>-ethos/ | ||
| ETHOS.md | ||
| agent.yaml | ||
| pyproject.toml | ||
| uv.lock | ||
| src/<package_name>/server.py | ||
| skills/<skill-name>/SKILL.md | ||
| tests/ | ||
| evals/cases.yaml | ||
| ``` | ||
|
|
||
| Omit directories the implementation does not need. Every `skills.paths` value | ||
| must be relative to `agent.yaml`, remain inside this project and point to a | ||
| directory containing `SKILL.md`. | ||
|
|
||
| ## Inspect the build context | ||
|
|
||
| Before packaging: | ||
|
|
||
| 1. Inspect `.gitignore` and `.dockerignore`. | ||
| 2. Search the context for `.env` files, private keys, tokens, credential files, | ||
| local databases, traces and customer data. | ||
| 3. Remove or exclude anything that is not required at runtime. | ||
| 4. Confirm `pyproject.toml` defines every MCP console script referenced by | ||
| `agent.yaml`. | ||
| 5. Confirm `uv.lock` is current and local tests pass with `uv run`. | ||
|
|
||
| Stop if the context contains an unresolved secret or sensitive dataset. | ||
|
|
||
| ## Validate and build | ||
|
|
||
| Use project mode so the Python package and console scripts are installed into | ||
| the image: | ||
|
|
||
| ```bash | ||
| IMAGE_TAG="$AGENT_NAME:local" | ||
| .venv/bin/nemo agents package \ | ||
| --agent "agents/$AGENT_NAME-ethos/agent.yaml" \ | ||
| --pyproject "agents/$AGENT_NAME-ethos/pyproject.toml" \ | ||
| --tag "$IMAGE_TAG" | ||
| ``` | ||
|
|
||
| Do not use `--skip-validation`. For a source checkout, build the current | ||
| Platform wheel and point packaging at it: | ||
|
|
||
| ```bash | ||
| uv build --package nemo-platform --wheel --out-dir dist | ||
| NEMO_AGENTS_WHEEL=LATEST .venv/bin/nemo agents package \ | ||
| --agent "agents/$AGENT_NAME-ethos/agent.yaml" \ | ||
| --pyproject "agents/$AGENT_NAME-ethos/pyproject.toml" \ | ||
| --tag "$IMAGE_TAG" | ||
| ``` | ||
|
|
||
| `NEMO_AGENTS_WHEEL=LATEST` is the supported source checkout path. Do not treat | ||
| the checkout's `0.0.0` project metadata as the released Platform version and do | ||
| not silently weaken validation. | ||
|
|
||
| ## Deploy the packaged image | ||
|
|
||
| After the user approves registration and deployment, use the workspace confirmed | ||
| earlier. If an AgentEnvironment was selected, set `AGENT_ENVIRONMENT` to its | ||
| workspace-qualified reference and include the shown `--environment` option; | ||
| otherwise omit both that variable and option. | ||
|
|
||
| ```bash | ||
| WORKSPACE="<confirmed-workspace>" | ||
| AGENT_ENVIRONMENT="$WORKSPACE/<confirmed-environment>" | ||
|
|
||
| .venv/bin/nemo agents create \ | ||
| --name "$AGENT_NAME" \ | ||
| --agent-config "agents/$AGENT_NAME-ethos/agent.yaml" \ | ||
| --workspace "$WORKSPACE" | ||
|
|
||
| .venv/bin/nemo agents deploy \ | ||
| --agent "$AGENT_NAME" \ | ||
| --name "$AGENT_NAME-deployment" \ | ||
| --mode docker \ | ||
| --image "$IMAGE_TAG" \ | ||
| --workspace "$WORKSPACE" \ | ||
| --environment "$AGENT_ENVIRONMENT" \ | ||
|
coderabbitai[bot] marked this conversation as resolved.
Resolved
|
||
| --timeout 300 | ||
| ``` | ||
|
|
||
| Docker is the supported local container path. Kubernetes requires a published | ||
| image reachable by the configured executor and a separately verified runtime | ||
| contract. | ||
| <!-- SPDX-FileCopyrightText: Copyright (c) 2025-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved. --> | ||
| <!-- SPDX-License-Identifier: Apache-2.0 --> | ||
51 changes: 0 additions & 51 deletions
51
...platform_ext/src/nemo_platform_ext/skills/nemo-build-agent/references/templates/agent.yml
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.