Potpie is an open-source platform designed to build AI agents specialized in a user's codebase by constructing a knowledge graph that maps relationships among code components such as functions, types, files, and modules. This graph enables various tasks including code analysis, debugging, test planning, and suggesting code changes.