Smol Developer
Smol Developer is an embeddable AI developer agent that generates entire codebases from a single natural language prompt. Created by Shawn Wang (swyx) in May 2023, it was one of the first viral AI coding projects and pioneered the concept of an embeddable developer agent library. With over 12,200 GitHub stars, it demonstrated that a “junior developer” agent could scaffold complete applications from a specification.1))
GitHub: smol-ai/developer
Key Features
Whole Program Synthesis — Generates complete, coherent codebases from a single prompt rather than individual files
Embeddable Library — Designed as a library (not just a CLI), with importable functions for integration into other apps
Human-in-the-Loop — Presents plans for review before generating code, allowing iterative refinement
File Planning — First generates a file plan listing all needed files, then generates each file coherently
Multi-Model Support — Works with OpenAI, Anthropic, and other LLM providers
Lightweight Design — Minimal codebase (~200 lines of core logic) that is easy to understand and modify
Spec-Driven — Takes a markdown specification and produces a complete project matching the description
Architecture
Smol Developer follows a deliberately simple three-function architecture:
plan() — Analyzes the user specification and generates a complete file plan (list of files to create)
specify_file_paths() — Refines the file plan with proper paths and naming conventions
generate_code() — Generates each file sequentially, maintaining coherence across the codebase
Shared Prompt Context — All files share the original
spec as context, ensuring consistency
Debug Loop — Optional human feedback cycle to fix issues and regenerate specific files
Usage Example
# Clone the repository
git clone https://github.com/smol-ai/developer.git
cd developer
# Install dependencies
pip install -r requirements.txt
# Set your API key
export OPENAI_API_KEY="your-key-here"
# Generate a codebase from a prompt
python3 main.py "Build a Flask REST API with user authentication,
SQLAlchemy ORM, JWT tokens, and a React frontend with login/signup pages"
# Use as a library in your own app
python3 -c "
from smol_dev import plan, specify_file_paths, generate_code
spec = open('my_spec.md').read()
files = plan(spec)
for f in files:
code = generate_code(spec, f, files)
print(f'{f}: {len(code)} chars')
"
How It Works
graph TD
A[User Specification] --> B[plan Function]
B --> C[LLM Analyzes Requirements]
C --> D[File Plan Generated]
D --> E[specify_file_paths Function]
E --> F[Refined File List with Paths]
F --> G[generate_code Function]
G --> H{For Each File}
H --> I[Send Spec + File Context to LLM]
I --> J[Generate File Content]
J --> K[Write to Disk]
K --> H
H -->|All Files Done| L[Complete Codebase]
L --> M{User Review}
M -->|Issues Found| N[Feedback Loop]
N --> O[Regenerate Specific Files]
O --> M
M -->|Approved| P[Final Output]
Philosophy
Smol Developer embodies several key principles:
“Build the thing that builds the thing” — Focus on creating developer agents rather than final applications
Human-Centric — The human provides the creative direction; the agent handles implementation
Coherent Whole Program — Unlike code completion tools, Smol generates entire programs that work together
Simplicity — The core is intentionally minimal (~200 lines) to be understandable and hackable
Embeddability — Designed as a library first, enabling integration into larger systems
The project inspired a wave of “smol” AI tools including smol-podcaster, smol-course, and smol-tools, establishing a pattern for minimal, focused AI developer agents.2))3)))
See Also
Devon — Open-source pair programmer with TUI
Cline — Model-agnostic autonomous coding agent
Agentless — Lightweight localize-then-repair approach
-
Trae Agent — ByteDance's research-friendly CLI agent
References