Orion Python SDK
Python 3.10+ SDK backed by an in-process abi3 PyO3 module. The supported API is
intentionally small: Agent, provider models such as OpenAI, typed results,
lifecycle events, and SDK errors.
import asyncio
from dataclasses import dataclass
from orion_sdk import Agent, OpenAI
@dataclass(frozen=True, slots=True)
class WeatherResult:
city: str
temperature_c: int
@dataclass(frozen=True, slots=True)
class WeatherAnswer:
city: str
temperature_c: int
summary: str
async def get_weather(city: str) -> WeatherResult:
"""Get the current weather for a city."""
return WeatherResult(city, 31)
async def main() -> None:
agent = Agent(
model=OpenAI("gpt-5-mini"),
tools=[get_weather],
output=WeatherAnswer,
instructions="Use the weather tool.",
)
result = await agent.run("What is the weather in Delhi?")
print(result.output.summary)
if __name__ == "__main__":
asyncio.run(main())
Function annotations and docstrings define the tool contract. The SDK derives
schemas internally; Rust validates tool arguments and terminal structured
output; result.output is already the configured Python type.
Use agent.stream(...) for ordered lifecycle events followed by one typed
AgentResult. Registry, runner, codec, raw-schema, adapter, model-reference,
protocol, and native-session APIs are internal and unsupported for application
use.
OrionError exposes the stable Rust error category and retry metadata without
requiring access to runtime internals:
from orion_sdk import Agent, ErrorCode, OrionError
async def run_weather(agent: Agent[WeatherAnswer]) -> None:
try:
result = await agent.run("What is the weather in Delhi?")
print(result.output.summary)
except OrionError as error:
if error.code is ErrorCode.RATE_LIMITED and error.retryable:
print(f"retry after {error.retry_after_ms} ms")
raise
Cancelling the calling task still raises asyncio.CancelledError; Orion does not
replace structured task cancellation with a generic SDK error.
See the complete weather application.
Install for local development
python3.10 -m venv .venv
source .venv/bin/activate
python -m pip install --upgrade pip maturin
cd sdks/python
maturin develop --release
cd ../..
python -m examples.python.weather_agent.main
The example calls an OpenAI-compatible endpoint and requires OPENAI_API_KEY.
To build a distributable wheel without installing it, run:
cd sdks/python
uvx maturin build --release --locked
Metadata
Release files for orion-agent-sdk 0.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orion_agent_sdk-0.0.1.tar.gz | 42.9 kB | With provenance | Details for orion_agent_sdk-0.0.1.tar.gz |
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orion_agent_sdk-0.0.1-cp310-abi3-win_amd64.whl | CPython 3.10 | abi3 | Windows x86-64 | Details for orion_agent_sdk-0.0.1-cp310-abi3-win_amd64.whl |
| orion_agent_sdk-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for orion_agent_sdk-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
| orion_agent_sdk-0.0.1-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for orion_agent_sdk-0.0.1-cp310-abi3-macosx_11_0_arm64.whl |
Total release size: 6.2 MB
Release files / orion_agent_sdk-0.0.1.tar.gz
| Download URL | orion_agent_sdk-0.0.1.tar.gz |
|---|---|
| Size | 42.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3cb18899adeb4a58bd3c7aa9ccffb3c0a58c84ae207ecf6b260667ff03e0f255
|
|
BLAKE2b-256 checksum How to use checksums |
5b3830c398caf440b62fb0a6e848e2f88d174eb3d02c866d7cb8d48505d15fa1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / orion_agent_sdk-0.0.1-cp310-abi3-win_amd64.whl
| Download URL | orion_agent_sdk-0.0.1-cp310-abi3-win_amd64.whl |
|---|---|
| Size | 2.1 MB |
| Tags | CPython 3.10 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
fd1bc0605a68a3822562b24fcb5e532c8ed61e361c188cab7135b638ee212b89
|
|
BLAKE2b-256 checksum How to use checksums |
95b8696f497778548cd1f52ee1ece2420d749754751b4e47fb0b94d4007a921c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / orion_agent_sdk-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | orion_agent_sdk-0.0.1-cp310-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
985ce895e6a3f954c3ad5375abbdb9bc664e21abb003095ef0d99996fad741bf
|
|
BLAKE2b-256 checksum How to use checksums |
9dab65603de301b498e5c8e29a064811ca02cc0286adf837b4874279d4db55f5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logRelease files / orion_agent_sdk-0.0.1-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | orion_agent_sdk-0.0.1-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.9 MB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
edbbfb0ff2484b1bd7f28b648fb0d5e3e3d6d3178fe0bfec24d0adcc5066ed20
|
|
BLAKE2b-256 checksum How to use checksums |
edd2a23ba14976315cf64ac9b71fc31265a300c8774ab375e5b63bf55aab1236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logSecurity for orion-agent-sdk 0.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 4 files in this release have been uploaded with provenance metadata.
Attestation for orion_agent_sdk-0.0.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 16, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.