Agent / Automation
RAG Agent — drop in docs, get answers
Inject docs, agent auto-uses rag_search + answers.
Python
python
from nexevo_ai import Nexevo
client = Nexevo()
# RAG agent — 注入文档,agent 自动用 rag_search tool 召回 + 答题
docs = [
"VPN 服务器列表请联系 IT 支持(internal-it@company.com)。",
"重置 VPN 密码:登录 portal.company.com → 个人设置 → VPN → 重置密码。",
"公司 WiFi 配置在员工手册第 3 章。",
# ... 更多文档
]
job = client.agents.run(
task="基于这些资料答:如何重置员工 VPN?",
rag_documents=docs,
tools=["rag_search"], # 限定只用 rag_search,不让 agent 调其它 tool
model="nexevo/balanced",
)
print(job["result"])
# Agent 自动:
# 1. 看到任务 + 知道 docs 已 preload → tool_call rag_search(query="如何重置 VPN")
# 2. tool_result 返 top-5 最相关
# 3. 综合答 → final_answer