This is a collection of examples using Codegen. You can use these examples to learn how to use Codegen and integrate the codegen agent into your workflows.
We recommend using uv with Python 3.13 for the best experience.
Install Codegen
uv pip install codegenIn order to use the codegen API you will need to generate a token here
Your environment is now ready to use the codegen API!
Within the examples folder, each subdirectory contains a self-contained example with:
- An explanation of the use case (
README.md) - Files that leverage codegen for powerful applications
- Agent Tasks - Examples of using the
Agentclass to create and run AI-powered agents - Codebase Analysis - Examples of using the
Codebaseclass to analyze and manipulate code - Custom Functions - Examples of using the
functiondecorator andCodegenAppclass - Codecov Agent Trigger - Example of integrating Codegen with Codecov
For a detailed overview of all examples, see examples.md.
Have a useful example to share? We'd love to include it! Please see our Contributing Guide for instructions.
The Apache 2.0 license.