PyData Global 2025

The Boringly Simple Loop Powering GenAI Apps
2025-12-09 , Live from PyData Boston

Do you feel lost in the jungle of GenAI frameworks and buzzwords? Here's a way out. Take any GenAI app, peel away the fluff, and look at its core. You'll find the same pattern: a boringly simple nested while loop. I will show you how this loop produces chat assistants, AI agents, and multi-agent systems. Then we'll cover how RAG, tool-calling, and memory are like lego bricks we add as needed. This gives you a first-principles based map. Use it to build GenAI apps from scratch; no frameworks needed.


Central Thesis

We are at a point where talking about GenAI apps has become more complex than building them. Social media is obsessed with the "top 10 libraries for GenAI", search engines are swamped with shallow tutorials, and many devs I meet are rightfully confused what frameworks they should spend time on.

The answer is "none, GenAI isn't all that complicated". However, that answer isn't sexy because it doesn't grab attention, doesn't sell consulting hours, and doesn't convince someone to buy an online course. Hence few people give it. That has to change!

That's what this talk is about: The boringly simple basics of building GenAI apps and how you can use a simple nested while loop to build assistants, AI agents, or multi-agent systems. Sometimes less is more.

Takeaways

  • Create prototypes of agentic apps from scratch using fundamental building blocks
  • Choose the right components (like RAG or MCP) for your specific problem
  • Debug agentic apps by spotting misconfigured context

Target Audience

This talk is for the software engineer and data professional that wants to get hands-on with GenAI. Medium and Substack taught you concepts like RAG and AI Agents, social media hyped you up, and now it’s time to build. The only problem: Where do you start? How do you turn "let's build something that does XYZ" into a concrete software product? If you feel like you are sitting with a pile of Lego pieces while everyone else is playing with a completed spaceship, this talk is for you. It's for builders who are ready to go from reading to coding.

Prerequisites

You should have working knowledge of Python and familiarity with LLM terminology (tokens, context window, system prompt, ...). If you're comfortable reading source code, you have everything you need. No prior experience with frameworks like LangChain, LlamaIndex, or others is necessary.

Outline

Introduction (2 min)

The core loop (15 min)
- Introduction to the fundamental pattern that orchestrates GenAI apps (the "core loop")
- Definition of the terms "Turns" and "Traces" that are foundational to building and optimizing flows
- Showcase on how to create assistants, workflows, AI agents, and multi-agent systems using this pattern

Context Engineering (15min)
- Introduction to the three parts of context engineering: Plans, Knowledge, and Tools.
- Discussion on how these parts relate to the core loop and where to define them
- Showcase how RAG, MCP, memory, etc. assist in setting up the system context

Q&A (5min)
Buffer (3min)

Bio

I'm an engineer and open-source maintainer with a PhD in Computer Science and over a decade of hands-on experience building with AI/ML. Having scaled ImageIO, a foundational Python library, from 2 to 35 million monthly downloads, I know what it takes to build robust, scalable software. I co-founded PyData Stockholm and am deeply integrated into our data community. My current focus is to bring first principles thinking to the GenAI landscape and help developers build more robust systems.


Prior Knowledge Expected: No