Regent SDK
pip install regent-sdk
Usage
import regent
regent.init(api_key="your-regent-api-key")
# All OpenAI/Anthropic clients instantiated after this call
# will automatically route through Regent's proxy.
# Must be called before importing or instantiating OpenAI/Anthropic clients.
from openai import OpenAI
client = OpenAI() # automatically proxied
Local development
regent.init(api_key="your-regent-api-key", proxy_url="http://localhost:8000")
What gets proxied
Only LLM calls made without an explicit api_key argument are routed through Regent. If you pass your own api_key when constructing a client, the SDK leaves that client untouched — this is intentional so auxiliary clients (e.g. embeddings, sidecar services) are never accidentally rerouted.
OpenAI() # proxied — Regent injects base_url + api_key
OpenAI(api_key="sk-...") # not proxied — your key, your endpoint
Privacy
Regent only proxies traffic from your test runs (GitHub Actions / CI). We do not intercept or touch your production traffic. If REGENT_ENABLED is not set to "true", regent.init() is a no-op and nothing is patched.
Publishing to PyPI
# First time setup
pip install hatch twine
# Build
cd sdk/python
hatch build
# Publish (prompts for PyPI credentials)
twine upload dist/*
# For subsequent releases — bump version in pyproject.toml, then:
hatch build
twine upload dist/*
Metadata
Release files for regent-sdk 0.1.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| regent_sdk-0.1.10.tar.gz | 4.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| regent_sdk-0.1.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.6 kB
Release files / regent_sdk-0.1.10.tar.gz
| Download URL | regent_sdk-0.1.10.tar.gz |
|---|---|
| Size | 4.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bda3d63ef8a0142f8b4d3b4782d95325bd6a4d7c06f9326734b23a13ae3d4640
|
|
BLAKE2b-256 checksum How to use checksums |
f0a65a87b11b14a68b300c7f577985306497179f1f29c5ca273339aebf472132
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|
Release files / regent_sdk-0.1.10-py3-none-any.whl
| Download URL | regent_sdk-0.1.10-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
558a15195d0afb4c4f1be59908563e001aa472782a812f2e6a4486d8e4db82f7
|
|
BLAKE2b-256 checksum How to use checksums |
f4a071f676523eb23c2f8cc0296febbf0227c041392831be7ab0b910a1029873
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.11.2
|