Skip to content

feat(agents): AgentSandboxSpec entity with CRUD, resolution, snapshot, and runtime wiring - #1525

Draft
maxdubrinsky wants to merge 5 commits into
mainfrom
mdubrinsky/aircore-1068-agentsandboxspec-entity-crud-routes-resolution-and-runtime
Draft

feat(agents): AgentSandboxSpec entity with CRUD, resolution, snapshot, and runtime wiring#1525
maxdubrinsky wants to merge 5 commits into
mainfrom
mdubrinsky/aircore-1068-agentsandboxspec-entity-crud-routes-resolution-and-runtime

Conversation

@maxdubrinsky

Copy link
Copy Markdown
Contributor

Summary

Adds AgentSandboxSpec as a first-class entity with CRUD routes at /sandbox-specs, wires it end-to-end through environment resolution, deployment snapshotting, and runtime compilation into the deployments-plugin DeploymentConfig.backend_config. The sandbox spec defines an agent's isolation posture (provider + provider_config) and is referenced by AgentEnvironment.sandbox_spec as a ref/inline/None union, mirroring the EnvironmentSpec/ComputeSpec pattern from #1379.

Related Issue

Closes AIRCORE-1068

Changes

  • SandboxSpecInline model (provider + provider_config) and AgentSandboxSpec entity with CRUD routes at /sandbox-specs
  • sandbox_spec field on AgentEnvironment/AgentEnvironmentInline (ref | inline | None)
  • ResolvedEnvironment carries sandbox_spec; _resolve_sandbox_spec() dereferences refs
  • AgentDeployment gets sandbox: SandboxSpecInline | None snapshot field
  • create_deployment route snapshots resolved sandbox_spec onto the deployment
  • RunnerBackend.create_deployment() adds sandbox parameter; subprocess ignores it, containers compile it
  • _build_sandbox_backend_config() maps provider names (e.g. "openshell") to DeploymentBackendConfig models via _SANDBOX_PROVIDER_BACKEND_CONFIG_MODELS registry
  • nemo agents deploy --environment CLI flag and SDK environment parameter
  • OpenAPI spec regenerated with sandbox field on AgentDeployment
  • Stainless SDK sync (infrastructure maintenance)

Type of Change

  • Code change (feature, bug fix, or refactor)
  • Code change with documentation updates
  • Documentation only
  • Contributor tooling or automation
  • CI, build, or test infrastructure

Quality Gates

  • Tests added or updated for changed behavior
  • Existing tests cover changed behavior — justification:
  • Tests not applicable — justification:
  • Documentation updated for user-visible behavior
  • Documentation not applicable — justification: Entity-layer addition with no user-facing docs required. CLI --help text is self-documenting.

Verification

  • Pull request title follows the repository's Conventional Commit format
  • Every commit includes an appropriate Signed-off-by: trailer
  • Targeted tests pass, or tests are marked not applicable above
  • No secrets, API keys, or credentials are included

Targeted validation:

uv run pytest plugins/nemo-agents/tests/unit/test_environment_resolution.py \
  plugins/nemo-agents/tests/unit/test_deployments_api.py \
  plugins/nemo-agents/tests/unit/test_entities.py \
  plugins/nemo-agents/tests/unit/test_environments_api.py \
  plugins/nemo-agents/tests/unit/test_controller.py \
  plugins/nemo-agents/tests/unit/test_runner_controller.py \
  plugins/nemo-agents/tests/unit/test_runner_in_memory.py -v
→ 139 passed

uv run pre-commit run -a → pending (CI gate)

@github-actions github-actions Bot added the feat label Aug 25, 2026
@maxdubrinsky
maxdubrinsky force-pushed the mdubrinsky/aircore-1068-agentsandboxspec-entity-crud-routes-resolution-and-runtime branch from 6c8dd57 to a806544 Compare August 25, 2026 20:21
@github-actions

github-actions Bot commented Aug 25, 2026

Copy link
Copy Markdown
Contributor
Suite Lines Covered Line Rate Branch Rate
Unit Tests 35432/45223 78.3% 62.9%
Integration Tests 21118/42998 49.1% 22.3%

Add SandboxSpecInline (provider + provider_config) as the isolation-posture
slot on AgentEnvironment that RFC-129 left out of scope. AgentSandboxSpec is
a first-class entity with CRUD routes at /sandbox-specs, mirroring the
EnvironmentSpec and ComputeSpec pattern from #1379.

The sandbox_spec field on AgentEnvironmentInline is ref | inline | None,
matching the composition model. No runtime wiring or compiler integration
yet; this is the entity layer only.

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
… runtime

Resolve sandbox_spec refs in environment_resolution (ResolvedEnvironment +
_resolve_sandbox_spec), snapshot it onto AgentDeployment as a new sandbox
field, and plumb it through the controller → RunnerBackend →
DeploymentConfig.backend_config.

The _SANDBOX_PROVIDER_BACKEND_CONFIG_MODELS registry maps provider names
(e.g. "openshell") to backend config models; provider_config is validated
against the model and compiled into DeploymentBackendConfig.{provider}.
Unknown providers are silently skipped.

Subprocess mode ignores sandbox (no isolation). Container mode is the
only consumer today.

AIRCORE-1068

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
Add --environment/-e flag to `nemo agents deploy` accepting ref strings
("workspace/name") or inline JSON. Add environment parameter to
_DeploymentResource.create in the Python SDK.

AIRCORE-1068

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
…ield

AIRCORE-1068

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
… update

AIRCORE-1068

Signed-off-by: Max Dubrinsky <mdubrinsky@nvidia.com>
@maxdubrinsky
maxdubrinsky force-pushed the mdubrinsky/aircore-1068-agentsandboxspec-entity-crud-routes-resolution-and-runtime branch from a806544 to 51dff82 Compare August 26, 2026 21:46
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.

1 participant