Skip to content

Latest commit

 

History

History
207 lines (156 loc) · 19.8 KB

File metadata and controls

207 lines (156 loc) · 19.8 KB

NeMo Agent Toolkit Examples

Each NVIDIA NeMo Agent Toolkit example demonstrates a particular feature or use case of the NeMo Agent Toolkit library. Most of these contain a custom workflow along with a set of custom tools (functions in NeMo Agent Toolkit). These examples can be used as a starting off point for creating your own custom workflows and tools. Each example contains a README.md file that explains the use case along with instructions on how to run the example.

Examples Repository

In addition the examples in this repository, there are examples in the NeMo-Agent-Toolkit-Examples repository.

The difference between the examples in this repository and the NeMo-Agent-Toolkit-Examples repository is that the examples in this repository are maintained, tested, and updated with each release of the NeMo Agent Toolkit. These examples have high quality standards and demonstrate a capability of the NeMo Agent Toolkit.

The examples in the NeMo-Agent-Toolkit-Examples repository are community contributed and are tied to a specific version of the NeMo Agent Toolkit, and do not need to demonstrate a specific capability of the library.

Table of Contents

Installation and Setup

To run the examples, install the NeMo Agent Toolkit from source, if you haven't already done so, by following the instructions in Install From Source.

Notebooks

Building an Agentic System: Series of notebooks demonstrating how to build, connect, evaluate, profile and deploy an agentic system using the NeMo Agent Toolkit

Open in Colab

  1. Hello World - Installing NeMo Agent Toolkit and running a configuration-only workflow [🟢 Beginner]
  2. Getting Started - Getting started with the NeMo Agent Toolkit [🟢 Beginner]
  3. Bringing Your Own Agent - Bringing your own agent to the NeMo Agent Toolkit [🟢 Beginner]
  4. Adding Tools and Agents - Adding tools to your agentic workflow [🟢 Beginner]
  5. MCP Client and Servers Setup - Deploy and integrate MCP clients and servers with NeMo Agent Toolkit workflows [🟢 Beginner]
  6. Multi-Agent Orchestration - Setting up a multi-agent orchestration workflow [🟨 Intermediate]
  7. Observability, Evaluation, and Profiling - Instrumenting with observability, evaluation and profiling tools [🟨 Intermediate]
  8. Optimizing Model Selection, Parameters, and Prompts - Use the NeMo Agent Toolkit Optimizer to compare models, parameters, and prompt variations [🛑 Advanced]

Brev Launchables

Getting Started

  • scaffolding: Workflow scaffolding and project generation using automated commands and intelligent code generation [🟢 Beginner]
  • simple_web_query: Basic LangSmith documentation agent that searches the internet to answer questions about LangSmith. [🟢 Beginner]
  • simple_calculator: Mathematical agent with tools for arithmetic operations, time comparison, and complex calculations [🟢 Beginner]

NeMo Agent Toolkit Components

Agents

  • react: ReAct (Reasoning and Acting) agent implementation for step-by-step problem-solving [🟢 Beginner]
  • rewoo: ReWOO (Reasoning WithOut Observation) agent pattern for planning-based workflows [🟢 Beginner]
  • tool_calling: Tool-calling agent with direct function invocation capabilities [🟢 Beginner]
  • auto_memory_wrapper: Automatic memory wrapper agent that adds guaranteed memory capture and retrieval to any agent without requiring LLM memory tool invocation [🟨 Intermediate]
  • mixture_of_agents: Multi-agent system with ReAct agent coordinating multiple specialized Tool Calling agents [🟨 Intermediate]

Additional information can be found in the Agents README.

Advanced Agents

  • AIQ Blueprint: Blueprint documentation for the official NVIDIA AIQ Blueprint for building an AI agent designed for enterprise research use cases. [🛑 Advanced]
  • alert_triage_agent: Production-ready intelligent alert triage system using LangGraph that automates system monitoring diagnostics with tools for hardware checks, network connectivity, performance analysis, and generates structured triage reports with root cause categorization [🟨 Intermediate]
  • vulnerability_analysis_blueprint: Blueprint documentation for vulnerability analysis agents [🛑 Advanced]

Configuration

  • config_inheritance: Use YAML configuration inheritance in the NeMo Agent Toolkit to reduce duplication across similar configuration files [🟢 Beginner]

Control Flow

  • router_agent: Configurable Router Agent that analyzes incoming requests and directly routes them to the most appropriate branch (other agents, functions or tools) based on request content [🟢 Beginner]
  • sequential_executor: Linear tool execution pipeline that chains multiple functions together where each function's output becomes the input for the next function, with optional type compatibility checking and error handling [🟢 Beginner]
  • parallel_executor: Sequential workflow with a custom parallel fan-out and fan-in stage that executes independent branches concurrently and merges outputs with partial failure handling [🟢 Beginner]
  • hybrid_control_flow: Demonstrates how to compose router agent and sequential executor control flow patterns together, showing routing to sequential executors, calling router agents from sequential executors, and routing to nested router agents [🟢 Beginner]

Custom Functions

  • automated_description_generation: Intelligent system that automatically generates descriptions for vector database collections by sampling and summarizing documents [🟢 Beginner]
  • plot_charts: Multi-agent chart plotting system that routes requests to create different chart types (line, bar, etc.) from data [🟢 Beginner]

Frameworks

  • adk_demo: Minimal example using Google Agent Development Kit showcasing a simple weather time agent that can call tools (a function tool and an MCP tool) [🟢 Beginner]
  • agno_personal_finance: Personal finance planning agent built with Agno framework that researches and creates tailored financial plans [🟢 Beginner]
  • autogen_demo: Minimal example using Microsoft AutoGen showcasing a traffic estimator agent that can call tools (a function tool and an MCP tool) and orchestrate multiple AutoGen agents [🟨 Intermediate]
  • haystack_deep_research_agent: Deep research agent using Haystack framework that combines web search and Retrieval Augmented Generation (RAG) capabilities with SerperDev API and OpenSearch [🟨 Intermediate]
  • langchain_deep_research: An example that integrates any existing LangGraph agent with NeMo Agent Toolkit using the langgraph_wrapper workflow type [🟨 Intermediate]
  • multi_frameworks: Supervisor agent coordinating LangChain/LangGraph, LlamaIndex, and Haystack agents for research, RAG, and chitchat tasks [🟨 Intermediate]
  • semantic_kernel_demo: Multi-agent travel planning system using Microsoft Semantic Kernel with specialized agents for itinerary creation, budget management, and report formatting, including long-term memory for user preferences [🟢 Beginner]
  • strands_demo: A minimal example showcasing a Strands agent that answers questions about Strands documentation using a curated URL knowledge base and the native Strands http_request tool [🟨 Intermediate]
  • strands_demo - bedrock_agentcore: Deploying NVIDIA NeMo Agent Toolkit with Strands on AWS AgentCore, including OpenTelemetry instrumentation for monitoring [🛑 Advanced]

Front Ends

  • simple_auth: Simple example demonstrating authentication and authorization using OAuth 2.0 Authorization Code Flow [🟨 Intermediate]
  • simple_calculator_custom_routes: Simple calculator example with custom API routing and endpoint configuration [🟢 Beginner]
  • per_user_workflow: Demonstrates the per-user workflow pattern in NeMo Agent Toolkit. With this pattern, each user gets their own isolated workflow and function instances with separate state. [🟢 Beginner]

Memory

  • redis: Basic long-term memory example using redis [🟨 Intermediate]

Object Store

  • user_report: User report generation and storage system using object store (S3, MySQL, and/or memory) [🟨 Intermediate]

Human In The Loop (HITL)

  • por_to_jiratickets: Project requirements to Jira ticket conversion with human oversight [🟨 Intermediate]
  • simple_calculator_hitl: Human-in-the-loop version of the basic simple calculator that requests approval from the user before allowing the agent to make additional tool calls [🟢 Beginner]

UI

  • UI: Guide for integrating and using the web-based user interface of the NeMo Agent Toolkit for interactive workflow management. [🛑 Advanced]

Connecting and Orchestrating Agents

Model Context Protocol (MCP)

  • simple_calculator_mcp: Demonstrates an end-to-end MCP workflow with NVIDIA NeMo Agent Toolkit functioning as both MCP client and server. The MCP server is unprotected and intended for development and testing purposes [🟢 Beginner]
  • simple_calculator_mcp_protected: Demonstrates an end-to-end OAuth2-protected MCP workflow with NVIDIA NeMo Agent Toolkit functioning as both MCP client and server. Demonstrates the use of per-user workflows to securely access the protected MCP server [🟨 Intermediate]
  • simple_calculator_fastmcp: FastMCP frontend variant of simple_calculator_mcp that publishes an MCP server using the FastMCP server runtime. The MCP server is unprotected and intended for development and testing purposes [🟢 Beginner]
  • simple_calculator_fastmcp_protected: FastMCP frontend variant of simple_calculator_mcp_protected that publishes an MCP server using the FastMCP server. Demonstrates the use of per-user workflows to securely access the protected MCP server [🟨 Intermediate]
  • simple_auth_mcp: Demonstrates a NVIDIA NeMo Agent Toolkit workflow connecting to a third-party MCP server that requires authentication using OAuth2 flows [🟨 Intermediate]
  • service_account_auth_mcp: Demonstrates how to use the NVIDIA NeMo Agent Toolkit with third-party MCP servers that support service account authentication [🟨 Intermediate]
  • kaggle_mcp: Demonstrates how to use the Kaggle MCP server with NVIDIA NeMo Agent Toolkit to interact with Kaggle's datasets, notebooks, models, and competitions [🟨 Intermediate]

Agent2Agent Protocol (A2A)

  • currency_agent_a2a: Demonstrates a NVIDIA NeMo Agent Toolkit workflow connecting to a third-party A2A server, the LangGraph-based currency agent. The workflow acts as an A2A client to perform currency conversions and financial queries with time-based context [🟢 Beginner]
  • math_assistant_a2a: Demonstrates an end-to-end A2A workflow with NVIDIA NeMo Agent Toolkit functioning as both A2A client and server. The workflow performs mathematical calculations integrated with time queries and logical reasoning, combining remote calculator operations with local time services and conditional evaluation tools [🟨 Intermediate]
  • math_assistant_a2a_protected: Demonstrates an end-to-end OAuth2-protected A2A workflow with NVIDIA NeMo Agent Toolkit functioning as both A2A client and server. The workflow performs mathematical calculations integrated with time queries and logical reasoning, with added OAuth2 authentication for secure per-user agent-to-agent communication [🟨 Intermediate]

Observability, Evaluation, Profiling, and Finetuning

Observability

Evaluation and Profiling

  • email_phishing_analyzer: Evaluation and profiling configurations for the email phishing analyzer example [🟨 Intermediate]
  • simple_calculator_eval: Evaluation and profiling configurations based on the basic simple calculator example [🟨 Intermediate]
  • simple_web_query_eval: Evaluation and profiling configurations based on the basic simple web query example [🟨 Intermediate]

Finetuning

  • dpo_tic_tac_toe: Demonstrates how to use the NeMo Agent Toolkit Test Time Compute (TTC) pipeline to generate preference data for Direct Preference Optimization (DPO) training, and submit training jobs to NVIDIA NeMo Customizer [🛑 Advanced]
  • rl_with_openpipe_art: Demonstrates how to use the NeMo Agent Toolkit finetuning harness with OpenPipe ART (Agent Reinforcement Trainer) to improve an LLM's performance at playing Tic-Tac-Toe through reinforcement learning. [🛑 Advanced]

Platform Integrations

Dynamo Integration

  • react_benchmark_agent: Walks through the complete process of running decision-only evaluations using the react_benchmark_agent: downloading data, configuring evaluations, running experiments, and analyzing results. [🛑 Advanced]
  • react_benchmark_agent - src - react_benchmark_agent: Developer notes that map React Benchmark Agent configuration files to the underlying components, evaluators, and workflows. [🛑 Advanced]

See the Dynamo Integration README for additional information

Retrieval Augmented Generation (RAG)

  • simple_rag: Complete RAG system with Milvus vector database, document ingestion, and long-term memory using Mem0 platform [🛑 Advanced]

NeMo Agent Toolkit Safety and Security

  • retail_agent: Demonstrates the NeMo Agent Toolkit Safety and Security capabilities by assessing and improving the security posture of an example Retail Agent [🛑 Advanced]

Documentation Guide Files

Additional information can be found in the Documentation Guides README.

Locally Hosted LLMs

  • nim_config: Configuration for locally hosted NIM LLM models
  • vllm_config: Configuration for locally hosted vLLM models

Workflow Artifacts

Deploy Files

The deploy directory contains files used by some examples for running services locally. Please consult the deploy README for more information.