We use UV for fast, modern Python package management. UV automatically handles Python installation and virtual environment management.
# Setup environment and dependencies
$ uv sync --all-extras --group dev
# Install pre-commit hooks
$ uv run task setup-pre-commitIf you prefer to install UV manually:
# Install UV - https://docs.astral.sh/uv/getting-started/installation/
$ curl -LsSf https://astral.sh/uv/install.sh | sh
# Install dependencies
$ uv sync --all-extras --group devYou can then run commands using uv run or by activating the virtual environment:
# Activate the virtual environment
$ source .venv/bin/activate
# Now you can omit the `uv run` prefix
$ python script.pyMost of the SDK is generated code. Modifications to code will be persisted between generations, but may
result in merge conflicts between manual patches and changes from the generator. The generator will never
modify the contents of the src/agentex/lib/ and examples/ directories.
All files in the examples/ directory are not modified by the generator and can be freely edited or added to.
# add an example to examples/<your-example>.py
#!/usr/bin/env -S uv run python
…$ chmod +x examples/<your-example>.py
# run the example against your api
$ ./examples/<your-example>.pyIf you’d like to use the repository from source, you can either install from git or link to a cloned repository:
To install via git:
$ pip install git+ssh://git@github.com/scaleapi/agentex-python.gitAlternatively, you can build from source and install the wheel file:
Building this package will create two files in the dist/ directory, a .tar.gz containing the source files and a .whl that can be used to install the package efficiently.
To create a distributable version of the library, all you have to do is run this command:
$ uv build
# or
$ uv run task ci-buildThen to install:
$ pip install ./path-to-wheel-file.whlWe use Taskipy to manage development tasks. All commands are defined in pyproject.toml and can be run with uv run task <command>.
# Run tests with automatic mock server management
$ uv run task test
# Or run tests directly (no mock server setup)
$ uv run pytestThe test command automatically handles Prism mock server setup and teardown using the OpenAPI spec.
# Format code and documentation
$ uv run task format
# Run all linting checks
$ uv run task lint
# Run type checking only
$ uv run task typecheck# See all available tasks
$ uv run task --listKey tasks:
format- Format code with Ruff and documentationlint- Run all checks (Ruff + type checking + import validation)test- Run tests with mock server orchestrationmock- Start standalone mock API serversetup-pre-commit- Install pre-commit hooks
Changes made to this repository via the automated release PR pipeline should publish to PyPI automatically. If the changes aren't made through the automated pipeline, you may want to make releases manually.
You can release to package managers by using the Publish PyPI GitHub action. This requires a setup organization or repository secret to be set up.
If you need to manually release a package, you can use UV directly:
$ uv build
$ uv publish --token $PYPI_TOKENThis repository is setup with some pre-canned prompts for Claude Code as well as Cursor.
Access to Cursor can be acquired by asking for it in #it-help. Then just loading this repo in the Cursor IDE should enable the prompts.
npm install -g @anthropic-ai/claude-codeVisit the LiteLLM User Guide to request your API key.
export ANTHROPIC_AUTH_TOKEN=${LITELLM_PROXY_API_KEY}
export ANTHROPIC_BASE_URL="https://litellm.ml-serving-internal.scale.com"claudeThis should be run from inside the main repo directory. If you run the command from a terminal inside VSCode, then Claude will use the VSCode editor to show diffs etc.