Building a Coding Agent: Python/Django Edition
For a newer, combined take, see Coding Agent with Skills. We build a small project bootstrapper for Django, a coding agent that takes a plain-language app request and copies a working Django template. From there it reads and writes files through tools, iterating until the generated app runs. The first version 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 Django template repo Todo app made with Z.AI Related course: AI Bootcamp: From RAG to Agents Related workshop: Hands-on with AI Agents and MCP The app you will build You chat with the coding agent in a notebook. It's backed by an LLM and a small set of filesystem tools. You give it a request like to-do list, and the agent edits a copied Django template and leaves you with a project you can run. 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's enough to understand how larger coding agents work under the hood. The same four steps scale to any size of agent: Prepare a template. Expose the right tools. Give the model precise instructions. Iterate on the generated code.