-
Notifications
You must be signed in to change notification settings - Fork 15
feat: add mini-SWE-agent adapter #219
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
rapids-bot
merged 17 commits into
NVIDIA:main
from
zhongxuanwang-nv:feat/mini-swe-agent-adapter
Aug 14, 2026
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
d1e0272
feat: add mini-SWE-agent adapter
zhongxuanwang-nv 3d46c5c
refactor: strengthen mini-SWE-agent model typing
zhongxuanwang-nv 6444f33
refactor: keep mini-SWE-agent adapter compact
zhongxuanwang-nv df493f7
fix: keep mini-SWE-agent adapter minimal
zhongxuanwang-nv 6f56373
test: cover mini-SWE-agent lifecycle failures
zhongxuanwang-nv 5696ba5
refactor: remove mini-SWE-agent adapter duplication
zhongxuanwang-nv 645d42f
refactor: return normalized mini-SWE-agent results
zhongxuanwang-nv e1b7b80
test: use native mini-SWE-agent timeout setting
zhongxuanwang-nv b73d9fd
refactor: place mini-SWE-agent entrypoint last
zhongxuanwang-nv 57ae7cc
docs: simplify mini-SWE-agent guidance
zhongxuanwang-nv d2c9fef
fix: retain mini-SWE-agent runtime history
zhongxuanwang-nv 174d924
merge: sync mini-SWE-agent adapter with main
zhongxuanwang-nv 9d03780
refactor: delegate mini-SWE-agent continuation to native run
zhongxuanwang-nv 85ea483
refactor: localize mini-SWE-agent history bridge
zhongxuanwang-nv cdc5610
fix: retain complete mini-SWE-agent tool history
zhongxuanwang-nv 3924e7b
docs: refine mini-SWE-agent adapter guidance
zhongxuanwang-nv 99092ba
docs: correct mini-SWE-agent runtime state
zhongxuanwang-nv 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
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
Large diffs are not rendered by default.
Oops, something went wrong.
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
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
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 @@ | ||
| ../../LICENSE |
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,73 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
| --> | ||
|
|
||
| # NVIDIA NeMo Fabric mini-SWE-agent Adapter | ||
|
|
||
| Use the `nvidia.fabric.mini-swe-agent` adapter to run mini-SWE-agent with | ||
| NVIDIA NeMo Fabric. | ||
|
|
||
| ## Install | ||
|
|
||
| | Installation | Runtime | Adapter | Harness | | ||
| | --- | --- | --- | --- | | ||
| | `pip install "nemo-fabric[mini-swe-agent]"` | Yes | Yes | Yes | | ||
| | `pip install "nemo-fabric-adapters-mini-swe-agent[harness]"` | No | Yes | Yes | | ||
| | `pip install "nemo-fabric-adapters-mini-swe-agent[full]"` | No | Yes | Yes | | ||
| | `pip install nemo-fabric-adapters-mini-swe-agent` | No | Yes | No | | ||
|
|
||
| The `harness` and `full` extras install the latest compatible mini-SWE-agent | ||
| 2.x release. | ||
|
|
||
| ## Configuration | ||
|
|
||
| The adapter supports `models`, `models.base_url`, `models.temperature`, | ||
| `instructions.system`, `runtime.max_turns`, and `environment.workspace`. | ||
| `runtime.timeout_seconds` sets the NVIDIA NeMo Fabric invocation deadline. Use | ||
| `harness.settings.timeout` to set the maximum duration of one command; the | ||
| default is `30` seconds. | ||
|
|
||
| Set `models.<role>.api_key_env` to the environment variable containing the | ||
| model-provider credential. This adapter does not support MCP, skills, tool | ||
| policy, streaming, or telemetry output. | ||
|
|
||
| ```python | ||
| import asyncio | ||
|
|
||
| from nemo_fabric import EnvironmentConfig, Fabric, FabricConfig, HarnessConfig | ||
| from nemo_fabric import InstructionConfig, InstructionsConfig, MetadataConfig | ||
| from nemo_fabric import ModelConfig, RuntimeConfig | ||
|
|
||
| config = FabricConfig( | ||
| metadata=MetadataConfig(name="mini-swe-agent"), | ||
| harness=HarnessConfig( | ||
| adapter_id="nvidia.fabric.mini-swe-agent", | ||
| resolution="preinstalled", | ||
| settings={"timeout": 30}, | ||
| ), | ||
| models={ | ||
| "default": ModelConfig( | ||
| provider="nvidia", | ||
| model="nvidia/nemotron-3-nano-omni-30b-a3b-reasoning", | ||
| api_key_env="NVIDIA_API_KEY", | ||
| base_url="https://integrate.api.nvidia.com/v1", | ||
| ) | ||
| }, | ||
| instructions=InstructionsConfig( | ||
| system=InstructionConfig(content="Work carefully and verify the change.") | ||
| ), | ||
| runtime=RuntimeConfig(max_turns=50, timeout_seconds=1800), | ||
| environment=EnvironmentConfig(provider="local", workspace="/workspace"), | ||
| ) | ||
|
|
||
| async def main(): | ||
| return await Fabric().run( | ||
| config, base_dir="/workspace", input="Fix the failing test." | ||
| ) | ||
|
|
||
|
|
||
| result = asyncio.run(main()) | ||
| ``` | ||
|
|
||
| The result includes the submitted final text and API-call usage. | ||
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,57 @@ | ||
| { | ||
| "contract_version": "fabric.adapter/v1alpha2", | ||
| "adapter_id": "nvidia.fabric.mini-swe-agent", | ||
| "harness": "mini-swe-agent", | ||
| "adapter_kind": "python", | ||
| "runner": { | ||
| "module": "nemo_fabric_adapters.mini_swe_agent.adapter" | ||
| }, | ||
| "model_schema": { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "properties": { | ||
| "provider": {"type": "string", "minLength": 1}, | ||
| "model": {"type": "string", "minLength": 1}, | ||
| "temperature": {"type": "number"}, | ||
| "api_key_env": {"type": "string", "minLength": 1}, | ||
| "base_url": {"type": "string", "minLength": 1}, | ||
| "settings": { | ||
| "type": "object", | ||
| "properties": {}, | ||
| "additionalProperties": false | ||
| } | ||
| }, | ||
| "required": ["provider", "model"], | ||
| "additionalProperties": false | ||
| }, | ||
| "settings_schema": { | ||
| "$schema": "https://json-schema.org/draft/2020-12/schema", | ||
| "type": "object", | ||
| "properties": { | ||
| "timeout": { | ||
| "type": "integer", | ||
| "minimum": 1, | ||
| "default": 30, | ||
| "description": "Maximum duration of one shell command." | ||
| } | ||
| }, | ||
| "additionalProperties": false | ||
| }, | ||
| "requirements": {}, | ||
| "config": { | ||
| "input": "agent_config", | ||
| "accepts": [ | ||
| "models", | ||
| "models.base_url", | ||
| "models.temperature", | ||
| "instructions.system", | ||
| "runtime.max_turns" | ||
| ] | ||
| }, | ||
| "capabilities": { | ||
| "service": false, | ||
| "streaming": false, | ||
| "updates": false, | ||
| "cancellation": false | ||
| } | ||
| } |
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,27 @@ | ||
| <!-- | ||
| SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| SPDX-License-Identifier: Apache-2.0 | ||
| --> | ||
|
|
||
| # NVIDIA NeMo Fabric mini-SWE-agent Adapter | ||
|
zhongxuanwang-nv marked this conversation as resolved.
|
||
|
|
||
| [](https://github.com/NVIDIA/NeMo-Fabric/blob/main/LICENSE) | ||
| [](https://github.com/NVIDIA/NeMo-Fabric/) | ||
| [](https://github.com/NVIDIA/NeMo-Fabric/releases) | ||
|
|
||
| `nemo-fabric-adapters-mini-swe-agent` translates the NVIDIA NeMo Fabric | ||
| adapter contract into mini-SWE-agent's native shell-only execution loop. | ||
|
|
||
| ## Install | ||
|
|
||
| The following table shows which components each installation provides: | ||
|
|
||
| | Installation | Runtime | Adapter | Harness | | ||
| | --- | --- | --- | --- | | ||
| | `pip install "nemo-fabric[mini-swe-agent]"` | Yes | Yes | Yes | | ||
| | `pip install "nemo-fabric-adapters-mini-swe-agent[harness]"` | No | Yes | Yes | | ||
| | `pip install "nemo-fabric-adapters-mini-swe-agent[full]"` | No | Yes | Yes | | ||
| | `pip install nemo-fabric-adapters-mini-swe-agent` | No | Yes | No | | ||
|
|
||
| For configuration and behavior, see the | ||
| [mini-SWE-agent adapter README](https://github.com/NVIDIA/NeMo-Fabric/tree/main/adapters/mini-swe-agent/README.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,55 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| [build-system] | ||
| requires = [ | ||
| "setuptools>=77", | ||
| ] | ||
| build-backend = "setuptools.build_meta" | ||
|
|
||
| [project] | ||
| name = "nemo-fabric-adapters-mini-swe-agent" | ||
| version = "0.2.0" | ||
| description = "mini-SWE-agent adapter for NeMo Fabric" | ||
| authors = [ | ||
| { name = "NVIDIA Corporation" }, | ||
| ] | ||
| keywords = ["agents", "ai", "nemo-fabric", "runtime", "tools"] | ||
| classifiers = [ | ||
| "Development Status :: 4 - Beta", | ||
| "Intended Audience :: Developers", | ||
| "Programming Language :: Python :: 3", | ||
| ] | ||
| license = "Apache-2.0" | ||
| license-files = ["LICENSE"] | ||
| readme = "pypi.md" | ||
| requires-python = ">=3.11" | ||
| dependencies = [ | ||
| "nemo-fabric-adapter-contract == 0.2.0", | ||
| "nemo-fabric-adapters-common == 0.2.0", | ||
| ] | ||
|
|
||
| [project.optional-dependencies] | ||
| harness = [ | ||
| "mini-swe-agent>=2.0,<3", | ||
| ] | ||
| full = [ | ||
| "mini-swe-agent>=2.0,<3", | ||
| ] | ||
|
|
||
| [project.urls] | ||
| Repository = "https://github.com/NVIDIA/NeMo-Fabric" | ||
| Homepage = "https://github.com/NVIDIA/NeMo-Fabric" | ||
| Issues = "https://github.com/NVIDIA/NeMo-Fabric/issues" | ||
| Documentation = "https://docs.nvidia.com/nemo/fabric" | ||
|
|
||
| [tool.setuptools.packages.find] | ||
| where = ["src"] | ||
| include = ["nemo_fabric_adapters.mini_swe_agent*"] | ||
|
|
||
| [tool.setuptools.data-files] | ||
| "share/nemo-fabric/adapters/mini-swe-agent" = ["fabric-adapter.json"] | ||
|
|
||
| [tool.uv.sources] | ||
| nemo-fabric-adapter-contract = { path = "../../adapter-contract", editable = true } | ||
| nemo-fabric-adapters-common = { path = "../common", editable = true } |
4 changes: 4 additions & 0 deletions
4
adapters/mini-swe-agent/src/nemo_fabric_adapters/mini_swe_agent/__init__.py
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,4 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| """mini-SWE-agent adapter package for NeMo Fabric.""" |
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.