RAG智能代理 是 AI Skill Hub 本期精选Agent工作流之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。
RAG智能代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
RAG智能代理 是一套完整的 AI Agent 自动化工作流方案。通过可视化的节点编排,将复杂的多步骤任务拆解为清晰的自动化流程,实现全程无人值守的智能处理。支持与数百种外部服务和 API 无缝集成,适合构建数据处理管线、业务自动化和 AI 辅助决策系统。
# 方式一:pip 安装(推荐)
pip install rag-agent
# 方式二:虚拟环境安装(推荐生产环境)
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install rag-agent
# 方式三:从源码安装(获取最新功能)
git clone https://github.com/khteh/rag-agent
cd rag-agent
pip install -e .
# 验证安装
python -c "import rag_agent; print('安装成功')"
# 命令行使用
rag-agent --help
# 基本用法
rag-agent input_file -o output_file
# Python 代码中调用
import rag_agent
# 示例
result = rag_agent.process("input")
print(result)
# rag-agent 配置文件示例(config.yml) app: name: "rag-agent" debug: false log_level: "INFO" # 运行时指定配置文件 rag-agent --config config.yml # 或通过环境变量配置 export RAG_AGENT_API_KEY="your-key" export RAG_AGENT_OUTPUT_DIR="./output"
Python LLM-RAG deep agent using LangChain, LangGraph and LangSmith built on Quart web microframework and served using Hypercorn ASGI and WSGI web server.
MLflow is an open‑source platform that standardizes and automates the machine‑learning lifecycle—from experiment tracking to reproducible packaging, model versioning, and deployment. It is vendor‑neutral and integrates with most ML libraries, enabling teams to reliably develop, evaluate, and ship models at scale【1】.
Patients have commented on the efficiency of care at several hospitals. The following excerpts illustrate specific observations:
These insights are drawn from patient reviews retrieved via the HealthcareReview tool.
[1] Replace or properly secure exposed wiring to meet electrical safety standards. [2] Install additional fire extinguishers in compliance with fire code requirements. [3] Reinforce or replace temporary support beams to ensure structural stability.
import mlflow import mlflow.sklearn from sklearn.ensemble import RandomForestRegressor from sklearn.metrics import mean_squared_error from sklearn.datasets import load_diabetes from sklearn.model_selection import train_test_split
mlflow.set_experiment("Diabetes-Regression") with mlflow.start_run(): X, y = load_diabetes(return_X_y=True) X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42) model = RandomForestRegressor(n_estimators=100, random_state=42) model.fit(X_train, y_train) mlflow.log_param("n_estimators", 100) preds = model.predict(X_test) mse = mean_squared_error(y_test, preds) mlflow.log_metric("mse", mse) mlflow.sklearn.log_model(model, artifact_path="model") model_uri = f"runs:/{mlflow.active_run().info.run_id}/model" mlflow.register_model(model_uri, "DiabetesRF")
artifact_path="model" and can be registered for lifecycle management【2】.
$ uv run coverage run -m src.EmailRAG.fuzzer -atheris_runs=100
$ uv run coverage run -m src.rag_agent.fuzzer -atheris_runs=100
$ uv run python -m coverage html
$ (cd htmlcov && uv run python -m http.server 8000)
MATCH (v:Visit) WHERE v.id = 56 RETURN v;
MATCH (p:Patient)-[h:HAS]->(v:Visit) where v.id=56 return v,h,p
MATCH (p:Patient)-[h:HAS]->(v:Visit)<-[t:TREATS]-(ph:Physician) where v.id=56 return v,h,p,t,ph
MATCH (v:Visit)-[r]-(n) where v.id=56 return v,r,n
MATCH (p:Payer)<-[c:COVERED_BY]-(v:Visit)-[:AT]->(h:Hospital)
WHERE p.name = "Aetna"
AND h.state_name = "TX"
RETURN COUNT(*) as num_visits,
SUM(c.billing_amount) as total_billing_amount;
Add a .env with the following environment variables:
ENVIRONMENT=development
DB_USERNAME=
DB_PASSWORD=
NEO4J_AUTH=username/password
LANGSMITH_TRACING="true"
LANGSMITH_API_KEY=
LANGSMITH_ENDPOINT="https://api.smith.langchain.com"
LANGSMITH_PROJECT=
GOOGLE_CLOUD_PROJECT=
GOOGLE_CLOUD_LOCATION="asia-southeast1"
GOOGLE_API_KEY=
GEMINI_API_KEY=
OLLAMA_API_KEY=
USER_AGENT="USER_AGENT"
tkinter:$ sudo apt install -y python3.13-tk
$ c3 -v https://localhost:4433/invoke -m 300 -X POST -d '{"message": "What is task decomposition?"}'
$ c3 -v https://localhost:4433/healthcare/invoke -m 300 -X POST -d '{"message": "Which hospital has the shortest wait time?"}'
| Component | What It Does | Key Features |
|---|---|---|
| **MLflow Tracking** | API + UI for logging runs (parameters, metrics, artifacts) and visualizing results. | Supports Python, R, Java, REST; autologging for many libraries【5】. |
| **MLflow Projects** | Standard way to package ML code with a descriptor (MLproject) and environment specifications. | Enables reproducible execution locally, on a cluster, or in the cloud. |
| **MLflow Models** | A generic “model packaging” format that bundles a model with a flavor‑specific loader (e.g., sklearn, tensorflow). | Simplifies downstream serving, batch scoring, or conversion to other formats. |
| **MLflow Model Registry** | Centralized model store that tracks versions, stages (Staging, Production, Archived), and lineage. | UI & API for registering, transitioning, annotating, and accessing models【2】. |
MLproject file that lists entry points and required environments.mlflow.<flavor>.log_model() to store the model artifact.
output/user_questions.md:Which hospital has the shortest wait time?
output/final_answer.md:```
output/user_request_{timestamp}.md:``` What is task decomposition?
---
output/user_questions.md:
Which physician has treated the most patients covered by Cigna?
output/final_answer.md:```
The physician who has treated the most patients covered by Cigna is Kayla Lawson, who has seen 10 patients.
output/user_questions.md:
Query the graph database to show me the reviews written by patient 7674
output/final_answer.md:```
本项目是一个基于 Python 开发的 LLM-RAG Deep Agent,深度集成了 LangChain、LangGraph 和 LangSmith 框架。系统采用 Quart Web 微框架构建,并使用 Hypercorn 作为 ASGI/WSGI Web 服务器进行部署,旨在通过先进的 RAG 技术实现复杂的智能体任务处理。
本项目具备强大的医疗数据分析与洞察能力。通过对医院效率及患者评论的深度解析,能够提取关键信息(如患者对医疗团队效率的评价),并实现对特定医疗场景下信息的精准检索与总结,为医疗管理提供数据支持。
在使用本项目前,请确保系统已满足必要的合规性与安全要求。主要包括:确保电气安全标准下的布线安全、根据消防法规安装足够的灭火器,以及通过加固或更换临时支撑梁来确保建筑结构的稳定性,以保障运行环境的安全。
本项目支持使用 Python 和 scikit-learn 进行实验管理。开发者可以通过 mlflow 库集成机器学习工作流,例如使用 mlflow.sklearn 进行模型训练与评估,并通过 mlflow.start_run() 记录实验过程中的参数与指标,实现模型生命周期的标准化管理。
项目运行需要配置环境变量。请在项目根目录下创建 `.env` 文件,并根据需要设置 ENVIRONMENT、DB_USERNAME、NEO4J_AUTH 等参数。特别注意,若需启用 LangSmith 追踪功能,请务必配置 LANGSMITH_TRACING="true" 以及相关的 API_KEY 和 ENDPOINT。
本项目提供了多个控制器接口。用户可以通过 c3 工具向 Home controller 发送 POST 请求进行任务分解等通用问答;同时,针对医疗场景提供了专门的 Hospital controller 接口,支持查询如“哪家医院等待时间最短”等特定领域的复杂问题。
系统的基础设施运行在 k8s 集群上,包含 PostgreSQL(用于 Checkpoints 和 Vector DB)、Neo4J(用于 Graph Query)以及 Ollama(作为 LLM 模型服务器)。核心组件利用 MLflow Tracking 进行实验日志记录与可视化,并通过 MLflow Projects 实现标准化的机器学习工作流管理。
本项目是一个基于 Question & Answer RAG Deep Agent 的智能系统。它能够结合 Vector Database(向量数据库)与 Graph Database(图数据库)的能力,通过 ReAct Agent 模式,从模拟的 API 调用中提取信息并生成最终答案。
高质量的开源AI工作流项目
该工具未明确声明开源协议,商业使用前请联系原作者确认授权范围,避免侵权风险。
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
经综合评估,RAG智能代理 在Agent工作流赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。
| 原始名称 | rag-agent |
| 原始描述 | 开源AI工作流:Python LLM-RAG deep agent using LangChain, LangGraph and LangSmith built on Quar。⭐8 · Python |
| Topics | langchainlanggraphpythonasgi-serverhttp3-serverhypercorn |
| GitHub | https://github.com/khteh/rag-agent |
| 语言 | Python |
收录时间:2026-06-01 · 更新时间:2026-06-01 · License:未公布 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端