diff --git a/docs/introduction/api.mdx b/docs/introduction/api.mdx new file mode 100644 index 000000000..09e50afa1 --- /dev/null +++ b/docs/introduction/api.mdx @@ -0,0 +1,77 @@ +--- +title: "Codegen SDK" +sidebarTitle: "API" +icon: "code" +iconType: "solid" +--- + +The [Codegen SDK](https://github.com/codegen-sh/codegen-sdk) enables developers to programmatically interact with [Codegen](https://codegen.com) SWE agents via API. + + + Go to [developer settings](https://codegen.sh/token) to generate an API token + + +```python +from codegen import Agent + +# Initialize the Agent with your organization ID and API token +agent = Agent(org_id="...", token="...") + +# Run an agent with a prompt +task = agent.run(prompt="Leave a review on PR #123") + +# Check the initial status +print(task.status) + +# Refresh the task to get updated status (tasks can take time) +task.refresh() + +if task.status == "completed": + print(task.result) # Result often contains code, summaries, or links +``` + + + Codegen agents can research code, create PRs, modify Linear tickets, and more. + + +## Installation + +Install the SDK using pip or uv: + +```bash +pip install codegen +# or +uv pip install codegen +``` + +## What can I do with the Codegen SDK? + +The Codegen SDK is your gateway to programmatically interacting with your AI Software Engineer. You can use it to: + +- **Automate development tasks**: Assign tasks like implementing features, fixing bugs, writing tests, or improving documentation to the agent. +- **Integrate AI into your workflows**: Trigger agent tasks from your CI/CD pipelines, scripts, or other development tools. +- **Provide context and guidance**: Supply the agent with specific instructions, relevant code snippets, or background information to ensure it performs tasks according to your requirements. + +Essentially, the SDK allows you to leverage Codegen's AI capabilities wherever you can run Python code. + +## Get Started + +import { + COMMUNITY_SLACK_URL, + CODEGEN_SDK_GITHUB_URL, +} from "/snippets/links.mdx"; + + + + Sign up for a free account and get your API token. + + + Get help and connect with the Codegen community. + + + Learn how to use Codegen for common code transformation tasks. + + + Star us on GitHub and contribute to the project. + + diff --git a/docs/introduction/overview.mdx b/docs/introduction/overview.mdx index 8e945f419..3348fb075 100644 --- a/docs/introduction/overview.mdx +++ b/docs/introduction/overview.mdx @@ -1,77 +1,114 @@ --- -title: "Codegen" +title: "Overview" sidebarTitle: "Overview" -icon: "code" +icon: "robot" iconType: "solid" --- -The [Codegen SDK](https://github.com/codegen-sh/codegen-sdk) enables developers to programmatically interact with [Codegen](https://codegen.com) SWE agents via API. +Codegen Agent - - Go to [developer settings](https://codegen.sh/token) to generate an API token - +## Codegen - The SWE that Never Sleeps -```python -from codegen import Agent +Codegen provides intelligent AI agents designed to seamlessly integrate into your existing developer workflows and automate a wide range of software engineering tasks. Think of it as an AI coworker that can understand and solve coding challenges, access your codebase instantly without pre-indexing, and interact directly with your development tools. -# Initialize the Agent with your organization ID and API token -agent = Agent(org_id="...", token="...") +Our mission is to build fully-autonomous software engineering, empowering human developers to focus on higher-level problems by handling routine tasks. -# Run an agent with a prompt -task = agent.run(prompt="Leave a review on PR #123") +## What Can Codegen Agents Do? -# Check the initial status -print(task.status) +Codegen agents come equipped with a versatile set of tools and capabilities: -# Refresh the task to get updated status (tasks can take time) -task.refresh() - -if task.status == "completed": - print(task.result) # Result often contains code, summaries, or links -``` - - - Codegen agents can research code, create PRs, modify Linear tickets, and more. - - -## Installation - -Install the SDK using pip or uv: - -```bash -pip install codegen -# or -uv pip install codegen -``` + + + Analyze requirements, implement features, fix bugs, write tests, and improve + documentation based on your prompts. + + + Review PRs, suggest changes, comment on issues, create branches, commit + code, and manage repositories. + + + Update ticket statuses, add comments, link PRs to issues, and create new + tasks based on findings. + + + Send notifications, ask for clarification, report progress, and interact + directly with your team in Slack channels. + + + Safely run code, install dependencies, and test changes in an isolated + environment. + + + Access up-to-date information, research libraries, and find documentation + online. + + -## What can I do with the Codegen SDK? +## Get Started in Minutes -The Codegen SDK is your gateway to programmatically interacting with your AI Software Engineer. You can use it to: +Integrating Codegen into your workflow is designed to be quick and easy: -- **Automate development tasks**: Assign tasks like implementing features, fixing bugs, writing tests, or improving documentation to the agent. -- **Integrate AI into your workflows**: Trigger agent tasks from your CI/CD pipelines, scripts, or other development tools. -- **Provide context and guidance**: Supply the agent with specific instructions, relevant code snippets, or background information to ensure it performs tasks according to your requirements. + + + Install the GitHub App to grant the agent access to your repositories. No + complex setup required. + + + Add the Codegen Slack App to communicate with the agent directly in your + workspace. + + + Connect your Linear workspace to enable agent interactions with your issues. + + + Programmatically interact with agents using the Python SDK for advanced + automation. + + -Essentially, the SDK allows you to leverage Codegen's AI capabilities wherever you can run Python code. +## Enterprise-Grade Security -## Get Started +Codegen is SOC 2 Type II certified, ensuring your code and data are handled with the highest standards for security, privacy, and compliance. -import { - COMMUNITY_SLACK_URL, - CODEGEN_SDK_GITHUB_URL, -} from "/snippets/links.mdx"; +## Ready to Start? - - Sign up for a free account and get your API token. + + Codegen is free to install. Get started in just a few clicks. - - Get help and connect with the Codegen community. - - + Learn how to use Codegen for common code transformation tasks. - - Star us on GitHub and contribute to the project. - diff --git a/docs/mint.json b/docs/mint.json index a78c2d711..b56b672e1 100644 --- a/docs/mint.json +++ b/docs/mint.json @@ -69,6 +69,7 @@ "pages": [ "introduction/overview", "introduction/capabilities", + "introduction/api", "introduction/prompting", "introduction/community", "introduction/about",