Add sandbox agent example with Docker and Daytona support#14
Open
Jerryguan777 wants to merge 7 commits intoNVIDIA:mainfrom
Open
Add sandbox agent example with Docker and Daytona support#14Jerryguan777 wants to merge 7 commits intoNVIDIA:mainfrom
Jerryguan777 wants to merge 7 commits intoNVIDIA:mainfrom
Conversation
- General-purpose AI agent with sandboxed code execution - Supports Docker containers and Daytona cloud sandboxes - Tools: shell, python, file_read, file_write, web_browse, web_search, youtube_transcript - GAIA benchmark evaluation support - Comprehensive test suite (159 tests) Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Member
|
/ok to test 56b43de |
willkill07
approved these changes
Jan 29, 2026
- Add technical terms to Vale accept.txt: Daytona, httpx, matplotlib, openpyxl, pyyaml, reportlab, sandbox variants, seaborn - Fix NumPy capitalization in README.md Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Member
|
/ok to test 4e2bd17 |
Member
|
@Jerryguan777 it looks like not all of the code is formatted according to the CI Pipeline Check |
Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Author
|
@willkill07 Thanks for catching this. I've fixed the formatting.
|
Member
|
/ok to test 3ad8836 |
Tool changes: - Remove youtube_transcript, add web_fetch (lightweight HTTP GET) - Add web_fetch vs web_browse decision rule with 403 fallback New guidance (not in previous version): - Python execution rules: print() requirement, no variable persistence, empty stdout handling, with code examples - Input file handling: attached file path detection and file extension-to-tool mapping (.xlsx, .pdf, .mp3, .pptx, etc.) - Format Verification checklist (number, unit, delimiter, case, date) - Calculation and Reasoning Verification strategies - Multi-Step Web Research strategies - Data Extraction Best Practices - Environment: root privileges, pip/apt-get install, error handling Removed redundant sections: - Guidelines (covered by Rules), Response Format (covered by §4), Problem-Solving Strategy (split into Rules and Environment), trailing "ALWAYS use tools" reminder Structure: 10+ nested sections → 5 flat (Tools, Environment, Rules, Strategies). Generalized GAIA-specific language for broader use. Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Tool changes: - Remove youtube_transcript, add web_fetch (lightweight HTTP GET) - Add web_fetch vs web_browse decision rule with 403 fallback New guidance (not in previous version): - Python execution rules: print() requirement, no variable persistence, empty stdout handling, with code examples - Input file handling: attached file path detection and file extension-to-tool mapping (.xlsx, .pdf, .mp3, .pptx, etc.) - Format Verification checklist (number, unit, delimiter, case, date) - Calculation and Reasoning Verification strategies - Multi-Step Web Research strategies - Data Extraction Best Practices - Environment: root privileges, pip/apt-get install, error handling Removed redundant sections: - Guidelines (covered by Rules), Response Format (covered by §4), Problem-Solving Strategy (split into Rules and Environment), trailing "ALWAYS use tools" reminder Structure: 10+ nested sections → 5 flat (Tools, Environment, Rules, Strategies). Generalized GAIA-specific language for broader use. Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Member
|
/ok to test c25015d |
…em prompt - Add image_describe host tool: reads images from sandbox via read_file_bytes, sends base64 to a configurable vision LLM, returns text description. Supports png/jpg/jpeg/gif/webp/bmp/tiff. - Add read_file_bytes abstract method to BaseSandbox with Docker and Daytona implementations. - Add vision_llm_name config option to SandboxAgentWorkflowConfig. - Enhance answer cleaning prompt: add extraction/formatting/output grouping, embedded scale handling, case sensitivity rules. - Remove rule-based clean_answer function (only LLM-based remains). - Streamline system prompt: merge Rules and Strategies sections, fold web tool decision rule into tool descriptions, condense Python examples, reduce prompt size by 35% with no accuracy loss. - Update configs to support vision_llm configuration. - Add tests for image_describe tool and update existing tests. Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Member
|
/ok to test 18d850d |
Signed-off-by: Jerry Guan <jerryguan777@gmail.com>
Member
|
/ok to test eafbf33 |
Member
|
@Jerryguan777 CI is still failing. Can you please try to ensure CI passes locally before your next update? I do want to get this merged in :)
I will work on a PR that handles the copyright errors. |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds Sandbox Agent to
examples/, a general-purpose AI agent that executes tasks within secure, isolated Docker containers or Daytona cloud sandboxes.Motivation
Why Sandboxing Matters
Sandbox isolation provides security and consistency for agents that need to execute shell commands, Python code, or file operations, which are common requirements for agent types such as coding/testing agents, data analysis agents, and security-oriented agents.
Task Examples
Example 1: Data Analysis Workflow
Example 2: Multi-Step Research
Features
1. Dual Sandbox Backend Support
2. Comprehensive Tool Suite (8 tools)
shellpythonfile_readfile_writeweb_browseweb_searchweb_fetchimage_describeArchitecture insight: Host-side tools keep API keys secure and reduce latency. Sandbox-side tools provide isolation for untrusted operations.
4. GAIA Benchmark Results (February 2026, GPT-5.2 + GPT-5.2 Vision)
These results demonstrate the agent's capability on real-world tasks from the GAIA benchmark, including web research, file analysis, mathematical reasoning, and image understanding.
4. Integration with NAT
@register_functionfor workflow registrationnat runandnat serveNAT LLMs(NIM, OpenAI, Anthropic, etc.)NAT evaluationframeworkPhoenixobservabilityCode Quality
Test Coverage: ~90%(141 unit tests, 14 integration tests, 155 total — all pass)NAT code style(ruff-formatted)type annotations(Python 3.10+)docstrings(Google style)error handlingandloggingAsync/awaitthroughoutProject Structure
Description
Closes
By Submitting this PR I confirm: