Oragon
Run AI models inside your own software — on a laptop, your own server or your own datacenter, CPU or GPU. Your data never leaves the machine.
pip install oragon
That is the whole install. The engine is inside the package: no compiler, no separate download, no signup, no API key.
from oragon import Oragon, Engine, LocalModel, user
client = Oragon(engine=Engine.EMBEDDED, model=LocalModel.QWEN2_5_0_5B)
reply = client.chat.generate(
model=LocalModel.QWEN2_5_0_5B,
messages=[user("Name one primary color.")],
)
print(reply.choices[0].message.content)
The model loads once and stays ready. Requests run side by side — four at once on the free tier, and as many as your machine holds on a paid plan.
Why Oragon
- It tells you when it doesn't know. You get valid data or a clear error, the exact label you asked for or "no match", a cited answer or an honest refusal. Never a guess dressed up as an answer.
- It fails like production software. Every error is a typed exception that says whether it is safe to retry. Memory is checked before a model loads.
- It behaves like a server. Requests are batched, shared prompts are cached, and when it is full it says "busy, try again" instead of hanging.
- It runs anywhere. The same code works on a laptop or a server.
- Your data stays yours. No telemetry, ever.
Quick start
oragon try # download a small model and chat with it
oragon try extract # turn text into validated JSON
oragon try rag # ask questions about your documents
oragon serve # run an OpenAI-compatible API on this machine
oragon doctor # check what this machine can run
The first run downloads the model and checks it. Set
ORAGON_AUTO_DOWNLOAD=0 to stop the SDK from ever going online.
What you can do
Everything in this section is free.
Get structured data
Pass a schema. You get data that matches it, or an ExtractionError —
nothing in between.
rows = client.chat.generate(
model=LocalModel.QWEN2_5_1_5B,
messages=[user(invoice_text)],
response_schema={"type": "array", "items": {
"type": "object",
"required": ["date", "amount"],
"properties": {"date": {"type": "string"}, "amount": {"type": "number"}},
}},
)
Make a decision
You get back one of the labels you offered, or matched=False.
decision = client.chat.generate(
model=LocalModel.QWEN2_5_1_5B,
messages=[user("Is 'J. Smith' the same person as 'John Smith'?")],
response_format={"type": "choice", "choices": ["SAME", "DIFFERENT"]},
)
print(decision.choice, decision.matched)
For harder calls, Settings(thinking=True) has the model check its own
answer first.
Use tools
Give it plain Python functions and act() runs the whole loop for you.
def get_weather(city: str) -> dict:
"""Current weather for a city."""
return {"city": city, "temp_c": 22}
reply = client.chat.act(
model=LocalModel.QWEN2_5_1_5B,
messages="What's the weather in Lagos?",
tools=[get_weather],
)
print(reply.choices[0].message.content)
- If a tool fails, the model sees the error and tries again.
- Pass
messagesas a list and the conversation is kept, so you can answer a follow-up question and carry on. - Several tool calls in one round run in parallel.
on_toolandon_roundlet you watch what it does.
Prefer to run the loop yourself? generate(tools=...) uses the same format as
the OpenAI client.
Ask questions about your documents
from oragon.rag import DocumentQA, EngineRetriever, ingest
retriever = EngineRetriever()
ingest(["handbook.md", "policy.pdf"], retriever)
qa = DocumentQA(client, model=LocalModel.QWEN2_5_1_5B, retriever=retriever)
result = qa.ask("How many vacation days do new hires get?")
if result.refused:
print("The documents don't say.")
else:
print(result.text) # with citations like [1]
for hit in result.sources: # the exact place in each file
print(hit.chunk.source, hit.chunk.start, hit.chunk.end)
It searches by words and by meaning, entirely on your machine. If nothing relevant is found, it refuses instead of guessing.
Stream and run async
for chunk in client.chat.generate(model=..., messages=[...], stream=True):
if isinstance(chunk, str):
print(chunk, end="", flush=True)
AsyncOragon has the same API with await, and parallel requests are
batched together.
Use your own model
oragon import ./my-finetune/ # a training checkpoint folder
oragon import my-model.gguf # or a model file
It is converted and optimized for you. If it cannot be converted correctly, it is refused with the reason.
Serve it over HTTP
oragon serve --auth-token "$TOKEN"
Any OpenAI client, in any language, can now use your model:
from openai import OpenAI
client = OpenAI(base_url="http://127.0.0.1:8080/v1", api_key=TOKEN)
Handle errors
All errors share a base class, ApiError, and say whether a retry is safe.
from oragon import (
ApiError, ContextOverflowError, EngineBusyError, EngineDiedError,
EngineTimeoutError, ExtractionError, InsufficientMemoryError,
)
EngineBusyError— nothing was started; retry.InsufficientMemoryError— the model will not fit; caught before loading.ContextOverflowError— the conversation is too long. Passoverflow="slide"to drop the oldest turns instead.
More
- Speculative decoding —
draft_model=lets a small model speed up a large one, up to 1.56× on a 3B model. It switches itself off when it would not help. - Conversations that survive restarts — pass
session="...". - Reproducible answers —
Oragon(reproducible=True). - Audit export —
oragon audit export --format jsonl. - Local usage stats —
oragon stats. Never uploaded. - LangChain —
pip install 'oragon[langchain]'.
Servers and GPUs
The same engine runs on a server or in a datacenter.
pip install "oragon[gpu]" # Linux, Python 3.10+, an NVIDIA driver
oragon serve Qwen/Qwen2.5-1.5B-Instruct --gpu auto --expose
- It tunes itself to the GPU it finds.
- If the GPU fills up, it admits fewer requests instead of slowing down.
- If the model server crashes, it restarts it.
- Running several machines? Each response carries an
X-Oragon-Affinityheader — route on it, and similar requests land on the machine that has them cached.
Benchmarks
Measured, not estimated. CPU figures come from a 16 GB MacBook (Apple M4)
running qwen2.5-1.5b — the smallest machine Oragon is built for. Servers do
better.
Oragon on its own
| Test | Result |
|---|---|
| 16 requests at once, CPU only | each gets 12+ tokens/s, first word in 1 s |
| 16 requests at once, one Tesla T4 GPU | 224 tokens/s total, slowest request still 59.9 tokens/s |
| 6,000 requests at the same instant | every one answered or told "busy" — none left hanging |
| 600,000 requests in three floods, never restarted | 0 lost, 0 unexplained errors, memory flat, health check in 0.02 ms |
| First request with a long system prompt | 10 s → 0.5 s when warmed at startup |
| 8 agents sharing one prompt | 11 s → 2.2 s with caching |
| Document search over 10,000 passages | 7 ms per search; 150 of 150 citations pointed at the exact text |
| Same model, with Oragon's checks around it | 7/18 → 11/18 correct on graded tasks |
| Invoice extraction on documents that aren't invoices | 5/7 handled correctly, against 2/7 for the model alone |
| Startup, small model | first answer 0.8 s after launch |
Oragon and Ollama, side by side
Same model file, same machine, one running at a time (Ollama 0.33.3).
| Test | Oragon | Ollama |
|---|---|---|
| 1,000 different requests, CPU, both at 16 parallel | done in 810 s | 1,244 s — Oragon 1.54× faster |
| 6,000 requests at the same instant, one CPU | none left hanging, 17 answers/s | 4,757 got no answer, 8 answers/s |
| 16 requests at once, one Tesla T4 GPU | 224 tokens/s, slowest 60 tokens/s | 140 tokens/s, slowest 25 tokens/s |
| First read of a long instruction, CPU | 10.9 s | 23.8 s — 2.2× faster |
| 16 requests at once, CPU, default settings | 9.3 s | 20.1 s |
| 16 requests at once, Apple M4, default settings | 10.9 s | 15.7 s |
| Startup to first word | 0.96 s | 1.61 s |
| Invoice extraction, correct outcome | 5/7 | 2/7 |
| One request, generation speed | 92 tokens/s | 94 tokens/s — a tie |
| Repeated long prompt (caching) | 0.17 s | 0.18 s — a tie |
| Accuracy on the same model | 14/36 | 14/36 — a tie |
| One request on the T4, time to first word | 228 ms | 24 ms — Ollama ahead |
Ollama answers one request at a time by default; with its parallel setting raised it matches us on the Apple M4. The 1,000-request, 6,000-request, T4 and long-instruction results hold with Ollama tuned. Ollama spent about 14% more work per request on the 1,000-request run, so not all of that gap is engine.
Speed per request is set by your hardware, and answer quality by the model — what Oragon adds is everything around it.
Platforms
Python 3.9 to 3.13.
| Platform | Supported | Speeds up with |
|---|---|---|
| macOS 11+, Apple silicon | ✅ | Apple GPU |
| Linux x86-64 (Ubuntu 24.04+, Debian 13+, Fedora 40+) | ✅ | NVIDIA, AMD/Intel (Vulkan), or CPU |
| Linux arm64 (same versions) | ✅ | CPU |
| RHEL 9, Ubuntu 22.04, Debian 12 | coming soon | |
| Windows, Intel Macs | coming soon |
No GPU needed. If one is there, it is used automatically. On an unsupported
platform, pip installs the older 0.0.1 placeholder instead.
Pricing
Everything above is free — no signup, no limits on tokens.
| Free | Paid | |
|---|---|---|
| One process, 4 requests at once | ✅ | ✅ |
| Every feature on this page | ✅ | ✅ |
Many processes sharing one model (Engine.SHARED) |
— | ✅ |
| More than 4 requests at once | — | ✅ |
| Oragon's own licensed models | — | ✅ |
If four at a time in one process is enough, you never need to pay.
Your data
- Your prompts and answers never leave the machine.
- No telemetry, no crash reports, no update checks.
- The only network calls: downloading a model you asked for, and — only on a machine with an activated licence — a check-in that sends usage counts, never content. No licence, no check-in.
Not yet supported
- Images, audio and video — text only for now.
- The
hostedengine.
Learn more
- Documentation: https://www.oragonlabs.com
- Contact: hello@oragonlabs.com
Already have an Oragon account? The same package is on your private index, so you can install it from your dashboard.
Metadata
Release files for oragon 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 404.3 MB
Release files / oragon-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl
| Download URL | oragon-0.1.0-cp313-cp313-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 54.9 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
89b9ba940c00a33c7b22d4c98b5f5b7879dbb5491745d996d44a802942ba6007
|
|
BLAKE2b-256 checksum How to use checksums |
38b7e06678205e865c88991c9be9ba60cc77ff9a706d0f4e88cedc7cf6cb2592
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp313-cp313-manylinux_2_39_aarch64.whl
| Download URL | oragon-0.1.0-cp313-cp313-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 21.2 MB |
| Tags | CPython 3.13 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
d11fcdc6a30fd572ba8c649097ea88b5938dc30fd52fe0f1961fcfcbf05f270e
|
|
BLAKE2b-256 checksum How to use checksums |
0e05979a977e6b7c3746da06cbeb35a3d4e040872cf4eb4e5b329105ca4f658a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | oragon-0.1.0-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
299bfe372c3593d38ebe12c958c51d6d016d4ec7ae198ca1c18ff90bcbc1de29
|
|
BLAKE2b-256 checksum How to use checksums |
635c087602c79851408859880367ff1ce5adaff9ef79149309dbefe3aea849ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl
| Download URL | oragon-0.1.0-cp312-cp312-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 55.0 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
bf269033db14358ac6738172dee5d1ca063ac24611ebf130cd34f9cfdb752c33
|
|
BLAKE2b-256 checksum How to use checksums |
3be8725537c81700d1544342dd96ff3bac96293fc0d71d575721a2db8dac0038
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp312-cp312-manylinux_2_39_aarch64.whl
| Download URL | oragon-0.1.0-cp312-cp312-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 21.3 MB |
| Tags | CPython 3.12 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
29cdebb84b1cb489ac18337fc7280e6c4fe5b5971586903081294c91581c2502
|
|
BLAKE2b-256 checksum How to use checksums |
40648dcb30a914b41a004fa5036618627341d47178523fc3d87b2183f8134696
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | oragon-0.1.0-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7b0c08f444e14100aebb1e9af0418375af61ee167385ad5bce822ba6b6783f03
|
|
BLAKE2b-256 checksum How to use checksums |
09da0f4ef62b79ccf6efb5137e2cb8aadfa57656c2def2e35af1339d7a5cd36e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | oragon-0.1.0-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 53.4 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
9fbea0c11b85446699ca25ff27f8c19c305ff29ddc6945ebeed2eb62c9482961
|
|
BLAKE2b-256 checksum How to use checksums |
b3e809eeb856e6fef87f43243b99553925c706af67490aee99f3538fcc5a6207
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp311-cp311-manylinux_2_39_aarch64.whl
| Download URL | oragon-0.1.0-cp311-cp311-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 20.0 MB |
| Tags | CPython 3.11 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
cb76d8d3454bc060defc0ab7d84e34c303638dc34e386916c2df3013e1d73a7d
|
|
BLAKE2b-256 checksum How to use checksums |
1918b3f49574133b6d9cc3d6a161e2734bf8576b9831e2b8a4d7fd39f71ae3f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | oragon-0.1.0-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.1 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
a62ecd03d233bf71a77df40232c07dbbea185e77aa5a553dec318015d790f3a4
|
|
BLAKE2b-256 checksum How to use checksums |
3a0c9711e2728ab0b24550f1b7b3dc54ed6c183adeeb934b20215331cd1c08c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl
| Download URL | oragon-0.1.0-cp310-cp310-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 52.8 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
4b9296cdeaf04455edfe273cd99b17640356e030e733b4ac693574c23cd0b7f6
|
|
BLAKE2b-256 checksum How to use checksums |
d6f272eeb6e85ebbf9bd0e78b1f5f0da10df93b615abd085eef5482b505040d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp310-cp310-manylinux_2_39_aarch64.whl
| Download URL | oragon-0.1.0-cp310-cp310-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 19.4 MB |
| Tags | CPython 3.10 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
d8fab99e3e937ebf5648d30dd73294be48fe4b9b8feafb041626c1ff3d50f46f
|
|
BLAKE2b-256 checksum How to use checksums |
0575f2b872450fc89bd969e3200aa4d46bf7268c3c6ff38abf7c9a0f9f1d93bc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | oragon-0.1.0-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 6.2 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7fda2eab47de3d3580ab5556e9726062aa7ac3d3ecb6c9c20e8cca03133ec3d8
|
|
BLAKE2b-256 checksum How to use checksums |
24cc66f03b03a6f1a0adf4931d7947acf81d18f7cb343b067fed4009ef56c0f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl
| Download URL | oragon-0.1.0-cp39-cp39-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 52.8 MB |
| Tags | CPython 3.9 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
d69c0e8e8f5315bcf7ed80c86b4acd3e0e99a178b0b42993cc34c2c4d87d6be3
|
|
BLAKE2b-256 checksum How to use checksums |
72265c5a8087972e32446825931c4a2ad7b99f47a2cb3e32b757329ca7dde668
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp39-cp39-manylinux_2_39_aarch64.whl
| Download URL | oragon-0.1.0-cp39-cp39-manylinux_2_39_aarch64.whl |
|---|---|
| Size | 19.4 MB |
| Tags | CPython 3.9 Linux glibc 2.39+ ARM64 |
|
SHA-256 checksum How to use checksums |
b12b2c419a84e983aff5e252f5808537685682dc3227b3f614965f144a301e4e
|
|
BLAKE2b-256 checksum How to use checksums |
c1dd98a88e1abe08019d13fd75d8876f92b047a8068a80808f35c7e3dc865c1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Release files / oragon-0.1.0-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | oragon-0.1.0-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 9.5 MB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
19e780be2ea24547cd718bfaee510a4d3eb29eb4772283ba0ca7b6b22d4f6eff
|
|
BLAKE2b-256 checksum How to use checksums |
6c18438d75f015faed19986e2f86ead53a9ed582a7867b90920360f0207b94fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.0
|
Security for oragon 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A 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.