Python SDK for OpalZero — the self-hosted AI kernel. Send an intent, get back structured data.
Project description
opalzero-sdk (Python)
Python client for OpalZero — the self-hosted AI kernel your app delegates to. Send a plain-English intent and the exact output schema you want; get back finished, structured data. Your app stops writing AI code.
🔭 OpalGlimpse — the first product built on OpalZero (coming soon)
Autonomous monitoring powered by OpalZero: point it at markets, competitors, or any signal — it runs on a schedule and shows you exactly what changed, as structured diffs, not noise. Watch the world change while you sleep.
It launches as a hosted SaaS, and we deploy it once there's enough interest. Want early access?
- 👍 or comment on the OpalGlimpse early-access issue →
- or email albertobarnabo@gmail.com
Meanwhile, run the OpalZero engine yourself today — bring your own API key.
Install
pip install opalzero-sdk
Quick start
import asyncio
from opalzero import OpalZeroClient
async def main():
async with OpalZeroClient(base_url="http://localhost:8000") as oz:
async for event in oz.execute("Analyse the EV market in Europe"):
if event.type == "task_completed":
print(f"[{event.role}] {event.result[:120]}")
if event.type == "mission_complete":
print("Done:", event.mission_state.data_payload)
asyncio.run(main())
Bring your own schema
Pass schema — a mapping of field name to type — and the kernel is contractually bound to return exactly that shape. No hallucinated fields, no missing keys, nothing to post-process. To the kernel, every task is the same task: an intent and the shape of its answer.
SCHEMA = {
"cheapest_model": "string",
"cheapest_price_usd": "number",
"cars": "array",
}
async with OpalZeroClient(base_url="http://localhost:8000") as oz:
async for event in oz.execute(
"Compare the 3 cheapest electric cars on sale today",
schema=SCHEMA,
):
if event.type == "mission_complete":
# event.mission_state.data_payload matches SCHEMA exactly
print(event.mission_state.data_payload)
Field types: string, number, boolean, array, object.
Self-host
See docker-compose.yml in the monorepo root, or the full docs.
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file opalzero_sdk-1.0.0.tar.gz.
File metadata
- Download URL: opalzero_sdk-1.0.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bff57a65de3b66d200ef45733ebb808accaf77e5a4213a2527b9cef58a34f71f
|
|
| MD5 |
2cf3b0f3bbfefb9b374f5890fc0e1578
|
|
| BLAKE2b-256 |
500f19ec05ca3374657850d12ceb41495a862d3ffdeb4f0922dbc02445e49b28
|
File details
Details for the file opalzero_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: opalzero_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a23bbe661bf699880bee3f0e9e2844fe61b49602b1a82079e856f78d5d65f6a
|
|
| MD5 |
1b12eb95b807ea9f902e9406ef741a7a
|
|
| BLAKE2b-256 |
a8f5b4396130364da84ca8602ce676ab0d1e72b0103d3f430877b18fabc27198
|