Skip to content

Commit 1bfc54f

Browse files
authored
docs: prioritizes agent info (#1033)
1 parent 590ce81 commit 1bfc54f

17 files changed

+1596
-613
lines changed

README.md

+28-64
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
</p>
88

99
<h2 align="center">
10-
Scriptable interface to a powerful, multi-lingual language server.
10+
The SWE that Never Sleeps
1111
</h2>
1212

1313
<div align="center">
@@ -22,72 +22,48 @@
2222

2323
<br />
2424

25-
[Codegen](https://docs.codegen.com) is a python library for manipulating codebases.
25+
The Codegen SDK provides a programmatic interface to code agents provided by [Codegen](https://codegen.com).
2626

2727
```python
28-
from codegen import Codebase
29-
30-
# Codegen builds a complete graph connecting
31-
# functions, classes, imports and their relationships
32-
codebase = Codebase("./")
33-
34-
# Work with code without dealing with syntax trees or parsing
35-
for function in codebase.functions:
36-
# Comprehensive static analysis for references, dependencies, etc.
37-
if not function.usages:
38-
# Auto-handles references and imports to maintain correctness
39-
function.move_to_file("deprecated.py")
40-
```
41-
42-
Write code that transforms code. Codegen combines the parsing power of [Tree-sitter](https://tree-sitter.github.io/tree-sitter/) with the graph algorithms of [rustworkx](https://github.com/Qiskit/rustworkx) to enable scriptable, multi-language code manipulation at scale.
28+
from codegen.agents.agent import Agent
4329

44-
## Installation and Usage
30+
# Initialize the Agent with your organization ID and API token
31+
agent = Agent(
32+
org_id="YOUR_ORG_ID", # Find this at codegen.com/developer
33+
token="YOUR_API_TOKEN", # Get this from codegen.com/developer
34+
# base_url="https://codegen-sh-rest-api.modal.run", # Optional - defaults to production
35+
)
4536

46-
We support
37+
# Run an agent with a prompt
38+
task = agent.run(prompt="Implement a new feature to sort users by last login.")
4739

48-
- Running Codegen in Python 3.12 - 3.13 (recommended: Python 3.13+)
49-
- macOS and Linux
50-
- macOS is supported
51-
- Linux is supported on x86_64 and aarch64 with glibc 2.34+
52-
- Windows is supported via WSL. See [here](https://docs.codegen.com/building-with-codegen/codegen-with-wsl) for more details.
53-
- Python, Typescript, Javascript and React codebases
40+
# Check the initial status
41+
print(task.status)
5442

55-
```
56-
# Install inside existing project
57-
uv pip install codegen
43+
# Refresh the task to get updated status (tasks can take time)
44+
task.refresh()
5845

59-
# Install global CLI
60-
uv tool install codegen --python 3.13
46+
# Check the updated status
47+
print(task.status)
6148

62-
# Create a codemod for a given repo
63-
cd path/to/repo
64-
codegen init
65-
codegen create test-function
66-
67-
# Run the codemod
68-
codegen run test-function
69-
70-
# Create an isolated venv with codegen => open jupyter
71-
codegen notebook
49+
# Once task is complete, you can access the result
50+
if task.status == "completed":
51+
print(task.result) # Result often contains code, summaries, or links
7252
```
7353

74-
## Usage
54+
## Installation and Usage
7555

76-
See [Getting Started](https://docs.codegen.com/introduction/getting-started) for a full tutorial.
56+
Install the SDK using pip or uv:
7757

58+
```bash
59+
pip install codegen
60+
# or
61+
uv pip install codegen
7862
```
79-
from codegen import Codebase
80-
```
81-
82-
## Troubleshooting
83-
84-
Having issues? Here are some common problems and their solutions:
8563

86-
- **I'm hitting an UV error related to `[[ packages ]]`**: This means you're likely using an outdated version of UV. Try updating to the latest version with: `uv self update`.
87-
- **I'm hitting an error about `No module named 'codegen.sdk.extensions.utils'`**: The compiled cython extensions are out of sync. Update them with `uv sync --reinstall-package codegen`.
88-
- **I'm hitting a `RecursionError: maximum recursion depth exceeded` error while parsing my codebase**: If you are using python 3.12, try upgrading to 3.13. If you are already on 3.13, try upping the recursion limit with `sys.setrecursionlimit(10000)`.
64+
Get started at [codegen.com](https://codegen.com) and get your API token at [codegen.com/developer](https://codegen.com/developer).
8965

90-
If you run into additional issues not listed here, please [join our slack community](https://community.codegen.com) and we'll help you out!
66+
You can interact with your AI engineer via API, or chat with it in Slack, Linear, Github, or on our website.
9167

9268
## Resources
9369

@@ -96,18 +72,6 @@ If you run into additional issues not listed here, please [join our slack commun
9672
- [Contributing](CONTRIBUTING.md)
9773
- [Contact Us](https://codegen.com/contact)
9874

99-
## Why Codegen?
100-
101-
Software development is fundamentally programmatic. Refactoring a codebase, enforcing patterns, or analyzing control flow - these are all operations that can (and should) be expressed as programs themselves.
102-
103-
We built Codegen backwards from real-world refactors performed on enterprise codebases. Instead of starting with theoretical abstractions, we focused on creating APIs that match how developers actually think about code changes:
104-
105-
- **Natural mental model**: Write transforms that read like your thought process - "move this function", "rename this variable", "add this parameter". No more wrestling with ASTs or manual import management.
106-
107-
- **Battle-tested on complex codebases**: Handle Python, TypeScript, and React codebases with millions of lines of code.
108-
109-
- **Built for advanced intelligences**: As AI developers become more sophisticated, they need expressive yet precise tools to manipulate code. Codegen provides a programmatic interface that both humans and AI can use to express complex transformations through code itself.
110-
11175
## Contributing
11276

11377
Please see our [Contributing Guide](CONTRIBUTING.md) for instructions on how to set up the development environment and submit contributions.

docs/graph-sitter/about.mdx

+72
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
---
2+
title: "Codegen, Inc."
3+
sidebarTitle: "About Us"
4+
icon: "building"
5+
iconType: "solid"
6+
---
7+
8+
<Card
9+
img="/images/codegen.jpeg"
10+
title="Codegen, Inc."
11+
href="https://codegen.com"
12+
/>
13+
14+
## Our Mission
15+
16+
Our mission is to build fully-autonomous software engineering - the equivalent of self-driving cars for code.
17+
18+
We believe the highest leverage path to autonomous development is enabling AI agents to "act via code."
19+
20+
Just as self-driving cars need sophisticated sensors and controls to navigate the physical world, AI agents need powerful, precise tools to manipulate codebases. We're building that foundational layer: a programmatic interface that lets AI agents express complex code transformations through code itself.
21+
22+
This approach creates a shared language that both humans and AI can use to:
23+
24+
- Express powerful changes with precision and predictability
25+
- Build sophisticated tools from primitive operations
26+
- Create and maintain their own abstractions
27+
- Scale transformations across massive codebases
28+
29+
## The Team
30+
31+
Based in San Francisco, we're a team of engineers and researchers passionate about:
32+
33+
- Making large-scale code changes more accessible
34+
- Building tools that work the way developers think
35+
- Creating the infrastructure for AI-powered code manipulation
36+
- Advancing the state of the art in program transformation
37+
38+
## Open Source
39+
40+
We believe in the power of open source software. Our core library, [codegen](https://github.com/codegen-sh/codegen-sdk), is freely available and open to contributions from the community.
41+
42+
## Join Us
43+
44+
<CardGroup cols={2}>
45+
<Card title="Careers" icon="briefcase" href="https://codegen.com/careers">
46+
We're hiring! Join us in building the future of code transformation.
47+
</Card>
48+
<Card title="Community" icon="people-group" href="/introduction/community">
49+
Connect with other developers and share your Codegen experiences.
50+
</Card>
51+
</CardGroup>
52+
53+
## Connect with Us
54+
55+
<CardGroup cols={2}>
56+
<Card title="X (Twitter)" icon="twitter" href="https://x.com/codegen">
57+
Follow us for updates and announcements
58+
</Card>
59+
<Card
60+
title="LinkedIn"
61+
icon="linkedin"
62+
href="https://linkedin.com/company/codegen-dot-com"
63+
>
64+
Connect with our team and stay updated on company news
65+
</Card>
66+
</CardGroup>
67+
68+
<Note>
69+
Want to learn more about what we're building? Check out our [getting started
70+
guide](/introduction/getting-started) or join our [community
71+
Slack](https://community.codegen.com).
72+
</Note>

0 commit comments

Comments
 (0)