Proteum
Turn observed events into typed goals and policy-checked capability calls, with explicit state at every step.
Why
Model-driven runtimes often hide state changes and tool calls inside one loop. Proteum separates the loop into typed stages, then puts deterministic checks between model output and execution. The architecture is the point of v0.1.
Install
git clone https://github.com/xhillman/proteum.git
cd proteum
uv sync --locked
Requires: Python 3.14+ and uv. The included examples need no API key or network access after installation.
Quick start
uv run python examples/hello_proteum.py
Hello, world!
Task status: completed
Features
- Typed reasoning. Pydantic contracts validate model-generated Goals, Tasks, and Actions before Proteum uses them.
- Policy-checked execution. Every capability call crosses an authorization boundary before local code runs.
- Explicit state. Objects and Facts live in a World Model instead of a prompt transcript.
- Optional persistence. One
databaseargument stores Objects, Facts, Events, Goals, Tasks, and execution records in SQLite. - Offline tests.
FakeModelreturns queued structured responses for deterministic examples and tests.
Usage
Register a capability
Capabilities are asynchronous functions. Proteum derives their input schema from the function signature and registers them with the policy boundary.
@app.capability(
name="diagnostics.inspect_ci",
effects=("reads_ci_results",),
)
async def inspect_ci(repository: str) -> dict[str, str]:
return {"repository": repository, "status": "failed"}
Persist state between sessions
In-memory storage is the default. Pass a database path when state must survive
the current Proteum instance.
app = Proteum(model=model, database="proteum.db")
await app.start()
try:
await app.publish(event)
finally:
await app.stop()
restarted = Proteum(model=new_model, database="proteum.db")
repository = restarted.world.get_object("repo:proteum")
await restarted.stop()
stop() ends the session and closes resources owned by the application. Create
a new instance to load the SQLite state.
Configuration
| Option | Type | Default | Description |
|---|---|---|---|
model |
Model |
Required | Produces structured Goal, Task, and Worker decisions. |
database |
str | Path | None |
None |
Enables SQLite persistence when set. |
world |
WorldModel | None |
In-memory | Replaces Object and Fact storage. |
memory |
MemoryStore | None |
In-memory | Replaces contextual Memory storage. |
event_bus |
EventBus | None |
In-memory | Replaces Event delivery. |
policy |
PolicyEngine | None |
SimplePolicyEngine |
Authorizes capability requests. |
clock |
Clock | None |
SystemClock |
Supplies timestamps for runtime behavior. |
database owns the World Model and Event Bus composition. Do not combine it
with world or event_bus. Memory remains in-process when SQLite is enabled.
How it works
- An Event enters Proteum and updates recognized World Model Facts.
- Attention decides whether the Event deserves further processing.
- The Executive proposes a Goal, and the planner creates one Task.
- The Worker receives bounded Context and may request a registered capability.
- Policy authorizes the request. Execution records the result and updates the Task, Goal, and World Model.
The full path is:
Event
→ World Model
→ Attention
→ Goal
→ Task
→ Context
→ Worker
→ Capability
→ Policy
→ Execution
→ Result
→ World Model
Development
git clone https://github.com/xhillman/proteum.git
cd proteum
uv sync --locked
uv run ruff check .
uv run pyright
uv run pytest
Both examples use FakeModel. Development and test runs do not need external
services.
Roadmap & known limitations
- Build the v0.1 package and run both examples from a fresh installation.
- Tag and publish v0.1 after the release gate passes.
- SQLite preserves records, but v0.1 does not resume unfinished Goals or Tasks.
- Memory remains in-process. Persistent Memory is post-v0.1 work.
- Not planned for v0.1. Distributed execution, dynamic Workers, plugin systems, and production-readiness claims.
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 proteum-0.1.0.tar.gz.
File metadata
- Download URL: proteum-0.1.0.tar.gz
- Upload date:
- Size: 113.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a06171277d6ae15c623917c810036272fd632fa57749a797edc8da97f1719b20
|
|
| MD5 |
299ad6877991c68c8988fc5b3c60b065
|
|
| BLAKE2b-256 |
eada07d2014ce5e819341db06eef214c04d1f958f8d5c03cb98e65feaf3479cb
|
Provenance
The following attestation bundles were made for proteum-0.1.0.tar.gz:
Publisher:
release.yml on xhillman/proteum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proteum-0.1.0.tar.gz -
Subject digest:
a06171277d6ae15c623917c810036272fd632fa57749a797edc8da97f1719b20 - Sigstore transparency entry: 2553513470
- Sigstore integration time:
-
Permalink:
xhillman/proteum@24b53b1c541c08427306c967b01e574573e0116c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xhillman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24b53b1c541c08427306c967b01e574573e0116c -
Trigger Event:
push
-
Statement type:
File details
Details for the file proteum-0.1.0-py3-none-any.whl.
File metadata
- Download URL: proteum-0.1.0-py3-none-any.whl
- Upload date:
- Size: 65.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4f37aa4d7107327ba5b63db2831027a5378390af2c6ed8d5f957fb07f61c43d6
|
|
| MD5 |
a6d48e23bc7dd15a2703384f96ae3652
|
|
| BLAKE2b-256 |
1f9f860ee4a60ae563a9e5e4a674fbc5b97f6b88f08d604b2267795eff35042b
|
Provenance
The following attestation bundles were made for proteum-0.1.0-py3-none-any.whl:
Publisher:
release.yml on xhillman/proteum
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
proteum-0.1.0-py3-none-any.whl -
Subject digest:
4f37aa4d7107327ba5b63db2831027a5378390af2c6ed8d5f957fb07f61c43d6 - Sigstore transparency entry: 2553513555
- Sigstore integration time:
-
Permalink:
xhillman/proteum@24b53b1c541c08427306c967b01e574573e0116c -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/xhillman
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@24b53b1c541c08427306c967b01e574573e0116c -
Trigger Event:
push
-
Statement type: