NirDiamant/agents-towards-production

GitHub: NirDiamant/agents-towards-production

这是一个开源教程库,帮助开发者构建从原型到企业级的生产就绪GenAI智能体。

Stars: 20232 | Forks: 2678

# 面向生产的智能体 ### _将AI智能体转化为现实世界产品的开源指南。_ **《面向生产的智能体》是您构建可从原型扩展到企业级的生产就绪GenAI智能体的首选资源。** 教程涵盖有状态工作流、向量内存、实时网络搜索API、Docker部署、FastAPI端点、安全防护栏、GPU扩展、浏览器自动化、微调、多智能体协调、可观测性、评估和UI开发。 ### ⭐ **如果您觉得此项目有价值,请点亮星标以帮助他人发现这些教程!** [![领英](https://img.shields.io/badge/LinkedIn-Connect-blue)](https://www.linkedin.com/in/nir-diamant-759323134/) [![推特](https://img.shields.io/twitter/follow/NirDiamantAI?label=Follow%20@NirDiamantAI&style=social)](https://twitter.com/NirDiamantAI) [![Discord](https://img.shields.io/badge/Discord-Join%20our%20community-7289da?style=flat-square&logo=discord&logoColor=white)](https://discord.gg/cA6Aa4uyDX) [![赞助](https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=ff69b4)](https://github.com/sponsors/NirDiamant) [![DiamantAI Collective正在招聘](https://img.shields.io/badge/%F0%9F%92%BC%20Hiring-DiamantAI%20Collective-7c3aed?style=flat-square)](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=main-readme--hiring-badge&click=top-badge-hiring&target=https%3A%2F%2Fdiamant-ai.com%2Fjobs&text=Hiring%20Badge)
## 📖 同一作者的其他作品 亚马逊生成式AI类别畅销书第一名 - 点击购买 **[《RAG简单上手》](https://europe-west1-rag-techniques-views-tracker.cloudfunctions.net/rag-techniques-tracker?notebook=agents-towards-production--readme&click=book-buy-amazon-title&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2FB0D76734SZ%3Ftag%3Ddiamantai-atp-20&text=RAG%20Made%20Simple)** — **亚马逊生成式AI类别畅销书第一名。** 介绍22种RAG技术,包含直觉、对比和图示。**Kindle Unlimited免费阅读**或**0.99美元**限时特价(即将提价)。 ### 👉 [**在亚马逊上获取本书**](https://europe-west1-rag-techniques-views-tracker.cloudfunctions.net/rag-techniques-tracker?notebook=agents-towards-production--readme&click=book-buy-amazon-cta&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2FB0D76734SZ%3Ftag%3Ddiamantai-atp-20&text=Get%20the%20book%20on%20Amazon)
DiamantAI Collective - AI engineering jobs ## 💼 申请AI工程职位 **AI优先公司正在通过DiamantAI Collective招聘。** [![查看职位并申请](https://img.shields.io/badge/%E2%9E%A1%EF%B8%8F%20%20See%20open%20jobs%20and%20apply-7c3aed?style=for-the-badge)](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=main-readme--jobs-panel&click=jobs-panel-see-all-roles&target=https%3A%2F%2Fdiamant-ai.com%2Fjobs&text=See%20open%20jobs%20and%20apply)
## 💎 教程赞助商

为本仓库贡献了分步教程的公司。
点击徽标打开教程。使用Ctrl/⌘+点击可保持本页面打开。

LangChain - AI agent framework and workflow orchestration platform for building production-ready language model applications
Agent Framework & Workflows
Visit LangChain AI agent framework website
Redis - In-memory database and vector storage for AI agent memory, caching, and real-time data processing
Memory & Vector Database
Visit Redis in-memory database and vector storage website
Contextual AI - Production-ready RAG platform for building enterprise-grade retrieval augmented generation systems
RAG & Knowledge Management
Visit Contextual AI RAG platform website
Bright Data - Web scraping and data collection platform for AI training and agent data gathering
Web Data Platform
Visit Bright Data web scraping platform website
Tavily - Real-time web search API for AI agents with intelligent content extraction and summarization
Real‑time Web Search API
Visit Tavily real-time web search API website
Arcade - Multi-user tool calling platform for secure OAuth2 authentication and human-in-the-loop safety controls
MCP Runtime
Visit Arcade multi-user tool integration platform website
JetBrains - Creator of Kotlin and the Koog AI agent framework for building intelligent applications on the JVM
Kotlin AI Agent Framework
Visit Kotlin website
Mem0 - Self-improving memory system for AI agents with hybrid vector and graph storage
Self-Improving AI Memory
Visit Mem0 AI memory platform website
RunPod - GPU cloud computing platform for training and deploying AI models and agents at scale
GPU Cloud Computing
Visit RunPod GPU cloud computing website
## 💎 普通赞助商

通过合作与资源支持本项目的公司。
点击徽标访问他们的网站。

CodeRabbit - AI-powered code review and automated pull request analysis
AI Code Review
Visit CodeRabbit AI code review platform
### 💎 成为赞助商 **联系我们:** [![网站](https://img.shields.io/badge/Website-DiamantAI.com-green?style=for-the-badge&logo=globe)](https://www.diamant-ai.com/) [![领英](https://img.shields.io/badge/LinkedIn-Connect-0077B5?style=for-the-badge&logo=linkedin)](https://www.linkedin.com/in/nir-diamant-759323134/)
## 📫 保持更新!
🚀
前沿
动态
💡
专家
洞见
🎯
前0.1%内容
[![订阅DiamantAI新闻通讯](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/02ed518ffc175124.svg)](https://diamantai.substack.com/?r=336pe4&utm_campaign=pub-share-checklist) _加入超过5万名AI爱好者,获取独特的前沿洞见和免费教程!_ **_此外,订阅者可获得我的书籍和即将推出的课程的独家提前访问权限及特别33%折扣!_** [![DiamantAI新闻通讯](https://raw.githubusercontent.com/NirDiamant/agents-towards-production/main/assets/repos_images/substack_image.png)](https://diamantai.substack.com/?r=336pe4&utm_campaign=pub-share-checklist)
## 💬 加入我们的社区 与GenAI和智能体开发的最新动态保持连接: ### r/EducationalAI [![Reddit](https://img.shields.io/badge/Reddit-Join%20r/EducationalAI-ff4500?style=for-the-badge&logo=reddit&logoColor=white)](https://www.reddit.com/r/EducationalAI/) _加入我们不断增长的社区,讨论前沿AI研究、智能体开发和生产实践洞见!_
## ✨ 简介 **《面向生产的智能体》** 是您动手实践GenAI智能体栈每一个构建块的指南。 所有知识都通过可运行的教程来传递,涵盖编排、内存、可观测性、部署、安全等方面。每个教程都在其自己的文件夹中,配有可运行的笔记本或代码文件,因此您可以在几分钟内从概念过渡到可工作的智能体。 ## 🏗️ AI智能体架构
![AI智能体架构 - 生产就绪的AI智能体开发工作流,展示编排、内存、工具、安全、可观测性、评估和部署组件](https://static.pigsec.cn/wp-content/uploads/repos/2026/05/b270dc0303175141.svg) *此图展示了构建生产级智能体的流程。本仓库中的教程逐步涵盖这些组件。*
## 📚 教程 ### 🔌 工具集成
Tutorial Description View
Secure Tool Calling (Arcade) Enable agents to securely call external tools (Gmail, Slack, Notion) with OAuth2 authentication and human-in-the-loop safety controls. Learn production-ready tool integration with user isolation and approval workflows.
### 📊 数据处理
Tutorial Description View
Web Data Collection for AI Agents (Bright Data) Build agents that collect and process web data at scale using enterprise-grade scraping infrastructure. Learn to integrate proxy networks, handle CAPTCHAs, and extract structured data from complex websites.
Real-Time Web Data Integration for Agents (Tavily) Enable agents to access, search, and extract real-time web data. Build workflows that combine live web information with private knowledge for research, monitoring, and up-to-date recommendations.
### 🔍 RAG与知识管理
Tutorial Description View
Production-Ready RAG Agents with Contextual AI (Contextual AI) Build enterprise-grade RAG systems in 15 minutes using Contextual AI's managed platform. Learn document processing, intelligent indexing, agent deployment, and automated evaluation with LMUnit testing framework for financial document analysis.
### 🧠 记忆
Tutorial Description View
Agent Memory: Dual-Memory & Semantic Search (Redis) Implement dual-memory (short-term and long-term), semantic search, and persistent state for agents that remember user preferences and learn from conversations.
Self-Improving Memory with Mem0: Hybrid Vector & Graph Storage Build intelligent agents with self-improving memory that automatically extracts insights, resolves conflicts, and evolves with each interaction. Learn hybrid memory architecture combining vector search for semantic recall and graph databases for relationship mapping.
AI Memory with Cognee Build intelligent AI memory systems that learn from Python's creator and improve your development workflow. Transform scattered development data into unified knowledge graphs with contextual insights.
### 🚀 部署
Tutorial Description View
AWS Bedrock AgentCore: Managed Agent Deployment Deploy and manage AI agents on AWS Bedrock AgentCore Runtime. Learn to transform local agents into production-ready managed services with automatic infrastructure, request tracking, and standardized communication patterns.
Containerizing Agents with Docker Containerize agents for portability and scalability. Learn foundational patterns for running agents in containers across environments.
On-Prem LLM Deployment with Ollama Run and interact with large language models locally. Replace cloud APIs with on-prem models for privacy, cost control, and low-latency agent workflows.
### 👥 多智能体协调
教程 描述 查看
Multi-Agent Communication with A2A Protocol Simulate collaborative agent workflows and message exchange using open communication protocols for interoperability.
### 🚀 GPU部署
Tutorial Description View
Scalable GPU Deployment for AI Agents (Runpod) Deploy AI agents on scalable GPU infrastructure. Learn to set up cost-effective, high-performance environments for demanding agent workloads.
### 🔒 安全
Tutorial Description View
Comprehensive Agent Security (LlamaFirewall) Apply comprehensive input, output, and tool security guardrails for agents. Covers prompt injection, behavior alignment, and tool access control.
Hands-On Agent Security Evaluation (Apex) Hands-on prompt injection attacks, defenses, and automated security testing for AI agents.
### 👥 多智能体协调
教程 描述 查看
Multi-Agent Communication with A2A Protocol Simulate collaborative agent workflows and message exchange using open communication protocols for interoperability.
### 🧩 智能体框架
Tutorial Description View
Tool & API Integration via Model Context Protocol (MCP) Integrate agents with external tools and APIs using a standardized protocol. Example: Seamless tool and API integration for advanced agent workflows.
Stateful Agent Workflows with LangGraph Design complex, stateful agent workflows using a directed graph architecture. Example: Multi-step text analysis pipeline with classification, entity extraction, and summarization.
Deploying Agents as APIs with FastAPI Create and deploy agents as performant APIs, supporting both synchronous and streaming endpoints.
Building AI Agents in Kotlin with Koog Build your first AI agent in Kotlin using JetBrains' Koog framework. Step-by-step from hello world to tool calling and structured output in under 30 minutes.
### 🛠️ 模型定制
Tutorial Description View
Fine-Tuning AI Agents for Domain Expertise & Efficiency Learn how to fine-tune language models for specialized agent behavior, domain expertise, and efficient, cost-effective responses. Covers data preparation, training, evaluation, and integration into agent workflows.
### 🔍 跟踪与调试
Tutorial Description View
Agent Tracing & Debugging with LangSmith Add comprehensive observability to AI systems. Capture detailed traces, decision points, and timing data to debug, monitor, and systematically improve agent performance.
### 📊 评估
Tutorial Description View
Automated Agent Evaluation & Behavioral Analysis (IntellAgent) Automate agent evaluation with behavioral analysis, performance metrics, and actionable insights for improving agent quality.
### 🖥️ UI与前端
Tutorial Description View
Building a Chatbot UI with Streamlit Build a beginner-friendly chatbot web app with a chat interface, file upload, and session state for interactive agent demos.
## 🚀 快速开始 使用我们经过实战检验的模式和实现,将您的AI智能体想法转化为生产就绪的系统。 ### 📖 在线浏览 直接在GitHub上探索教程,了解生产级实现、架构决策和集成模式。每个教程都包含全面的文档和代码,您可以研究和调整以适应您的特定需求,无需本地设置。 ### 🛠️ 克隆并构建 下载仓库以在本地运行教程,试验配置,定制实现,并将已验证的模式直接集成到您的智能体开发工作流中。
#### 快速设置 **1. 获取代码** ``` git clone https://github.com/NirDiamant/agents-towards-production.git cd agents-towards-production ``` **2. 安装依赖** 导航到目标教程并设置环境: ``` # 示例:Multi-tool agent orchestration cd tutorials/agentic-applications-by-xpander.ai pip install -r meeting-recorder-agent/requirements.txt ``` **3. 部署与测试** 通过首选接口启动教程: ``` # 运行交互式 notebook 进行实验 jupyter notebook tutorial.ipynb # 执行生产脚本进行集成测试 python app.py ```
## 📚 推荐阅读 *此列表包含亚马逊联盟链接。作为亚马逊关联公司,我从符合条件的购买中赚取收入。以下每本书都是我读过并真诚推荐给在此领域工作的工程师的。本仓库的配套书在README顶部单独列出。* - [《从零构建大型语言模型》](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=agents-towards-production--readme&click=amazon-product&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1633437167%3Ftag%3Ddiamantai-atp-20&text=Build%20a%20Large%20Language%20Model%20%28From%20Scratch%29) 作者:Sebastian Raschka。在PyTorch中端到端构建GPT风格的模型。 - [《AI工程:使用基础模型构建应用》](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=agents-towards-production--readme&click=amazon-product&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1098166302%3Ftag%3Ddiamantai-atp-20&text=AI%20Engineering%3A%20Building%20Applications%20with%20Foundation%20Models) 作者:Chip Huyen。生产化基础模型应用的权威参考。 - [《动手学大型语言模型》](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=agents-towards-production--readme&click=amazon-product&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1098150961%3Ftag%3Ddiamantai-atp-20&text=Hands-On%20Large%20Language%20Models) 作者:Jay Alammar 和 Maarten Grootendorst。可视化的、实用的LLM讲解。 - [《使用Transformers进行自然语言处理》](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=agents-towards-production--readme&click=amazon-product&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1098136799%3Ftag%3Ddiamantai-atp-20&text=Natural%20Language%20Processing%20with%20Transformers) 作者:Lewis Tunstall, Leandro von Werra, Thomas Wolf。来自Hugging Face团队。 - [《设计机器学习系统》](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=agents-towards-production--readme&click=amazon-product&target=https%3A%2F%2Fwww.amazon.com%2Fdp%2F1098107969%3Ftag%3Ddiamantai-atp-20&text=Designing%20Machine%20Learning%20Systems) 作者:Chip Huyen。生产环境中的ML系统,仍是标准参考。 ## 🤝 贡献 我们欢迎支持智能体开发的工具、基础设施和框架的贡献。这包括监控、部署平台、安全工具、数据库、API以及其他使能生产智能体系统的横向服务。 请查看我们的[贡献指南](CONTRIBUTING.md)以获取更多详情。 ## ⚠️ 免责声明 **仅供教育用途。** 作者对使用、误用或后果不承担任何责任。我们不认可、验证或保证本文中提及的第三方公司、工具或服务。不对引用方造成的损害、损失、安全漏洞或欺诈活动负责。 **您的责任:** 进行尽职调查,验证合法性,隔离测试,确保法律合规。安全工具需要伦理使用并获得适当授权。 使用本仓库即表示您同意本免责声明。 ## 📜 许可证 本项目根据定制的非商业许可证授权 - 详情请参阅[LICENSE](LICENSE)文件。
### ⭐️ 如果您觉得本仓库有帮助,请考虑点亮星标!
![](https://europe-west1-atp-views-tracker.cloudfunctions.net/working-analytics?notebook=main-readme)

关键词:AI智能体、生产部署、LLM、编排、多智能体系统、记忆系统、监控、安全、可观测性、智能体框架、基础设施、无服务器、企业AI、工具集成

标签:AI风险缓解, Apex, API集成, AV绕过, FastAPI, GPU扩展, Kubernetes, LangChain, LangGraph, RAG, UI开发, 人工智能, 企业部署, 可观测性, 向量内存, 多代理协调, 安全护栏, 开源, 微调, 搜索引擎查询, 教程, 数据防泄漏, 机器学习, 浏览器自动化, 生产部署, 生成式AI代理, 用户模式Hook绕过, 编排, 评估, 请求拦截, 轻量级, 逆向工具