AB
AiBoss
project

potpie.ai - An AI codebase agent building platform that automates code analysis, testing, and development tasks.

potpie.ai is an open-source platform that uses AI technology to create customized engineering agents for codebases. Based on a knowledge graph built from the codebase, potpie.ai deeply understands the relationships between code components to achieve automated generation...

What is potpie.ai?

potpie.ai is an open-source platform that uses AI technology to create customized engineering agents for codebases. Based on a knowledge graph built from the codebase, potpie.ai deeply understands the relationships between code components, automating code analysis, testing, and development tasks. potpie.ai provides various pre-built agents, such as debugging agents, codebase Q&A agents, code change agents, integration test agents, unit test agents, low-level design agents, and code generation agents, helping developers quickly solve common problems and optimize development processes. potpie.ai also supports custom agents, allowing developers to create personalized tools according to their specific needs.

The main functions of potpie.ai

  • Deep Code UnderstandingBased on building a code knowledge graph, it captures the relationships between code components and gains a deep understanding of the code library.
  • Pre-built and custom agentsIt provides a variety of pre-built proxies, such as debugging proxies, code repository Q&A proxies, code change proxies, integration test proxies, unit test proxies, LLD proxies, and code generation proxies, and supports users to create custom proxies according to their needs.
  • Seamless integrationIt supports seamless integration with existing development workflows and supports multiple programming languages.
  • Adaptable: Codebases of any size and language.
  • Intelligent InteractionIt allows interaction with agents through a simple chat interface, requiring no complex setup.

The technical principles of potpie.ai

  • knowledge graph:
    • Building knowledge graphsBased on static code analysis and natural language processing (NLP) techniques, a knowledge graph is constructed for the codebase. The knowledge graph is a graph structure, where nodes represent code components (such as functions, classes, and modules), and edges represent relationships between components (such as call relationships and dependency relationships).
    • Semantic understandingUsing NLP techniques, we can understand natural language content such as code comments, docstrings, and variable names, and more accurately capture the semantic information of the code.
  • AI Agent:
    • Proxy architectureBased on pre-trained large language models (such as OpenAI's GPT model), and with fine-tuning and customized instructions, it understands and processes specific codebase tasks.
    • Task-drivenEach agent has a clearly defined task, including system instructions, task steps, and tool calls. The agent executes the task based on the definition and generates the corresponding output.
  • Tool System:
    • Utility functions:
      • get_code_from_probable_node_name: Retrieves a code snippet based on a possible node name.
      • get_code_from_node_id: Retrieves the code based on the node ID.
      • get_nodes_from_tags: Retrieves nodes based on tags.
      • ask_knowledge_graph_queries: Performs vector similarity searches to obtain relevant information.
    • Tool callWhen an agent is performing a task, it can call utility functions to obtain the necessary information or perform specific operations.

The project address for potpie.ai

Application scenarios of potpie.ai

  • New Employee Onboarding TrainingIt helps newly hired developers quickly familiarize themselves with the codebase structure, functionality, and development process.
  • Code Changes and Impact AnalysisCode change agents can analyze the impact of code modifications, identify affected APIs and modules, and provide improvement suggestions.
  • Automated test generationGenerate unit test and integration test code to help development teams improve test coverage and ensure code quality and functional stability.
  • Low-level design (LLD) planning: Generate detailed design schemes based on functional requirements to help the development team better plan and implement.
  • Code debugging and problem solvingIt provides targeted debugging steps and solutions to help developers quickly locate and resolve problems.