Skip to content

docs(agents): add Deploy Agents guide and SDK deploy-mode parity#682

Merged
benmccown merged 5 commits into
mainfrom
agent-deployment-docs
Jul 15, 2026
Merged

docs(agents): add Deploy Agents guide and SDK deploy-mode parity#682
benmccown merged 5 commits into
mainfrom
agent-deployment-docs

Conversation

@benmccown

@benmccown benmccown commented Jul 14, 2026

Copy link
Copy Markdown
Contributor

Add docs/agents/deploy-agents.mdx covering subprocess, docker, and k8s deployment modes, invocation through the Agents gateway, model access, inspection, and cleanup. Wire it into the Agents nav and index.

Add deployment_mode and image parameters to the agents SDK deployments.create() so the Python SDK reaches parity with the CLI for container-mode deployments, matching the examples in the new doc.

Summary by CodeRabbit

  • New Features
    • Added support for deploying agents in subprocess, docker, or k8s modes via the Agents gateway.
    • Extended the SDK to choose a deployment mode and (for durable modes) specify a container image.
  • Documentation
    • Added a “Deploy Agents” guide with end-to-end CLI/SDK examples, routing details, and cleanup steps.
    • Updated “How It Works” to clarify subprocess defaults and durable Docker/Kubernetes execution.
  • Bug Fixes
    • Fixed Docker deployment argument handling so command/args map correctly to entrypoint/command semantics.
  • Tests
    • Updated tests for the new writable config mount path (/workspace/config.yaml) and Docker mapping behavior.
  • Chores
    • Updated calculator-agent example dependencies for container workflows.

@benmccown
benmccown requested review from a team as code owners July 14, 2026 19:11
@benmccown benmccown self-assigned this Jul 14, 2026
@benmccown
benmccown requested a review from tylersbray July 14, 2026 19:12
@github-actions github-actions Bot added the docs label Jul 14, 2026
@github-actions

Copy link
Copy Markdown
Contributor

@coderabbitai

coderabbitai Bot commented Jul 14, 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: 1f5cdde1-1ae2-4296-be3d-adc0f931f57b

📥 Commits

Reviewing files that changed from the base of the PR and between 31fc6ee and 6499a50.

📒 Files selected for processing (1)
  • docs/agents/deploy-agents.mdx
🚧 Files skipped from review as they are similar to previous changes (1)
  • docs/agents/deploy-agents.mdx

📝 Walkthrough

Walkthrough

The PR documents subprocess, Docker, and Kubernetes agent deployments, extends the SDK for deployment modes and images, updates writable container configuration paths, corrects Docker command mapping, adds packaging dependencies, and updates related tests and navigation.

Changes

Agent deployment support

Layer / File(s) Summary
SDK deployment options
plugins/nemo-agents/src/nemo_agents_plugin/sdk.py
Deployment creation accepts deployment_mode and optional image, rejects images for subprocess mode, and demonstrates Docker configuration.
Deployment modes and runtime configuration
docs/agents/deploy-agents.mdx, plugins/nemo-agents/src/nemo_agents_plugin/config.py, plugins/nemo-agents/tests/unit/test_runner_deployments.py
Documents deployment flows and updates the config mount path to /workspace/config.yaml with matching tests.
Model access and deployment operations
docs/agents/deploy-agents.mdx
Documents gateway model access, deployment inspection, endpoint behavior, and cleanup.
Docker process argument mapping
plugins/nemo-deployments/src/nemo_deployments_plugin/backends/docker/backend.py, plugins/nemo-deployments/tests/unit/backends/docker/test_backend_mocked.py
Maps container commands to Docker entrypoints and args to Docker commands, with unit coverage.
Documentation integration
docs/agents/index.mdx, docs/fern/versions/latest.yml
Adds deployment guidance and links the deployment page in Agents navigation.
Agent packaging support
plugins/nemo-agents/examples/calculator-agent/pyproject.toml, packages/nemo_platform/pyproject.toml
Adds the LangChain dependency to the calculator example and generated optional dependency bundle.

Possibly related PRs

Suggested labels: feat

Suggested reviewers: tylersbray

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.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 captures the main documentation addition and SDK deployment-mode support.
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 unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch agent-deployment-docs

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.

Actionable comments posted: 2

🧹 Nitpick comments (1)
plugins/nemo-agents/src/nemo_agents_plugin/sdk.py (1)

217-244: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Add a test for the new image/deployment_mode validation.

No test exercises the ValueError path (image + subprocess) or the payload shape for docker/k8s modes. This is new branching logic worth covering.

🤖 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/sdk.py` around lines 217 - 244,
Add tests for the deployment creation method covering both branches introduced
by the image validation: assert that providing image with
deployment_mode="subprocess" raises ValueError, and verify docker and k8s
requests include the expected deployment_mode and image fields in the payload
while preserving other deployment fields.
🤖 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 `@docs/agents/deploy-agents.mdx`:
- Around line 342-365: Update the Python SDK inspection example to handle both
deployment response shapes: use the plural endpoints field for container-mode
deployments and the singular endpoint field for subprocess deployments, avoiding
an unconditional deployment["endpoints"] access while preserving the displayed
deployment mode and status.
- Around line 244-246: Add a blank line between the closing </Tabs> tag and the
“Deploy on Kubernetes” heading. In the SDK deployment example, update the
deployment field access to support both endpoint and endpoints representations,
including subprocess deployments, instead of assuming deployment["endpoints"]
always exists.

---

Nitpick comments:
In `@plugins/nemo-agents/src/nemo_agents_plugin/sdk.py`:
- Around line 217-244: Add tests for the deployment creation method covering
both branches introduced by the image validation: assert that providing image
with deployment_mode="subprocess" raises ValueError, and verify docker and k8s
requests include the expected deployment_mode and image fields in the payload
while preserving other deployment fields.
🪄 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: f3d742ca-5dd7-4343-9e98-4f8f5beebff7

📥 Commits

Reviewing files that changed from the base of the PR and between 0101419 and 0c4c622.

📒 Files selected for processing (4)
  • docs/agents/deploy-agents.mdx
  • docs/agents/index.mdx
  • docs/fern/versions/latest.yml
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py

Comment thread docs/agents/deploy-agents.mdx
Comment thread docs/agents/deploy-agents.mdx
@github-actions

github-actions Bot commented Jul 14, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 25436/32661 77.9% 62.5%
Integration Tests 14702/31310 47.0% 19.3%

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

It makes more sense now, thanks.

@benmccown
benmccown enabled auto-merge July 14, 2026 23:23
Add docs/agents/deploy-agents.mdx covering subprocess, docker, and k8s
deployment modes, invocation through the Agents gateway, model access,
inspection, and cleanup. Wire it into the Agents nav and index.

Add deployment_mode and image parameters to the agents SDK
deployments.create() so the Python SDK reaches parity with the CLI for
container-mode deployments, matching the examples in the new doc.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
Validating the Deploy Agents doc surfaced several bugs that broke docker
(and k8s) container-mode deployments. Fix them so the documented workflow
works end-to-end:

- deployments docker backend: map a container spec's command -> docker
  entrypoint and args -> docker command, mirroring the k8s compiler. The
  previous code folded both into docker's command (CMD), leaving a packaged
  image's baked-in ENTRYPOINT in force so the platform-supplied startup
  command (which writes the resolved NAT config) was silently dropped.
- agents deployments compiler: default config_mount_path to
  /workspace/config.yaml (under the image's writable WORKDIR) instead of
  /config/agent.yaml, which the non-root container user cannot create.
  k8s mounts it read-only via a ConfigMap subPath, so the path is agnostic
  there. /config was arbitrary and inconsistent with the image's own
  NAT_CONFIG_FILE convention.
- calculator example: add nvidia-nat-langchain dependency so a packaged
  image actually contains the react_agent workflow and openai LLM it uses.

Docs: add the deploy-agents container-mode prerequisites (project-mode
packaging with --pyproject, the [container] extra, and gateway
reachability from inside the container), fix the SDK snippets to the real
client.agents API, and tighten the agents overview wording.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
'make vendor' regenerates packages/nemo_platform/pyproject.toml from
[tool.bundle-package]. The calculator example gained nvidia-nat-langchain;
sync the generated bundle so lint-sdk-vendored passes.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
@benmccown
benmccown force-pushed the agent-deployment-docs branch from c8f8c82 to 31fc6ee Compare July 15, 2026 15:17

@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: 1

🤖 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 `@docs/agents/deploy-agents.mdx`:
- Around line 234-236: Update both SDK deployment examples in
docs/agents/deploy-agents.mdx at lines 234-236 and 291-293 to open the
documented workflow YAML path src/calculator_agent/calculator-agent.yml instead
of calculator-agent.yml; keep the deployment calls unchanged.
🪄 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: ee62891d-dbdc-4adc-973a-9f2f22147c5c

📥 Commits

Reviewing files that changed from the base of the PR and between c8f8c82 and 31fc6ee.

📒 Files selected for processing (10)
  • docs/agents/deploy-agents.mdx
  • docs/agents/index.mdx
  • docs/fern/versions/latest.yml
  • packages/nemo_platform/pyproject.toml
  • plugins/nemo-agents/examples/calculator-agent/pyproject.toml
  • plugins/nemo-agents/src/nemo_agents_plugin/config.py
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py
  • plugins/nemo-agents/tests/unit/test_runner_deployments.py
  • plugins/nemo-deployments/src/nemo_deployments_plugin/backends/docker/backend.py
  • plugins/nemo-deployments/tests/unit/backends/docker/test_backend_mocked.py
🚧 Files skipped from review as they are similar to previous changes (7)
  • docs/fern/versions/latest.yml
  • plugins/nemo-agents/src/nemo_agents_plugin/sdk.py
  • plugins/nemo-deployments/src/nemo_deployments_plugin/backends/docker/backend.py
  • plugins/nemo-agents/tests/unit/test_runner_deployments.py
  • plugins/nemo-deployments/tests/unit/backends/docker/test_backend_mocked.py
  • docs/agents/index.mdx
  • plugins/nemo-agents/src/nemo_agents_plugin/config.py

Comment thread docs/agents/deploy-agents.mdx Outdated
@benmccown
benmccown disabled auto-merge July 15, 2026 15:24
Address PR review feedback on deploy-agents.mdx:
- Point the docker/k8s Python SDK examples at the documented workflow YAML
  path (src/calculator_agent/calculator-agent.yml), matching their CLI tabs
  and the Prerequisites project directory.
- Add a blank line between </Tabs> and the Deploy on Kubernetes heading.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
@benmccown

Copy link
Copy Markdown
Contributor Author

@coderabbitai acknowledging the remaining nitpick from your review (SDK image/deployment_mode validation test in plugins/nemo-agents/src/nemo_agents_plugin/sdk.py): not addressing it in this PR. This PR is docs-focused; the validation branch is thin and the deploy-mode payload/validation behavior is already covered at the CLI/API layer. We can add a dedicated SDK unit test in a follow-up if desired.

@coderabbitai

coderabbitai Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Tip

For best results, initiate chat on the files or code changes.

@benmccown Understood, deferring to a follow-up is fine.

@benmccown
benmccown enabled auto-merge July 15, 2026 15:32
The calculator example gained nvidia-nat-langchain (commit d2b0cb8) but
uv.lock was not regenerated, leaving it out of sync with pyproject. This
surfaced as lint-web-sdk failing (its tree-wide regen+diff reported a dirty
uv.lock). Re-lock to sync.

Signed-off-by: Ben McCown <bmccown@nvidia.com>
@benmccown
benmccown added this pull request to the merge queue Jul 15, 2026
Merged via the queue into main with commit 4b2b0d7 Jul 15, 2026
102 of 104 checks passed
@benmccown
benmccown deleted the agent-deployment-docs branch July 15, 2026 16:35
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