NVIDIA NeMo 代理工具包集成
将NVIDIA NeMo代理工具包连接到ThorData MCP服务器(60+工具),为NeMo代理提供网页搜索、抓取和结构化数据。
概述
NVIDIA NeMo代理工具包是一个开源框架,用于构建、分析和优化AI代理和工作流程。 它提供框架无关的架构、基于YAML的配置、内置的MCP支持以及跨多代理系统的统一监控。
托管 MCP
1
获取你的API令牌
前往 SERP API-API Token 创建API Token
复制您的 API Token(格式如下:
sk_7qBRe***************************:)
2
安装NeMo代理工具包
pip install nvidia-nat[mcp]3
创建工作流程配置
创建一个名为:thordata-mcp-config.yml
function_groups:
thordata_web:
_type: mcp_client
server:
transport: streamable-http
url: "https://mcp.thordata.com/YOUR_thordata_API_TOKEN/mcp"
tool_call_timeout: 120 # Increase timeout for web requests
auth_flow_timeout: 300
reconnect_enabled: true
reconnect_max_attempts: 3
llms:
nim_llm:
_type: nim
model_name: "meta/llama-3.1-8b-instruct"
temperature: 0.0
api_key: "${env:NVIDIA_API_KEY}"
workflow:
_type: react_agent
tool_names:
- thordata_web
llm_name: nim_llm
max_iterations: 10
verbose: true4
设定环境变量
# Set your NVIDIA API key (for NIM or NGC)
export NVIDIA_API_KEY="your-nvidia-api-key"5
验证MCP连接
测试与ThorData的MCP服务器连接:
nat mcp client ping --url "https://mcp.thordata.com/YOUR_thordata_API_TOKEN/mcp"预期输出:
Successfully connected to MCP server
Server version: 1.0
Available tools: 156
可用工具列表
检查ThorData MCP提供的工具:
nat mcp client tool list --url "https://mcp.thordata.com/YOUR_TOKEN/mcp"7
运行你的第一个代理
通过查询执行工作流程:
nat run --config_file thordata-mcp-config.yml \
--input "Search for the latest NVIDIA GPU releases and extract their specifications"该代理将使用ThorData的网页抓取工具进行搜索和提取信息。
Last updated
Was this helpful?