by liiiiiiiiil
Build an AI Coding Agent from Scratch, Step by Step | 从零一步步搭建 AI 编程 Agent,边实现边理解 Agent 的工作原理
# Add to your Claude Code skills
git clone https://github.com/liiiiiiiiil/agent-from-scratchGuides for using ai agents skills like agent-from-scratch.
See how agent-from-scratch compares with popular alternatives.
agent-from-scratch is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by liiiiiiiiil. Build an AI Coding Agent from Scratch, Step by Step | 从零一步步搭建 AI 编程 Agent,边实现边理解 Agent 的工作原理. It has 50 GitHub stars.
agent-from-scratch's catalog security scan is still queued. You can run an instant dependency and prompt-injection check now with the "Scan for vulnerabilities" button above.
Clone the repository with "git clone https://github.com/liiiiiiiiil/agent-from-scratch" and add it to your Claude Code skills directory (see the Installation section above).
agent-from-scratch is primarily written in Python. It is open-source under liiiiiiiiil on GitHub, so you can review or fork the full source.
Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh agent-from-scratch against similar tools.
No comments yet. Be the first to share your thoughts!
Unlocks once the catalog security scan passes (runs nightly).
⚠️ Third-Party Software Notice
This skill is third-party open-source software developed and hosted independently on GitHub. SkillsLLM is an informational directory and does not control or maintain the underlying repository.
Any security checks, ratings, or warnings displayed by SkillsLLM are automated and limited in scope. They do not constitute a security certification or guarantee that the software is safe, error-free, or free from malicious code, vulnerabilities, compromised dependencies, or prompt-injection risks.
Review the source code, permissions, dependencies, and configuration before installing or running any third-party skill. Use is at your own risk. To the maximum extent permitted by applicable law, SkillsLLM is not liable for losses arising from third-party software.
The deep catalog scan for this skill is still queued. Run an instant dependency check now instead.
See comparison
从最小的 agent loop 开始,按 Git tag 和能力阶段逐步加入工具、安全、上下文和可靠执行能力。
English · 中文
适合想用 Python 标准库理解 LLM agent 如何运行的开发者。每课聚焦一个版本相对上一版新增的核心概念,源码、diff 和设计取舍都可追溯。
当前状态:主线代码和教程到 v0.21(第 21 课的任务轨迹回放,只读展示 Trace & Replay 事实)。教程以默认分支的 docs/tutorials/ 为准;运行某课时再切换该课声明的代码 tag。
完成 v0.10 后,Agent 已能读取项目、搜索和修改文件、执行命令、运行测试,并通过权限机制控制高风险操作。
要求:Python 3.10+;准备一个可访问的 LLM 网关。Bash/zsh:
git clone https://github.com/liiiiiiiiil/agent-from-scratch.git
cd agent-from-scratch
cp src/mini_agent/config_example.py src/mini_agent/config_local.py
# 编辑 config_local.py,填入 BASE_URL / API_KEY / MODEL;它不会进 git
python -m pip install -e .
python -m mini_agent "帮我算一下 123 * 456"
可选:python -m pip install -e '.[interactive]' 启用多行终端输入。命令行参数只是首条任务,处理后仍进入交互循环;用空行、exit、quit 或 EOF 退出。PowerShell、免安装运行和配置细节见完整手册。
src/mini_agent/ 核心运行时、配置、状态、权限、上下文和工具
tests/ 测试与 smoke test
docs/tutorials/ 分阶段、按版本的教程
docs/operation/ 最新版运行手册
docs/plans/ 路线图与功能计划
docs/governance/ 写作规范与决策记录
examples/ 示例输入输出文件
AGENTS.md。欢迎提交 Issue / PR。新增课程前请读教程作者规范、主 README 编写规范和 AGENTS.md;作者入口与模板见学习指南。
MIT — 见 LICENSE