Skip to content

Commit 9dfa558

Browse files
authored
docs: new overview page + API page (#1044)
1 parent 3110367 commit 9dfa558

File tree

3 files changed

+169
-54
lines changed

3 files changed

+169
-54
lines changed

docs/introduction/api.mdx

+77
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
---
2+
title: "Codegen SDK"
3+
sidebarTitle: "API"
4+
icon: "code"
5+
iconType: "solid"
6+
---
7+
8+
The [Codegen SDK](https://github.com/codegen-sh/codegen-sdk) enables developers to programmatically interact with [Codegen](https://codegen.com) SWE agents via API.
9+
10+
<Tip>
11+
Go to [developer settings](https://codegen.sh/token) to generate an API token
12+
</Tip>
13+
14+
```python
15+
from codegen import Agent
16+
17+
# Initialize the Agent with your organization ID and API token
18+
agent = Agent(org_id="...", token="...")
19+
20+
# Run an agent with a prompt
21+
task = agent.run(prompt="Leave a review on PR #123")
22+
23+
# Check the initial status
24+
print(task.status)
25+
26+
# Refresh the task to get updated status (tasks can take time)
27+
task.refresh()
28+
29+
if task.status == "completed":
30+
print(task.result) # Result often contains code, summaries, or links
31+
```
32+
33+
<Note>
34+
Codegen agents can research code, create PRs, modify Linear tickets, and more.
35+
</Note>
36+
37+
## Installation
38+
39+
Install the SDK using pip or uv:
40+
41+
```bash
42+
pip install codegen
43+
# or
44+
uv pip install codegen
45+
```
46+
47+
## What can I do with the Codegen SDK?
48+
49+
The Codegen SDK is your gateway to programmatically interacting with your AI Software Engineer. You can use it to:
50+
51+
- **Automate development tasks**: Assign tasks like implementing features, fixing bugs, writing tests, or improving documentation to the agent.
52+
- **Integrate AI into your workflows**: Trigger agent tasks from your CI/CD pipelines, scripts, or other development tools.
53+
- **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.
54+
55+
Essentially, the SDK allows you to leverage Codegen's AI capabilities wherever you can run Python code.
56+
57+
## Get Started
58+
59+
import {
60+
COMMUNITY_SLACK_URL,
61+
CODEGEN_SDK_GITHUB_URL,
62+
} from "/snippets/links.mdx";
63+
64+
<CardGroup cols={2}>
65+
<Card title="Create Account" icon="user-plus" href="https://codegen.sh/login">
66+
Sign up for a free account and get your API token.
67+
</Card>
68+
<Card title="Join our Slack" icon="slack" href={COMMUNITY_SLACK_URL}>
69+
Get help and connect with the Codegen community.
70+
</Card>
71+
<Card title="Tutorials" icon="diagram-project" href="/tutorials/at-a-glance">
72+
Learn how to use Codegen for common code transformation tasks.
73+
</Card>
74+
<Card title="View on GitHub" icon="github" href={CODEGEN_SDK_GITHUB_URL}>
75+
Star us on GitHub and contribute to the project.
76+
</Card>
77+
</CardGroup>

docs/introduction/overview.mdx

+91-54
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,114 @@
11
---
2-
title: "Codegen"
2+
title: "Overview"
33
sidebarTitle: "Overview"
4-
icon: "code"
4+
icon: "robot"
55
iconType: "solid"
66
---
77

8-
The [Codegen SDK](https://github.com/codegen-sh/codegen-sdk) enables developers to programmatically interact with [Codegen](https://codegen.com) SWE agents via API.
8+
<img
9+
src="/images/codegen.jpeg"
10+
alt="Codegen Agent"
11+
style={{ borderRadius: "8px", marginBottom: "1.5em" }}
12+
/>
913

10-
<Tip>
11-
Go to [developer settings](https://codegen.sh/token) to generate an API token
12-
</Tip>
14+
## Codegen - The SWE that Never Sleeps
1315

14-
```python
15-
from codegen import Agent
16+
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.
1617

17-
# Initialize the Agent with your organization ID and API token
18-
agent = Agent(org_id="...", token="...")
18+
Our mission is to build fully-autonomous software engineering, empowering human developers to focus on higher-level problems by handling routine tasks.
1919

20-
# Run an agent with a prompt
21-
task = agent.run(prompt="Leave a review on PR #123")
20+
## What Can Codegen Agents Do?
2221

23-
# Check the initial status
24-
print(task.status)
22+
Codegen agents come equipped with a versatile set of tools and capabilities:
2523

26-
# Refresh the task to get updated status (tasks can take time)
27-
task.refresh()
28-
29-
if task.status == "completed":
30-
print(task.result) # Result often contains code, summaries, or links
31-
```
32-
33-
<Note>
34-
Codegen agents can research code, create PRs, modify Linear tickets, and more.
35-
</Note>
36-
37-
## Installation
38-
39-
Install the SDK using pip or uv:
40-
41-
```bash
42-
pip install codegen
43-
# or
44-
uv pip install codegen
45-
```
24+
<CardGroup cols={2}>
25+
<Card title="Understand & Solve Code Tasks" icon="code-branch">
26+
Analyze requirements, implement features, fix bugs, write tests, and improve
27+
documentation based on your prompts.
28+
</Card>
29+
<Card
30+
title="Seamless GitHub Integration"
31+
icon="github"
32+
href="/integrations/github"
33+
>
34+
Review PRs, suggest changes, comment on issues, create branches, commit
35+
code, and manage repositories.
36+
</Card>
37+
<Card
38+
title="Linear Task Management"
39+
icon="pencil"
40+
href="/integrations/linear"
41+
>
42+
Update ticket statuses, add comments, link PRs to issues, and create new
43+
tasks based on findings.
44+
</Card>
45+
<Card title="Slack Communication" icon="slack" href="/integrations/slack">
46+
Send notifications, ask for clarification, report progress, and interact
47+
directly with your team in Slack channels.
48+
</Card>
49+
<Card
50+
title="Code Execution Sandbox"
51+
icon="box"
52+
href="/integrations/sandboxes"
53+
>
54+
Safely run code, install dependencies, and test changes in an isolated
55+
environment.
56+
</Card>
57+
<Card title="Web Search" icon="globe" href="/integrations/web-search">
58+
Access up-to-date information, research libraries, and find documentation
59+
online.
60+
</Card>
61+
</CardGroup>
4662

47-
## What can I do with the Codegen SDK?
63+
## Get Started in Minutes
4864

49-
The Codegen SDK is your gateway to programmatically interacting with your AI Software Engineer. You can use it to:
65+
Integrating Codegen into your workflow is designed to be quick and easy:
5066

51-
- **Automate development tasks**: Assign tasks like implementing features, fixing bugs, writing tests, or improving documentation to the agent.
52-
- **Integrate AI into your workflows**: Trigger agent tasks from your CI/CD pipelines, scripts, or other development tools.
53-
- **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.
67+
<CardGroup cols={2}>
68+
<Card
69+
title="One-Click GitHub Install"
70+
icon="github"
71+
href="https://github.com/apps/codegen-sh"
72+
>
73+
Install the GitHub App to grant the agent access to your repositories. No
74+
complex setup required.
75+
</Card>
76+
<Card
77+
title="Connect Slack"
78+
icon="slack"
79+
href="https://codegen.sh/integrations"
80+
>
81+
Add the Codegen Slack App to communicate with the agent directly in your
82+
workspace.
83+
</Card>
84+
<Card
85+
title="Link Linear"
86+
icon="pencil"
87+
href="https://codegen.sh/integrations"
88+
>
89+
Connect your Linear workspace to enable agent interactions with your issues.
90+
</Card>
91+
<Card title="Use the API/SDK" icon="code" href="/introduction/api">
92+
Programmatically interact with agents using the Python SDK for advanced
93+
automation.
94+
</Card>
95+
</CardGroup>
5496

55-
Essentially, the SDK allows you to leverage Codegen's AI capabilities wherever you can run Python code.
97+
## Enterprise-Grade Security
5698

57-
## Get Started
99+
Codegen is SOC 2 Type II certified, ensuring your code and data are handled with the highest standards for security, privacy, and compliance.
58100

59-
import {
60-
COMMUNITY_SLACK_URL,
61-
CODEGEN_SDK_GITHUB_URL,
62-
} from "/snippets/links.mdx";
101+
## Ready to Start?
63102

64103
<CardGroup cols={2}>
65-
<Card title="Create Account" icon="user-plus" href="https://codegen.sh/login">
66-
Sign up for a free account and get your API token.
104+
<Card title="Install Now" icon="download" href="https://codegen.sh/install">
105+
Codegen is free to install. Get started in just a few clicks.
67106
</Card>
68-
<Card title="Join our Slack" icon="slack" href={COMMUNITY_SLACK_URL}>
69-
Get help and connect with the Codegen community.
70-
</Card>
71-
<Card title="Tutorials" icon="diagram-project" href="/tutorials/at-a-glance">
107+
<Card
108+
title="Explore Tutorials"
109+
icon="diagram-project"
110+
href="/tutorials/at-a-glance"
111+
>
72112
Learn how to use Codegen for common code transformation tasks.
73113
</Card>
74-
<Card title="View on GitHub" icon="github" href={CODEGEN_SDK_GITHUB_URL}>
75-
Star us on GitHub and contribute to the project.
76-
</Card>
77114
</CardGroup>

docs/mint.json

+1
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@
6969
"pages": [
7070
"introduction/overview",
7171
"introduction/capabilities",
72+
"introduction/api",
7273
"introduction/prompting",
7374
"introduction/community",
7475
"introduction/about",

0 commit comments

Comments
 (0)