An AI pair programmer is an agent with file tools and a loop. Learn the architecture, then build a minimal CLI pair programmer in Python with Gemini function calling.