First Principles for Building the Next Generation of Agents

Coding workflows still rely heavily on chat-based RAG systems that require constant human intervention. What if the problem isn't retrieval quality, but the entire architectural paradigm we inherited from the chat era? In this talk, Beyang Liu (Co-founder and CTO at Sourcegraph) joins us to challenge conventional RAG approaches for coding agents, based on lessons learned from building Amp - a coding agent designed from first principles for the agentic era. We discuss: • Why the shift from chat LLMs to agentic models requires inverting the context-fetching architecture • How simple tools like grep can replace complex monolithic RAG engines with proper agent design • The controversial decision to remove model selectors and why tight coupling between models and tools is essential • Real-world examples: replacing embeddings/re-rankers with agent feedback loops, implementing sub-agents for context window management, and using specialized models (like O3) for specific reasoning tasks • Why context is no longer just about retrieval - it's about feedback loops, planning tools, and environmental validation • Moving beyond "search plus plus" to true automation with proper agent prompting and collaboration mechanisms Beyang shares insights from transitioning Sourcegraph's coding assistant Cody to the ground-up agentic architecture of Amp, revealing why cargo-culting best practices from the chat LLM era actively harms agent performance. The discussion covers practical strategies for tool design, sub-agent implementation, context window management, and building high-ceiling tools that unlock greater automation potential. About Sourcegraph: https://sourcegraph.com/ Connect with Beyang: LinkedIn:   / beyang-liu   X/Twitter: https://x.com/beyang TIME STAMPS 00:00 Introduction 03:44 Transition to Agentic Era 05:14 Implications of Agentic Architecture 08:43 RAG Engine in Agentic Era 14:06 Tool Selection and Context Management 22:47 Subagents and Context Window Management 26:08 Model Selection and User Experience 30:46 Evaluating Agent Design and Context Utilization 32:43 Challenges and Solutions in Code Modifications 35:21 Generalizing AI Tools Beyond Coding 38:11 Subagents and Context Preservation 39:01 Designing and Evaluating AI Tools 44:25 The Future of Background Agents 47:18 Billing and Usage Transparency 50:56 Final Thoughts and User Engagement If you want to learn more about improving rag applications check out: https://improvingrag.com/ Stay updated: X/Twitter: https://x.com/jxnlco LinkedIn:   / jxnlco   Site: https://jxnl.co/ Newsletter: https://subscribe.jxnl.co/