Skip to main content

Scriptable interface to a powerful, multi-lingual language server built on top of Tree-sitter

Project description


The SWE that Never Sleeps

PyPI Documentation Slack Community License Follow on X


The Codegen SDK provides a programmatic interface to code agents provided by Codegen.

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, pipx, or uv:

pip install codegen
# or
pipx install codegen
# or
uv tool install codegen

Keeping Up to Date

The Codegen CLI includes a built-in self-update system:

# Update to the latest version
codegen update

# Check for available updates
codegen update --check

# Update to a specific version
codegen update --version 1.2.3

The CLI automatically checks for updates daily and notifies you when a new version is available.

Get started at codegen.com and get your API token at 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

Contributing

Please see our Contributing Guide for instructions on how to set up the development environment and submit contributions.

Enterprise

For more information on enterprise engagements, please contact us or request a demo.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

codegen-0.57.0-py3-none-any.whl (196.0 kB view details)

Uploaded Python 3

File details

Details for the file codegen-0.57.0-py3-none-any.whl.

File metadata

  • Download URL: codegen-0.57.0-py3-none-any.whl
  • Upload date:
  • Size: 196.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.5

File hashes

Hashes for codegen-0.57.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0118185d6373449e130f97b0675e6829e7d1dbc6cd305feaa0e8f7ace4a18964
MD5 f187a50763dfdefb7c922da05d6cf5c7
BLAKE2b-256 2b7b85be8cb564236f6ff1cee3f5b581ac599e80de8f28c6a7b48d89ae2f3edb

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page