No frameworks. No magic. Just you, Python, and an LLM API.
π δΈζη README
A hands-on tutorial that guides you through building a working AI agent β step by step, concept by concept. Each step is a standalone Python script that introduces exactly one new idea.
ββββββββββββββββββββββββ
β π§ Brain (LLM API) β β Call the model
ββββββββββββββββββββββββ€
β π§ Hands (Tools) β β Function Calling
ββββββββββββββββββββββββ€
β πΎ Memory (Context) β β Messages list
ββββββββββββββββββββββββ€
β π Engine (ReAct) β β Think β Act β Observe
ββββββββββββββββββββββββ
| # | File | What You Learn | New Concept |
|---|---|---|---|
| 1 | step01_hello_llm.py |
Call the LLM API | system/user/assistant roles |
| 2 | step02_tool_system.py |
Function Calling | Tool definitions, two-call pattern |
| 3 | step03_memory.py |
Conversation memory | Messages list, token budget |
| 4 | step04_react_loop.py |
ReAct loop | Think β Act β Observe cycle |
| 5 | step05_full_agent.py |
Complete agent | All components + interactive CLI |
| 6 | step06_plugin_system.py |
Plugin system + HTTP | Hot-loading plugins, REST APIs |
# 1. Install dependencies
pip install -r requirements.txt
# 2. Set your API key (DeepSeek recommended β cheap, fast)
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://api.deepseek.com/v1"
# 3. Run step by step
python step01_hello_llm.py
python step02_tool_system.py
python step03_memory.py
python step04_react_loop.py
python step05_full_agent.py
python step06_plugin_system.pyπ‘ Stuck? β TROUBLESHOOTING.md
This tutorial uses the OpenAI-compatible interface. Any provider that supports chat/completions and Function Calling works:
| Provider | Model | Base URL |
|---|---|---|
| OpenAI | gpt-4o-mini |
(default) |
| DeepSeek | deepseek-chat |
https://api.deepseek.com/v1 |
| Qwen | qwen-turbo |
(Alibaba Cloud) |
| GLM | glm-4-flash |
(Zhipu AI) |
| Ollama (local) | llama3 |
http://localhost:11434/v1 |
After mastering the basics, level up with:
π Agent Builder Pro β Shell executor, streaming output, RAG knowledge base, multi-agent collaboration, persistent memory, and Web UI.
agent-builder/
βββ step01_hello_llm.py β Call the LLM
βββ step02_tool_system.py β Function Calling
βββ step03_memory.py β Memory management
βββ step04_react_loop.py β ReAct loop
βββ step05_full_agent.py β Complete agent
βββ step06_plugin_system.py β Plugin system
βββ tools/ β Built-in tools
βββ plugins/ β Drop plugins here
βββ exercises/ β Practice exercises
βββ outputs/ β Example outputs
βββ CHEATSHEET.md β Quick reference
βββ ARCHITECTURE.md β Deep dive
βββ TROUBLESHOOTING.md β Error fixes
MIT Β© 2026