-
Notifications
You must be signed in to change notification settings - Fork 269
feat(deep-research): provider-neutral sandbox + durable artifact runtime #280
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 all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
fb4d604
feat(deep-research): provider-neutral sandbox + durable artifact runtime
KyleZheng1284 6b7527f
fix(deep-research): job-scope artifacts and address sandbox review fe…
KyleZheng1284 fc7340e
fix(deep-research): sandbox security hardening, cancellable lifecycle…
KyleZheng1284 6af023d
fix(deep-research): RFC 5987 artifact filename + PDF WebP exclusion
KyleZheng1284 bc704aa
fix(deep-research): harden untrusted-sandbox artifact transfer
KyleZheng1284 5cb3561
fix(deep-research): testable terminal teardown, bounded artifact read…
KyleZheng1284 d9a7526
feat(deep-research): per-job sandbox workspace isolation + opt-in res…
KyleZheng1284 5c5c4f0
fix(deep-research): reconcile figure-embedding mechanics vs visualiza…
KyleZheng1284 48d2050
feat(deep-research): persist planner plan in runtime; surface sandbox…
KyleZheng1284 671f5e0
fix(deep-research): salvage inline report + reconcile writer handoff
KyleZheng1284 7da17b8
docs(deep-research): add docstrings to clear coverage gate; address r…
KyleZheng1284 08df3d1
Merge remote-tracking branch 'origin/develop' into feat/sandbox-artif…
KyleZheng1284 b138f52
fix(deep-research): backfill URL-less writer source lines in citation…
KyleZheng1284 ce254c0
feat(deep-research): opt-in OpenShell container command logging
KyleZheng1284 5c3243a
fix(deep-research): address PR review - OpenShell hardening + dead-co…
KyleZheng1284 1e21217
Merge branch 'develop' into feat/sandbox-artifact-runtime
cdgamarose-nv 5c69dc2
fix(deep-research): address review batch + migrate OpenShell adapter …
KyleZheng1284 0e010c7
test(ui): fix ExportFooter/ReportTab mocks for selectResolvedDeepRese…
KyleZheng1284 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
Some comments aren't visible on the classic Files Changed page.
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
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,176 @@ | ||
| # EXPERIMENTAL: AI-Q deep research over a local, single-operator OpenShell sandbox. | ||
| # Run ./scripts/setup_openshell.sh first to provision the gateway and named sandbox. | ||
| # Jobs attach to that shared sandbox; per-job directories prevent filename collisions | ||
| # but are not a security boundary. Do not run mutually untrusted jobs concurrently. | ||
|
|
||
| general: | ||
| use_uvloop: true | ||
| telemetry: | ||
| logging: | ||
| console: | ||
| _type: console | ||
| level: INFO | ||
|
|
||
| front_end: | ||
| _type: aiq_api | ||
| runner_class: aiq_api.plugin.AIQAPIWorker | ||
| db_url: ${NAT_JOB_STORE_DB_URL:-sqlite+aiosqlite:///./jobs.db} | ||
| expiry_seconds: 86400 | ||
| cors: | ||
| allow_origin_regex: 'http://localhost(:\d+)?|http://127.0.0.1(:\d+)?' | ||
| allow_methods: | ||
| - GET | ||
| - POST | ||
| - DELETE | ||
| - OPTIONS | ||
| allow_headers: | ||
| - "*" | ||
| allow_credentials: true | ||
| expose_headers: | ||
| - "*" | ||
|
|
||
| llms: | ||
| nemotron_llm_intent: | ||
| _type: nim | ||
| model_name: nvidia/nemotron-3-super-120b-a12b | ||
| base_url: "https://integrate.api.nvidia.com/v1" | ||
| temperature: 0.5 | ||
| top_p: 0.9 | ||
| max_tokens: 4096 | ||
| num_retries: 5 | ||
| chat_template_kwargs: | ||
| enable_thinking: true | ||
|
|
||
| nemotron_super_llm: | ||
| _type: nim | ||
| model_name: nvidia/nemotron-3-super-120b-a12b | ||
| base_url: "https://integrate.api.nvidia.com/v1" | ||
| temperature: 0.7 | ||
| top_p: 0.7 | ||
| max_tokens: 65536 | ||
| num_retries: 5 | ||
| chat_template_kwargs: | ||
| enable_thinking: true | ||
|
|
||
| gpt_oss_llm: | ||
| _type: nim | ||
| model_name: openai/gpt-oss-120b | ||
| base_url: https://integrate.api.nvidia.com/v1 | ||
| temperature: 1.0 | ||
| top_p: 1.0 | ||
| max_tokens: 256000 | ||
| api_key: ${NVIDIA_API_KEY} | ||
| max_retries: 10 | ||
|
|
||
| summary_llm: | ||
| _type: nim | ||
| model_name: nvidia/nemotron-mini-4b-instruct | ||
| base_url: "https://integrate.api.nvidia.com/v1" | ||
| api_key: ${NVIDIA_API_KEY} | ||
| temperature: 0.3 | ||
| max_tokens: 100 | ||
|
|
||
| functions: | ||
| data_sources: | ||
| _type: data_source_registry | ||
| sources: | ||
| - id: web_search | ||
| name: "Web Search" | ||
| description: "Search the web for real-time information." | ||
| tools: | ||
| - web_search_tool | ||
| - advanced_web_search_tool | ||
| - id: knowledge_layer | ||
| name: "Knowledge Base" | ||
| description: "Search uploaded documents and files." | ||
| tools: | ||
| - knowledge_search | ||
|
|
||
| web_search_tool: | ||
| _type: tavily_web_search | ||
| max_results: 5 | ||
| max_content_length: 1000 | ||
|
|
||
| advanced_web_search_tool: | ||
| _type: tavily_web_search | ||
| max_results: 2 | ||
| advanced_search: true | ||
|
|
||
| knowledge_search: | ||
| _type: knowledge_retrieval | ||
| backend: llamaindex | ||
| collection_name: ${COLLECTION_NAME:-test_collection} | ||
| generate_summary: true | ||
| summary_model: summary_llm | ||
| summary_db: ${AIQ_SUMMARY_DB:-sqlite+aiosqlite:///./summaries.db} | ||
| top_k: 5 | ||
| chroma_dir: ${AIQ_CHROMA_DIR:-/tmp/chroma_data} | ||
|
|
||
| intent_classifier: | ||
| _type: intent_classifier | ||
| llm: nemotron_llm_intent | ||
| verbose: true | ||
|
|
||
| clarifier_agent: | ||
| _type: clarifier_agent | ||
| llm: nemotron_super_llm | ||
| planner_llm: nemotron_super_llm | ||
| max_turns: 3 | ||
| enable_plan_approval: true | ||
| log_response_max_chars: 2000 | ||
| verbose: true | ||
|
|
||
| shallow_research_agent: | ||
| _type: shallow_research_agent | ||
| llm: nemotron_super_llm | ||
| exclude_tools: | ||
| - advanced_web_search_tool | ||
| verbose: true | ||
| max_llm_turns: 10 | ||
| max_tool_iterations: 5 | ||
|
|
||
| # OpenShell configuration: skills + sandbox | ||
| deep_research_skills: | ||
| _type: deep_research_skills | ||
| agents: | ||
| researcher-agent: [research] | ||
| writer-agent: [synthesis, research] | ||
| require_sandbox: | ||
| - research | ||
|
|
||
| deep_research_sandbox: | ||
| _type: deep_research_sandbox | ||
| provider: openshell | ||
| sandbox_name: ${AIQ_OPENSHELL_SANDBOX_NAME:-aiq-openshell-demo} | ||
| policy: ${AIQ_OPENSHELL_POLICY_FILE:-configs/openshell/generated/aiq-openshell-policy.yaml} | ||
| workdir: /sandbox | ||
| network: blocked | ||
| timeout: 1200 | ||
| idle_timeout: 1800 | ||
| delete_on_exit: false | ||
| artifact_capture: | ||
| enabled: true | ||
| max_file_bytes: 50000000 | ||
| allow_extensions: [.png, .jpg, .jpeg, .webp, .csv, .json, .md, .ipynb, .pdf] | ||
|
|
||
| deep_research_agent: | ||
| _type: deep_research_agent | ||
| enable_citation_verification: true | ||
| orchestrator_llm: gpt_oss_llm | ||
| source_router_llm: nemotron_super_llm | ||
| researcher_llm: nemotron_super_llm | ||
| planner_llm: gpt_oss_llm | ||
| writer_llm: gpt_oss_llm | ||
| exclude_tools: | ||
| - web_search_tool | ||
| verbose: true | ||
| skills: deep_research_skills | ||
| sandbox: deep_research_sandbox | ||
|
|
||
| workflow: | ||
| _type: chat_deepresearcher_agent | ||
| verbose: true | ||
| enable_escalation: true | ||
| enable_clarifier: true | ||
| use_async_deep_research: true | ||
| checkpoint_db: ${AIQ_CHECKPOINT_DB:-./checkpoints.db} |
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,95 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
| # | ||
| # Generated by scripts/setup_openshell.sh. | ||
|
|
||
| version: 1 | ||
|
|
||
| filesystem_policy: | ||
| include_workdir: true | ||
| read_only: | ||
| - /usr | ||
| - /lib | ||
| - /etc | ||
| - /app | ||
| - /var/log | ||
| - /proc/self | ||
| - /dev/urandom | ||
| read_write: | ||
| - /sandbox | ||
| - /workspace | ||
| - /tmp | ||
| - /dev/null | ||
|
|
||
| # best_effort lets the sandbox start on hosts without Landlock (e.g. Docker Desktop on | ||
| # macOS), but there filesystem confinement is silently dropped. Acceptable only for the | ||
| # local single-operator demo; production must use `hard_requirement` (fail closed). | ||
| landlock: | ||
| compatibility: best_effort | ||
|
|
||
| process: | ||
| run_as_user: sandbox | ||
| run_as_group: sandbox | ||
|
|
||
| network_policies: | ||
| github: | ||
| name: github-readonly | ||
| endpoints: | ||
| - host: api.github.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| access: read-only | ||
| - host: github.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| access: read-only | ||
| binaries: | ||
| - { path: /usr/bin/curl } | ||
| - { path: /usr/local/bin/python3 } | ||
| - { path: /usr/local/bin/python } | ||
| - { path: /usr/local/bin/pip } | ||
| - { path: /usr/local/bin/pip3 } | ||
| nvidia: | ||
| name: nvidia-api-readonly | ||
| endpoints: | ||
| - host: integrate.api.nvidia.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| access: read-only | ||
| binaries: | ||
| - { path: /usr/bin/curl } | ||
| - { path: /usr/local/bin/python3 } | ||
| - { path: /usr/local/bin/python } | ||
| - { path: /usr/local/bin/pip } | ||
| - { path: /usr/local/bin/pip3 } | ||
| tavily: | ||
| name: tavily-api-readonly | ||
| endpoints: | ||
| - host: api.tavily.com | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| access: read-only | ||
| binaries: | ||
| - { path: /usr/bin/curl } | ||
| - { path: /usr/local/bin/python3 } | ||
| - { path: /usr/local/bin/python } | ||
| - { path: /usr/local/bin/pip } | ||
| - { path: /usr/local/bin/pip3 } | ||
| serper: | ||
| name: serper-api-readonly | ||
| endpoints: | ||
| - host: google.serper.dev | ||
| port: 443 | ||
| protocol: rest | ||
| enforcement: enforce | ||
| access: read-only | ||
| binaries: | ||
| - { path: /usr/bin/curl } | ||
| - { path: /usr/local/bin/python3 } | ||
| - { path: /usr/local/bin/python } | ||
| - { path: /usr/local/bin/pip } | ||
| - { path: /usr/local/bin/pip3 } | ||
|
cdgamarose-nv marked this conversation as resolved.
|
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,33 @@ | ||
| # SPDX-FileCopyrightText: Copyright (c) 2025-2026, NVIDIA CORPORATION & AFFILIATES. All rights reserved. | ||
| # SPDX-License-Identifier: Apache-2.0 | ||
|
|
||
| FROM python:3.13-slim | ||
|
|
||
| ENV DEBIAN_FRONTEND=noninteractive | ||
|
|
||
| # Optional OpenShell sandbox log verbosity. Defaults to `warn` (OpenShell's stock | ||
| # sandbox level, so default behavior is unchanged). Rebuild with | ||
| # `--build-arg OPENSHELL_SANDBOX_LOG_LEVEL=debug` (or `setup_openshell.sh | ||
| # --sandbox-log-level debug`) to surface process/relay detail (`OCSF PROC:` etc.) | ||
| # in the container logs (`/var/log/openshell.*.log`, `openshell logs <name>`). | ||
| ARG OPENSHELL_SANDBOX_LOG_LEVEL=warn | ||
| ENV RUST_LOG=${OPENSHELL_SANDBOX_LOG_LEVEL} | ||
|
|
||
| RUN apt-get update \ | ||
| && apt-get install -y --no-install-recommends \ | ||
| bash \ | ||
| ca-certificates \ | ||
| curl \ | ||
| iproute2 \ | ||
| iptables \ | ||
| procps \ | ||
| && python -m pip install --no-cache-dir numpy pandas matplotlib pillow tabulate requests \ | ||
| && rm -rf /var/lib/apt/lists/* \ | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
| && groupadd -r sandbox \ | ||
| && useradd -r -g sandbox -d /sandbox -s /bin/bash sandbox \ | ||
| && mkdir -p /sandbox /workspace /tmp \ | ||
| && chown -R sandbox:sandbox /sandbox /workspace | ||
|
|
||
| WORKDIR /workspace | ||
| USER sandbox | ||
| ENTRYPOINT ["/bin/bash"] | ||
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
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.