Skip to content

Latest commit

 

History

History
90 lines (71 loc) · 3.2 KB

File metadata and controls

90 lines (71 loc) · 3.2 KB

Python License Steps Advanced

🚀 Agent Builder Pro

Advanced Edition · Build an Agent That Actually Ships

Shell execution · Streaming · RAG · Multi-agent · Persistent memory · Web UI

📖 中文版 README | 📘 Prerequisite: Agent Builder — the 6-step beginner tutorial.


What the Beginner Edition Can't Do, Pro Can

Beginner Pro
Q&A only ✅ Execute shell commands (ls, cat, git)
Response appears all at once ✅ Stream word-by-word (like ChatGPT)
Memory lost on exit ✅ SQLite persistent memory
Knows only training data ✅ RAG — reads your documents
Single agent ✅ Multi-agent pipeline
Terminal-only ✅ Gradio Web UI

Roadmap

# File What You Learn Core Skill
P1 step_p1_shell_executor.py Safe shell execution subprocess, whitelist sandbox
P2 step_p2_streaming.py Streaming output async generators, yield
P3 step_p3_rag.py RAG retrieval sentence-transformers, cosine similarity
P4 step_p4_multi_agent.py Multi-agent pipeline Researcher → Writer → Reviewer
P5 step_p5_persistent_memory.py Persistent memory SQLite, session recovery
P6 step_p6_web_ui.py Gradio Web UI ChatInterface, streaming in web
P7 step_p7_full_pro.py Complete Pro Agent All components + Web UI

Quick Start

# Install
pip install -r requirements.txt

# API key
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://api.deepseek.com/v1"

# Run (P1 and P3 work without API key!)
python step_p1_shell_executor.py
python step_p2_streaming.py
python step_p3_rag.py
# ...
python step_p7_full_pro.py   # The grand finale: Web UI + Shell + Memory

💡 Stuck? → TROUBLESHOOTING.md

Dependencies

Package Used In Purpose
openai P2-P7 LLM API
sentence-transformers P3 Text → vector embedding
gradio P6-P7 Web chat interface

Project Structure

agent-builder-pro/
├── step_p1_shell_executor.py    ← Safe shell commands
├── step_p2_streaming.py         ← Stream word-by-word
├── step_p3_rag.py               ← Document retrieval
├── step_p4_multi_agent.py       ← Multi-agent pipeline
├── step_p5_persistent_memory.py ← SQLite memory
├── step_p6_web_ui.py            ← Gradio interface
├── step_p7_full_pro.py          ← Complete product
├── exercises/                   ← Practice exercises
├── outputs/                     ← Example outputs
├── CHEATSHEET.md                ← Quick reference
├── ARCHITECTURE.md              ← Deep dive
└── TROUBLESHOOTING.md           ← Error fixes

License

MIT © 2026