Building a coding agent from scratch
Summary
作者从零实现了一个极简编码智能体,详细讲解了其架构:包含异步事件驱动的 ReAct 代理循环、带沙箱的 read/write/edit/bash 工具、支持分支与回溯的 JSONL 会话存储,以及用 TypeScript 编写并通过 stdin/stdout JSON 通信的 TUI。
Similar Articles
@geekbb: Hugging Face 出的极简智能体,手把手教你从零造一个属于自己的 coding agent。学习写 agent 的入门玩具。 https://github.com/huggingface/tau
Hugging Face releases Tau, a simple terminal-based coding agent designed as a teaching tool to help developers learn how to build their own coding agents from scratch.
@Huahuazo: I want to understand how to build an Agent from scratch, not just call APIs—I've looked through many resources, and they're either too abstract or just hand you a finished product to tweak parameters, leaving the 'why design this way' part basically blank. LangChain's official Agents From Scratch...
LangChain's official Agents From Scratch tutorial provides a detailed guide on how to build an AI agent from scratch with human-in-the-loop and memory capabilities, covering four parts: basic setup, evaluation system, human-in-the-loop (HITL), and long-term memory.
@XAMTO_AI: Want to write a coding agent yourself? You've read plenty of articles about the principles, but you get stuck at the first line when you actually start. Recently I found the Chinese tutorial *Hands-On Pi*, which starts with a real offline agent log and takes you through all 15 levels from the beginning. Truly build a complete coding agent from scratch—every step has runnable code...
Introduces the Chinese tutorial *Hands-On Pi*, covering the step-by-step implementation of a Pi-style coding agent from scratch through 15 runnable checkpoints, including protocols, tool loops, conversation tree storage, context compression, and evaluation. Each chapter comes with the main text, a corresponding commit, tests, and failure experiments.
@vintcessun: Found a new approach: coding agent can be this lightweight. 16MB memory, 0% idle CPU, 26MB binary — these numbers are insane in the agent space. It's built with Rust, packing all standard tools, permission system, session management, and MCP into 17k LoC...
Zerostack is a minimal coding agent written in Rust, consuming only 16MB of memory and a 26MB binary. It achieves lightweight design through feature gates, supporting multiple providers and tools.
@GitHub_Daily: Many tutorials teach AI Agent development by jumping straight into frameworks — you install it and it runs, but you don't really understand what's going on underneath. ai-agents-from-scratch takes the opposite approach, starting from the most basic model call and gradually building up core patterns like tool calling, memory, and ReAct loops. It uses local models throughout…
GitHub_Daily recommends an open-source project called ai-agents-from-scratch. It starts from zero and uses local models to gradually implement core patterns such as tool calling, memory, and ReAct loops, helping developers understand the underlying principles of AI Agents without directly using frameworks.