↓ Skip to main content
  1. Home projects/

AI_Devs 4: course solutions and the Dave agent

··Index: 8·
Table of Contents

AI_Devs 4 is a Polish course on building applications with large language models. Its five weeks go through programming with LLMs, context management, nondeterminism and evaluation, working with AI, and generative applications, and every lesson ends with a practical task to solve in capture-the-flag format.

My repository has solution scripts for all the lessons, a few rewrites and side quests, and the biggest part of the work: Dave.

Dave
#

I wrote Dave to solve the course tasks without me. A planner breaks tasks into steps, and a model router decides which model should handle which step, either one of the OpenAI models or a local model running in Ollama or LM Studio. Code that Dave generates runs in a RestrictedPython sandbox. His tools cover HTTP, vision, audio, PDF, scraping, e-mail and the shell, and when a job gets too big he can pass parts of it to sub-agents. There’s also an MCP server and a web interface.

Dave: a planner splits a task into steps, a model router picks a model for each step, and tools and sandboxed code do the work.course taskplannerstepssub-agentsmodel routerOpenAI modelslocal modelstoolsHTTP, vision, audio, PDF, shell...sandboxgenerated code runs herebig jobsevery LLM call is traced; course data and model outputs are cached on disk
How Dave turns a task into steps and routes each step to a model or a tool

I trace all LLM calls in LangFuse and cache course data and model outputs on disk, so I’m able to repeat a run and get the same result. Coding agents working in this repo have to follow one rule of mine: validate the answer before you report success.

Stack: Python, uv, OpenAI API, Ollama, LangFuse, PromptFoo, Qdrant, MCP, FireCrawl, Docker.

Related