Loading video player...
Standard chat interfaces (like ChatGPT) have a major flaw: as you go deeper into a topic, the context window fills up, and the AI’s intelligence drops. In this video, I build a solution: a "Knowledge Tree" application. Instead of one linear chat, this app uses a multi-agent workflow to spawn new nodes for every subtopic. Each node has its own dedicated agent, article, and questions, allowing for infinite depth without losing context. I’ll walk you through the full stack—from the high-level architecture of recursive agents to the actual implementation using Mastra, Next.js and the AI SDK. 💻 Source Code: https://github.com/Quintui/learning-map-ai-builder X: https://x.com/kristianvtr Build with Mastra: https://mastra.ai/ ⏱️ Timestamps: 0:00 - The problem with Chat 0:33 - Knowledge Tree demo 1:24 - Tech stack overview 1:47 - Agent architecture 3:31 - Backend Master instance 4:18 - Topic Agent & Tools 5:13 - The Execute function 6:01 - API Route setup 6:32 - Frontend useChat hook 7:33 - Wrap up