<br />
<p align="center">
<a href="https://docs.codegen.com">
<img src="https://i.imgur.com/6RF9W0z.jpeg" />
</a>
</p>
<h2 align="center">
The SWE that Never Sleeps
</h2>
<div align="center">
[](https://pypi.org/project/codegen/)
[](https://docs.codegen.com)
[](https://community.codegen.com)
[](https://github.com/codegen-sh/codegen-sdk/tree/develop?tab=Apache-2.0-1-ov-file)
[](https://x.com/codegen)
</div>
<br />
The Codegen SDK provides a programmatic interface to code agents provided by [Codegen](https://codegen.com).
```python
from codegen.agents.agent import Agent
# Initialize the Agent with your organization ID and API token
agent = Agent(
org_id="YOUR_ORG_ID", # Find this at codegen.com/token
token="YOUR_API_TOKEN", # Get this from codegen.com/token
# base_url="https://codegen-sh-rest-api.modal.run", # Optional - defaults to production
)
# Run an agent with a prompt
task = agent.run(prompt="Implement a new feature to sort users by last login.")
# Check the initial status
print(task.status)
# Refresh the task to get updated status (tasks can take time)
task.refresh()
# Check the updated status
print(task.status)
# Once task is complete, you can access the result
if task.status == "completed":
print(task.result) # Result often contains code, summaries, or links
```
## Installation and Usage
Install the SDK using pip or uv:
```bash
pip install codegen
# or
uv pip install codegen
```
Get started at [codegen.com](https://codegen.com) and get your API token at [codegen.com/token](https://codegen.com/token).
You can interact with your AI engineer via API, or chat with it in Slack, Linear, Github, or on our website.
## Resources
- [Docs](https://docs.codegen.com)
- [Getting Started](https://docs.codegen.com/introduction/getting-started)
- [Contributing](CONTRIBUTING.md)
- [Contact Us](https://codegen.com/contact)
## Contributing
Please see our [Contributing Guide](CONTRIBUTING.md) for instructions on how to set up the development environment and submit contributions.
## Enterprise
For more information on enterprise engagements, please [contact us](https://codegen.com/contact) or [request a demo](https://codegen.com/request-demo).
Raw data
{
"_id": null,
"home_page": null,
"name": "codegen",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.14,>=3.12",
"maintainer_email": null,
"keywords": "code generation, codebase, codebase analysis, codebase manipulation, codebase transformation, codegen, refactoring",
"author": null,
"author_email": "Codegen Team <team@codegen.sh>",
"download_url": null,
"platform": null,
"description": "<br />\n\n<p align=\"center\">\n <a href=\"https://docs.codegen.com\">\n <img src=\"https://i.imgur.com/6RF9W0z.jpeg\" />\n </a>\n</p>\n\n<h2 align=\"center\">\n The SWE that Never Sleeps\n</h2>\n\n<div align=\"center\">\n\n[](https://pypi.org/project/codegen/)\n[](https://docs.codegen.com)\n[](https://community.codegen.com)\n[](https://github.com/codegen-sh/codegen-sdk/tree/develop?tab=Apache-2.0-1-ov-file)\n[](https://x.com/codegen)\n\n</div>\n\n<br />\n\nThe Codegen SDK provides a programmatic interface to code agents provided by [Codegen](https://codegen.com).\n\n```python\nfrom codegen.agents.agent import Agent\n\n# Initialize the Agent with your organization ID and API token\nagent = Agent(\n org_id=\"YOUR_ORG_ID\", # Find this at codegen.com/token\n token=\"YOUR_API_TOKEN\", # Get this from codegen.com/token\n # base_url=\"https://codegen-sh-rest-api.modal.run\", # Optional - defaults to production\n)\n\n# Run an agent with a prompt\ntask = agent.run(prompt=\"Implement a new feature to sort users by last login.\")\n\n# Check the initial status\nprint(task.status)\n\n# Refresh the task to get updated status (tasks can take time)\ntask.refresh()\n\n# Check the updated status\nprint(task.status)\n\n# Once task is complete, you can access the result\nif task.status == \"completed\":\n print(task.result) # Result often contains code, summaries, or links\n```\n\n## Installation and Usage\n\nInstall the SDK using pip or uv:\n\n```bash\npip install codegen\n# or\nuv pip install codegen\n```\n\nGet started at [codegen.com](https://codegen.com) and get your API token at [codegen.com/token](https://codegen.com/token).\n\nYou can interact with your AI engineer via API, or chat with it in Slack, Linear, Github, or on our website.\n\n## Resources\n\n- [Docs](https://docs.codegen.com)\n- [Getting Started](https://docs.codegen.com/introduction/getting-started)\n- [Contributing](CONTRIBUTING.md)\n- [Contact Us](https://codegen.com/contact)\n\n## Contributing\n\nPlease see our [Contributing Guide](CONTRIBUTING.md) for instructions on how to set up the development environment and submit contributions.\n\n## Enterprise\n\nFor more information on enterprise engagements, please [contact us](https://codegen.com/contact) or [request a demo](https://codegen.com/request-demo).\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter",
"version": "0.56.21",
"project_urls": {
"Changelog": "https://docs.codegen.com/changelog/changelog",
"Documentation": "https://docs.codegen.com",
"Download": "https://github.com/codegen-sh/codegen-sdk/archive/09ad131fd5198e85cf4020518950ca30f5cb4731.zip",
"Homepage": "https://www.codegen.com/",
"Issues": "https://github.com/codegen-sh/codegen-sdk/issues",
"Playground": "https://www.codegen.sh/",
"Releasenotes": "https://github.com/codegen-sh/codegen-sdk/releases",
"Repository": "https://github.com/codegen-sh/codegen-sdk"
},
"split_keywords": [
"code generation",
" codebase",
" codebase analysis",
" codebase manipulation",
" codebase transformation",
" codegen",
" refactoring"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4f8ffb55a2ab0d38a1bb67a6530f596e4f456747e0f5f958f2bccc8fb7aeded5",
"md5": "70227a844626260c44b1be0641562642",
"sha256": "a567aaabe4ebda758d910acc41e8d20cd6862356b4e7150f0ca9bcd253e2f2cd"
},
"downloads": -1,
"filename": "codegen-0.56.21-py3-none-any.whl",
"has_sig": false,
"md5_digest": "70227a844626260c44b1be0641562642",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.14,>=3.12",
"size": 189685,
"upload_time": "2025-09-16T05:30:29",
"upload_time_iso_8601": "2025-09-16T05:30:29.797698Z",
"url": "https://files.pythonhosted.org/packages/4f/8f/fb55a2ab0d38a1bb67a6530f596e4f456747e0f5f958f2bccc8fb7aeded5/codegen-0.56.21-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-16 05:30:29",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "codegen-sh",
"github_project": "codegen-sdk",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "codegen"
}