Complexity: 🟢 Beginner
A minimal example demonstrating a simple LangSmith-Documentation agent. This agent leverages the NeMo Agent Toolkit plugin system and Builder to integrate pre-built and custom tools into the workflow to answer questions about LangSmith. Key elements are summarized below:
- Webpage Query Tool: Demonstrates a
webpage_querytool that retrieves and processes documentation from LangSmith's website (https://docs.smith.langchain.com) using web scraping and vector search. - ReAct Agent Integration: Uses a
react_agentthat reasons about user queries and determines when to retrieve relevant documentation from the web. - Document Retrieval and Embedding: Shows how to automatically generate embeddings from web content and perform semantic search to answer questions about LangSmith.
- End-to-End Web RAG: Complete example of Retrieval-Augmented Generation (RAG) using web-scraped content as the knowledge source.
- YAML-based Configuration: Fully configurable workflow demonstrating integration of web scraping, embeddings, and agent reasoning through simple configuration.
If you have not already done so, follow the instructions in the Install Guide to create the development environment and install NeMo Agent Toolkit.
From the root directory of the NeMo Agent Toolkit library, run the following commands:
uv pip install -e examples/getting_started/simple_web_queryIf you have not already done so, follow the Obtaining API Keys instructions to obtain an NVIDIA API key. You need to set your NVIDIA API key as an environment variable to access NVIDIA AI services:
export NVIDIA_API_KEY=<YOUR_API_KEY>Run the following command from the root of the NeMo Agent Toolkit repo to execute this workflow with the specified input:
nat run --config_file examples/getting_started/simple_web_query/configs/config.yml --input "What is LangSmith?"Expected Workflow Output
<snipped for brevity>
Workflow Result:
['LangSmith is a platform for building production-grade LLM (Large Language Model) applications, allowing users to monitor and evaluate their applications, and providing features such as observability, evaluation, and prompt engineering. It is framework-agnostic and can be used with or without LangChain's open source frameworks.']