ai-agent-guide
agent
Fail
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 6 GitHub stars
Code Fail
- eval() — Dynamic code execution via eval() in chapters/04-react-agent/react_agent.py
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Chinese AI Agent tutorial from zero: LLM basics to ReAct agent | hands-on code examples
README.md
🤖 AI Agent 开发实战指南
从零构建生产级 AI Agent | 中文教程 | 持续更新
⭐ 如果觉得有用,请给个 Star!你的支持是持续更新的动力
系统学习 AI Agent 开发,每章附完整可运行代码
面向有 Python 基础的开发者 & 想入门 AI 开发的从业者
📚 课程大纲
第一部分:基础篇
| 章节 | 内容 | 代码 |
|---|---|---|
| 01 - LLM API 快速上手 | OpenAI/DeepSeek API 调用、流式输出、成本控制 | ✅ |
| 02 - Prompt 工程核心技巧 | Few-shot、Chain-of-Thought、结构化输出 | ✅ |
| 03 - 工具调用 Function Calling | 让 AI 调用你的函数,连接真实世界 | ✅ |
第二部分:Agent 篇
| 章节 | 内容 | 代码 |
|---|---|---|
| 04 - 第一个 ReAct Agent | 从零实现 ReAct 框架,理解 Agent 核心原理 | ✅ |
| 05 - LangChain Agent 实战 | 搜索 Agent、代码执行 Agent、文件操作 Agent | ✅ |
| 06 - RAG 知识库问答 | 向量数据库、文档切分、混合检索 | ✅ |
| 07 - Multi-Agent 系统 | CrewAI/AutoGen 构建多 Agent 协作系统 | ✅ |
第三部分:进阶篇
| 章节 | 内容 | 代码 |
|---|---|---|
| 08 - Agent 记忆系统 | 短期记忆、长期记忆、个性化记忆管理 | ✅ |
| 09 - 生产级 Agent 部署 | 流式响应、错误处理、监控、成本控制 | ✅ |
| 10 - 完整项目实战 | 从需求到上线:构建企业级知识库助手 | ✅ |
🚀 快速开始
git clone https://github.com/YOUR_USERNAME/ai-agent-guide
cd ai-agent-guide
pip install -r requirements.txt
cp .env.example .env # 填入你的 API Key
然后直接运行任意章节的示例:
python chapters/01-llm-basics/hello_llm.py
📖 章节预览
第01章:LLM API 快速上手
from openai import OpenAI
client = OpenAI(
api_key="your-key",
base_url="https://api.deepseek.com/v1" # 或使用 OpenAI
)
response = client.chat.completions.create(
model="deepseek-chat",
messages=[{"role": "user", "content": "用一句话解释什么是 AI Agent"}]
)
print(response.choices[0].message.content)
第04章:从零实现 ReAct Agent
def react_agent(question: str, tools: dict, max_steps: int = 5) -> str:
"""最简 ReAct Agent 实现"""
history = []
for step in range(max_steps):
# Reasoning: 让 LLM 思考下一步
thought = llm_think(question, history, tools)
if thought.is_final_answer:
return thought.answer
# Acting: 执行工具调用
tool_result = tools[thought.tool_name](thought.tool_input)
# Observation: 记录结果
history.append({
"thought": thought.reasoning,
"action": f"{thought.tool_name}({thought.tool_input})",
"observation": tool_result
})
return "超过最大步骤限制"
🎯 适合人群
- 有 Python 基础,想进入 AI 开发领域
- 已经会调用 ChatGPT API,想更系统地学习 Agent 开发
- 想把 AI 能力集成到自己产品/业务中的开发者
- 想转型 AI 方向的后端/全栈开发者
� 相关项目
- open-assistant-cn — 开源个人 AI 超级助手(中文优先)
- ai-morning-brief — Claude Code 中文 AI 早报 Skill
- awesome-ai-tools-zh — 500+ 中文 AI 工具合集
- awesome-mcp-zh — MCP 中文资源大全
- local-ai-china — 本地 AI 部署指南
- china-hot-mcp — 中国热点 MCP 服务器
�💼 商业合作与服务
学完这套教程后,如果你想快速落地 AI 项目,欢迎联系!
- 🚀 Agent 定制开发:企业知识库、AI 客服、自动化工作流
- 📖 进阶培训:一对一 AI 开发辅导,快速从入门到项目落地
- 🛠️ 技术咨询:AI 技术选型、架构设计、性能优化
📬 Telegram:@ExploreAllStudio
⭐ 如果觉得有用,请给个 Star!你的支持是持续更新的动力
欢迎 Fork、PR、Issue 交流 🙏
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found