Skip to main content

Proteum

Turn observed events into typed goals and policy-checked capability calls, with explicit state at every step.

Examples · Changelog · Report a bug


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 database argument stores Objects, Facts, Events, Goals, Tasks, and execution records in SQLite.
  • Offline tests. FakeModel returns 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

  1. An Event enters Proteum and updates recognized World Model Facts.
  2. Attention decides whether the Event deserves further processing.
  3. The Executive proposes a Goal, and the planner creates one Task.
  4. The Worker receives bounded Context and may request a registered capability.
  5. 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

proteum-0.1.0.tar.gz (113.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

proteum-0.1.0-py3-none-any.whl (65.6 kB view details)

Uploaded Python 3

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

Hashes for proteum-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a06171277d6ae15c623917c810036272fd632fa57749a797edc8da97f1719b20
MD5 299ad6877991c68c8988fc5b3c60b065
BLAKE2b-256 eada07d2014ce5e819341db06eef214c04d1f958f8d5c03cb98e65feaf3479cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for proteum-0.1.0.tar.gz:

Publisher: release.yml on xhillman/proteum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for proteum-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4f37aa4d7107327ba5b63db2831027a5378390af2c6ed8d5f957fb07f61c43d6
MD5 a6d48e23bc7dd15a2703384f96ae3652
BLAKE2b-256 1f9f860ee4a60ae563a9e5e4a674fbc5b97f6b88f08d604b2267795eff35042b

See more details on using hashes here.

Provenance

The following attestation bundles were made for proteum-0.1.0-py3-none-any.whl:

Publisher: release.yml on xhillman/proteum

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 files

0.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page