Building a Coding Agent: Python/Django Edition
A newer, combined version of this workshop is available: [Coding Agent with Skills](/workshops/coding-agent-v2). We build a small project bootstrapper for Django: a coding agent that takes a plain-language app request, copies a working Django template, reads and writes files through tools, and iterates until the generated app runs. The first implementation uses the OpenAI Responses API through `ToyAIKit`, then we try the same idea with OpenAI Agents SDK, `PydanticAI`, Anthropic, and Z.AI. ## Links The main resources: - [ToyAIKit](https://github.com/alexeygrigorev/toyaikit) - [Django template repo](https://github.com/alexeygrigorev/django_template) - [Todo app made with Z.AI](https://www.loom.com/share/b4c47e3491504375b9244ea69fe095df) - [Related course: AI Bootcamp: From RAG to Agents](https://maven.com/alexey-grigorev/from-rag-to-agents) - [Related workshop: Hands-on with AI Agents and MCP](https://maven.com/p/3b1afc/hands-on-with-ai-agents-and-model-context-protocol-mcp) ## The app you will build The coding agent is a notebook-based chat interface backed by an LLM and a small set of filesystem tools. You give it a request like `to-do list`. The agent edits a copied Django template and leaves you with a project you can run. ```mermaid flowchart LR USER["You<br/>short app request"] CHAT["Jupyter chat UI<br/>ToyAIKit"] RUNNER["Agent runner<br/>Responses API or framework"] TOOLS["AgentTools<br/>read, write, tree, grep, bash"] DJANGO["Copied Django template<br/>project folder"] LLM["LLM provider<br/>OpenAI, Anthropic, Z.AI"] USER -->|type request| CHAT CHAT --> RUNNER RUNNER -->|tool calls| TOOLS TOOLS -->|modify files| DJANGO RUNNER -->|messages and tools| LLM DJANGO -->|make run| USER ``` Two screenshots show what the finished workshop output looks like. The first one shows the notebook chat after the agent plans and starts calling file tools:  The second one shows one of the generated Django todo apps:  ## Result The simplest version is intentionally small. It runs in Jupyter, uses local filesystem tools, and edits one copied Django project folder. That is enough to understand how larger coding agents work under the hood: prepare a template, expose the right tools, give the model precise instructions, and iterate on the generated code.