> Markdown version of [/events/world-congress-2026-europe-virtual-stage/sessions/1655-your-ai-agent-is](https://www.wearedevelopers.com/events/world-congress-2026-europe-virtual-stage/sessions/1655-your-ai-agent-is). Every page supports `.md` or `Accept: text/markdown`. Links point to the HTML versions so they work for humans too. Agent guide: [/agents.md](https://www.wearedevelopers.com/agents.md). --- # Your AI Agent is just a while loop with an API call. Let me prove it - **Event:** World Congress 2026 Europe - Virtual Stage ## Description AI agents are everywhere right now. You can create your own with Vercel AI SDK, LangChain, Claude SDK, Google ADK etc. with ~20 lines of code. But what actually happens inside? What is behind that magical `generateText()` call? How and why are tools and MCP servers called, and how does the whole flow work? If you use it as a black box when things break, it's a matter of time before you're guessing instead of understanding. Spoiler: there's no magic. It's a loop, a few API calls, some tool invocations, a lot of prompt-engineering glue, and even more glue. I've been building an AI agent (with Vercel AI SDK) that helps professionals prepare for meetings by processing emails, chats, and calendars. At some point, debugging the system was like hitting the black box with a stick and wondering why it didn't work, so I decided to open up the box. In this talk, I'll show you: - What actually happens during an agent's "thinking" – using real API call traces from a production system - How tool calling and MCP integration work under the hood - The orchestration and architecture patterns you have to take care of and be aware of You'll walk away knowing what your agent is doing when no one is watching. No more black boxes. ## Speaker ### [Michał Michalczuk](https://www.wearedevelopers.com/@michal-michalczuk) Senior Software Engineer & Consultant @Tektit Consulting ## Related talks at this congress - [AI Agents & Agentic AI](https://www.wearedevelopers.com/events/world-congress-2026-europe-virtual-stage/sessions/1481-ai-agents-agentic-ai) — Xavier Sala Presas - [The age of agency: When products start to think and act](https://www.wearedevelopers.com/events/world-congress-2026-europe-virtual-stage/sessions/1613-the-age-of-agency) — Madalena Costa - [Designing & Deploying Distributed Multimodal Multi-Agent Systems with Google's AI Stac](https://www.wearedevelopers.com/events/world-congress-2026-europe-virtual-stage/sessions/1523-designing-deploying) — Saoussen Chaabnia - [Same Words, Different Worlds: Who's in Control?](https://www.wearedevelopers.com/events/world-congress-2026-europe-virtual-stage/sessions/1594-same-words-different) — Christina Rohrmoser, Stefan Wöhrer