Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .secrets.baseline

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ release; the candidate will be stabilized before the final `v2.2.0` release.

**Sandboxes, artifacts, and policy**

- DeepAgents execution uses a provider-neutral sandbox contract: Modal is fresh per job, while the experimental OpenShell profile uses one shared, pre-provisioned sandbox and is not a multi-tenant isolation boundary
- DeepAgents execution uses a provider-neutral, job-scoped sandbox contract: Modal and OpenShell create one physical sandbox per deep-research job; OpenShell additionally applies and attests the configured policy before execution
- Opt-in durable artifact capture checkpoints manifest-declared files after successful sandbox `execute` calls, performs one final manifest-plus-directory scan on success/failure, and preserves earlier checkpoints without delaying cancellation when the provider is busy
- Captured files store metadata in SQL and bytes in SQL or S3-compatible storage, emit metadata-only `artifact.update` events for live and replayed Files-tab access, and remain available through job-scoped list/content endpoints that enforce ownership when `REQUIRE_AUTH=true`
- Opt-in NeMo Guardrails middleware covers selected workflow and agent input/output boundaries; defining middleware does not activate every boundary
Expand Down
16 changes: 9 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ The NVIDIA AI-Q Blueprint is an enterprise-grade research agent built on the [NV
- **Report follow-up** — Ask questions about a completed report, create a child-job cosmetic rewrite, or run delta research with the parent report as context.
- **Workflow configuration** — YAML configs define agents, tools, LLMs, and routing behavior so you can tune workflows without code changes.
- **Modular workflows** — All agents (orchestration node, shallow researcher, deep researcher, clarifier) are composable; each can run standalone or as part of the full pipeline.
- **Skills, sandbox execution, and durable outputs** — Built-in research/synthesis skills run code through a provider-neutral sandbox contract. Modal is fresh per job; the experimental OpenShell profile uses one shared, pre-provisioned sandbox and is not a multi-tenant isolation boundary. Opt-in rich-file capture checkpoints manifest-declared files after successful sandbox commands, finalizes on success/failure, stores bytes in SQL or S3-compatible storage, and delivers metadata to the Files tab live and on replay.
- **Skills, sandbox execution, and durable outputs** — Built-in research/synthesis skills are exposed as host-side, read-only definitions. Skills that invoke code use a provider-neutral sandbox contract; Modal and OpenShell create one physical sandbox per deep-research job. Opt-in rich-file capture checkpoints manifest-declared files after successful sandbox commands, finalizes on success/failure, stores bytes in SQL or S3-compatible storage, and delivers metadata to the Files tab live and on replay.
- **Portable Agent Skills** — `aiq-deploy` selects, starts, and validates an AI-Q deployment; `aiq-research` calls routed chat and async research from compatible coding harnesses.
- **Data source registry** — UI toggles and request payloads can select web, paper, enterprise, collaboration, and knowledge-layer sources per message.
- **Expanded sources** — Paper search supports Serper, SerpAPI, and SearchAPI; You.com adds web, contents, general-research, and finance-research tools; Nimble adds configurable web search; focused profiles demonstrate DuckDuckGo news, Polymarket, OpenSearch, and Azure AI Search knowledge retrieval.
Expand Down Expand Up @@ -137,10 +137,10 @@ This project is for:


**Optional requirements:**
- Tavily API key (for web search functionality)
- A web-search API key for the configured provider: Tavily, Exa, Nimble, or You.com
- A paper search API key for one of the supported providers: Serper (`SERPER_API_KEY`), SerpAPI (`SERPAPI_API_KEY`), or SearchAPI (`SEARCHAPI_API_KEY`)

> **Note:** Configure at least one data source (Tavily web search, Serper search tool, or knowledge layer) to enable research functionality.
> **Note:** Configure at least one data source (web search, paper search, or knowledge layer) to enable research functionality.
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved

If these optional API keys are not provided, the agent continues to operate without the corresponding search capabilities. Refer to [Obtain API Keys](#obtain-api-keys) for details.

Expand Down Expand Up @@ -212,6 +212,7 @@ uv pip install -e ./frontends/benchmarks/freshqa

# Install data sources (pick what you need)
uv pip install -e ./sources/tavily_web_search
uv pip install -e ./sources/exa_web_search
uv pip install -e ./sources/google_scholar_paper_search
uv pip install -e ./sources/nimble_web_search
uv pip install -e ./sources/you_com
Expand Down Expand Up @@ -285,7 +286,7 @@ The `configs/` directory holds YAML workflow configs that define agents, tools,
| `config_web_default_guardrails.yml` | GPT-OSS-120B; Nemotron 3 Super; Nemotron Mini summary | LlamaIndex profile with workflow Guardrails attached and async deep-agent Guardrails selected; shallow middleware is defined but not attached. |
| `config_web_frag_mcp_auth.yml` | Nemotron 3 Super | Foundational RAG plus an opt-in protected per-user OAuth MCP source example. Requires a real MCP endpoint and shared token store. |
| `config_domain_routing_and_skills.yml` | Nemotron 3 Super; Nemotron Mini summary | Direct deep-research profile with domain routing, DuckDuckGo news, Polymarket, enabled Serper paper search, LlamaIndex, built-in skills, and a fresh per-job Modal sandbox. |
| `config_openshell.yml` | GPT-OSS-120B; Nemotron 3 Super; Nemotron Mini summary | Experimental web/API skills profile with artifact capture over one shared, pre-provisioned OpenShell sandbox; trusted single-operator use only. |
| `config_openshell.yml` | GPT-OSS-120B; Nemotron 3 Super; Nemotron Mini summary | Experimental web/API skills profile with artifact capture, fail-closed policy attestation, and one OpenShell sandbox per deep-research job. |
| `config_mcp.yml` | Nemotron 3 Super 120B | Standalone MCP server. Public NIM + Tavily research with PostgreSQL-backed stateless submit/poll/report. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. |

## Ways to Run the Agents
Expand Down Expand Up @@ -461,13 +462,14 @@ indicate availability in a published release.
- [x] **[NeMo Guardrails](docs/source/customization/guardrails.md) Integration:** Opt-in middleware for selected workflow, shallow-researcher, and deep-researcher boundaries.
- [ ] **[NVIDIA Dynamo](https://github.com/ai-dynamo/dynamo) Integration:** Reduce latency via priority scheduling at scale.
- [x] **Per-user MCP OAuth:** Connect each signed-in user to protected MCP data sources through the UI.
- [x] **Skills & Sandboxing:** Support built-in deep-research skills through a provider-neutral contract. Modal is fresh per job; the experimental OpenShell profile is shared and not a multi-tenant isolation boundary.
- [x] **Skills & Sandboxing:** Support host-side, role-assigned deep-research skills and provider-neutral execution. Modal and OpenShell create one physical sandbox per deep-research job.
- [x] **Report Follow-up and Rewriting:** Answer against a completed report, submit cosmetic child rewrites, and run delta research with parent-report context.
- [x] **Durable Sandbox Artifacts:** Opt-in manifest checkpoints after successful sandbox commands, terminal harvesting on success/failure, SQL or S3-compatible byte storage, and live/replayed Files-tab access.
- [ ] **Custom Skill Management:** Add UI and lifecycle controls for user-provided skill bundles.
- [ ] **Dynamic Model Routing:** Allow sub-agents to automatically select the optimal model per task.
- [ ] **Resource Management:** Implement configurable token caps and tool-call budgets.
- [ ] **Expanded Web Search:** Additional integration examples including Perplexity and You.com.
- [x] **Expanded Web Search:** Tavily, Exa, You.com, and Nimble integrations with configurable source selection.
- [ ] **Additional Search Providers:** Add integration examples including Perplexity.
- [ ] **Multimedia Output:** Embed audio, video, and images directly into reports.
- [ ] **Voice-to-Text Input:** Integrate [NVIDIA Riva](https://developer.nvidia.com/riva) for hands-free accessibility.

Expand All @@ -478,7 +480,7 @@ indicate availability in a published release.
- AI-Q includes opt-in [NeMo Guardrails middleware](docs/source/customization/guardrails.md) for selected workflow and agent boundaries. Guardrails are not enabled universally; operators must attach and test the policies required for their deployment.
- Optional [async job content encryption](docs/source/deployment/content-encryption.md) protects final job output and selected artifact-event content only. It is off by default and is not full database-level job-content encryption.
- The AI-Q Blueprint doesn't require any privileged access to the system.
- Deep research skills can invoke sandboxed code execution for analysis workflows. Keep sandbox credentials, quotas, lifecycle cleanup, and network policy aligned with your deployment's trust boundaries; do not use the shared OpenShell example as isolation between mutually untrusted jobs.
- Deep research skills can invoke sandboxed code execution for analysis workflows. Keep sandbox credentials, quotas, lifecycle cleanup, attestation, and network policy aligned with your deployment's trust boundaries. Shared OpenShell attachment is an explicit debug-only mode and is not job-isolated.
- End users are responsible for ensuring the availability of their deployment.
- End users are responsible for building, and patching, the container images to keep them up to date.
- The end users are responsible for ensuring that OSS packages used by the developer blueprint are current.
Expand Down
Binary file modified docs/assets/AIQ-arch-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/source/_static/AIQ-arch-light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions docs/source/architecture/agents/deep-researcher.md
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,26 @@ of one reusable, structured-output runnable behind the orchestrator-only
`run_research_batch` tool. They do not appear as `task()` subagents and do
not manage top-level workflow todos.

## Shared State, Skills, and Execution Boundary

The shared-state and skills boxes in the architecture diagram represent
runtime dependencies, not additional agents:

| Boundary | Current implementation |
| -------- | ---------------------- |
| Shared research state | The host-side `StateBackend` mounted at `/shared/` stores the source-routing plan, research plan, structured notes, and `/shared/output.md`. DeepAgents graph state separately carries progress todos and file metadata. |
| Skill definitions | Built-in skill collections are mounted from the host at `/skills/`. Filesystem permissions expose only the collections assigned to a role and deny writes to the skill tree. |
| Sandbox workdir | When a sandbox is configured, the default filesystem route and `execute` tool use one provider sandbox per deep-research job. Agents within that job share the provider runtime; separate jobs receive separate sandboxes. |
| Inference and source tools | LLM calls, source-tool calls, credentials, orchestration state, and `/shared/` remain in the AI-Q process. Only generated code and job-workspace files cross the sandbox boundary. |

The shipped `config_domain_routing_and_skills.yml` profile assigns the
`research` collection to researcher workers and the `synthesis` collection to
the writer. The research collection currently includes chart generation,
table analysis, forecast analysis, and lightweight calculations. The synthesis
collection includes long-form and prediction report writers. A skill provides
instructions; only skills that invoke `execute` require the optional sandbox.
Modal and OpenShell implement the same provider-neutral job-scoped contract.

## Data Source Boundary

`DeepResearchAgentState.data_sources` is a hard per-request boundary for
Expand Down
22 changes: 22 additions & 0 deletions docs/source/architecture/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,24 @@ lookup (shallow), or initiate a comprehensive multi-agent investigation (deep).
:align: center
```

### Reading the Diagram

- The deep-research path is dynamic rather than a fixed linear chain. The
optional source router informs planning, and the orchestrator dispatches
independent research queries to reusable researcher workers concurrently
before delegating final synthesis to the writer.
- **Shared Research State** represents the DeepAgents state and virtual
`/shared/` filesystem used for the plan, research notes, progress, and final
output. It is distinct from external data sources and the durable generated
artifact store.
- **Skill Definitions** are host-side, read-only instructions assigned to
specific roles. Research skills are exposed to researcher workers and
synthesis skills to the writer by the shipped skills profile.
- **Job-Scoped Sandbox** is optional. When configured, agent-generated code
runs through one provider sandbox per deep-research job; Modal and OpenShell
are alternative providers. Inference, source-tool calls, credentials, and
shared research state remain in the AI-Q process.

## Core Components

| Component | Role | Location |
Expand All @@ -31,6 +49,10 @@ lookup (shallow), or initiate a comprehensive multi-agent investigation (deep).
| [Shallow Researcher](agents/shallow-researcher.md) | Fast, bounded tool-augmented research | `agents/shallow_researcher/agent.py` |
| [Deep Researcher](agents/deep-researcher.md) | Orchestrates optional source routing, structured planning, concurrent research workers, and writer-first synthesis | `agents/deep_researcher/agent.py` |
| Chat Researcher Orchestrator | [LangGraph](https://docs.langchain.com/oss/python/langgraph/overview) state machine coordinating all agents | `agents/chat_researcher/agent.py` |
| [Data Source Registry](../customization/tools-and-sources.md) | Applies per-request source selection and exposes the active source-tool set to research agents | `common/data_source_registry.py` |
| [Knowledge Layer](../customization/knowledge-layer.md) | Pluggable document ingestion and retrieval through LlamaIndex, Foundational RAG, Azure AI Search, or OpenSearch | `sources/knowledge_layer/` |
| Shared Research State | Host-side DeepAgents state and `/shared/` virtual filesystem for plans, research notes, progress, and final output | `agents/deep_researcher/deepagents_runtime.py` |
| [Skills and Execution Runtime](agents/sandbox.md) | Exposes role-assigned, read-only skill definitions and optionally routes generated code to a job-scoped sandbox | `agents/deep_researcher/skills/`, `agents/deep_researcher/sandbox/` |

## Orchestrator State Machine

Expand Down
2 changes: 1 addition & 1 deletion docs/source/customization/configuration-reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ only the additional sections you need.
| `configs/config_web_default_guardrails.yml` | Web API | LlamaIndex plus workflow Guardrails attachment. Shallow/deep middleware types are defined as capability examples; refer to [Guardrails](./guardrails.md) for the active attachment semantics. |
| `configs/config_web_frag_mcp_auth.yml` | Web API | Foundational RAG plus a protected per-user OAuth MCP source example. Requires a real protected MCP endpoint and shared token-store configuration; it is not a zero-config default. |
| `configs/config_domain_routing_and_skills.yml` | Direct deep-research workflow | Automatic domain routing, Tavily, DuckDuckGo news, Polymarket, LlamaIndex, enabled Serper paper search, built-in skills, and a Modal sandbox. Requires the corresponding service credentials and Modal setup. |
| `configs/config_openshell.yml` | Web API, experimental | Skills and artifact capture over one pre-provisioned named OpenShell sandbox. Intended for trusted single-operator use; per-job directories are not multi-tenant isolation. |
| `configs/config_openshell.yml` | Web API, experimental | Skills and artifact capture over one policy-bound OpenShell sandbox per deep-research job, with fail-closed policy attestation and terminal deletion. |
| `configs/config_mcp.yml` | Standalone MCP server | Public NIM and Tavily research over stateless submit, poll, and final-report tools with PostgreSQL-backed job state. Requires `NVIDIA_API_KEY`, `TAVILY_API_KEY`, and `AIQ_CHECKPOINT_DB`. |

## Related
Expand Down
Loading
Loading