This release has been yanked by its maintainers, and will be ignored by installers, except when explicitly specified.
Consider using release 0.1.2 instead.
agience-prism
An environment adapter — prism adapts an environment (world ↔ frame) to Agience. This is the Python adapter: the Agience developer SDK (Apache-2.0).
from prism import Host, create_server
Install
pip install agience-prism
The base install has no dependencies. It carries the contract — canonical JSON, the crystal model, the capability vocabulary, the config shape, the error set, and the structural address — so a component can hold the same answers as every other component without taking on an install cost.
Runtime surfaces are extras:
| Extra | Installs | For |
|---|---|---|
trust |
python-jose, cryptography | the trust floor: keys, signing, scopes |
host |
fastapi, uvicorn, httpx, pyjwt | prism.Host |
server |
mcp, httpx | prism.create_server |
cli |
cryptography, httpx | the prism command line |
vector |
numpy | vector types |
wire |
numpy, cryptography | the plane: reach, frames, carriers, settlement |
all |
all of the above | |
dev |
all + pytest, pytest-asyncio, ruff |
working on prism itself |
pip install "agience-prism[host]"
pip install "agience-prism[all]"
The runtime surfaces resolve through PEP 562 __getattr__, so reaching one without its extra raises
an ImportError naming the extra to install, while from prism.canonical import canonical_string
costs nothing.
Nine of the sixteen wire modules — carriers, pump, minhash, minting, settlement, extraction, schema,
error_threshold, mcp_bridge — import on the bare base install. tests/test_wire_extra.py imports
each in a subprocess with numpy and cryptography blocked, so that claim can fail rather than only be
asserted.
The aperture is reached by injection (prism.instrument), never by import. A published SDK
depends only on packages its consumers can install.
Two toolkits
A host is compute that serves capabilities over HTTP. The platform reaches it over the wire; it imports nothing of the platform.
from prism import Host
host = Host("my-host")
@host.operator("echo", path="/echo")
def echo(req: EchoIn) -> dict:
return {"echo": req.text}
host.serve(port=8083)
A server exposes MCP tools authorized as the calling user: it captures the inbound delegation token and forwards it on outbound calls, so it only ever acts within that user's authorization.
from prism import create_server
mcp, server = create_server("my-server")
@mcp.tool(description="Echo a message back, with the calling user's id.")
async def echo(message: str) -> str:
return json.dumps({"echo": message, "user": server.get_user_id()})
app = server.create_app(mcp)
The shared contract
prism/vectors/contract_vectors.json is the one artifact all three prism SDKs are checked against —
canonical JSON, the crystal sha, the structural address, capability reach.
tests/test_contract_vectors.py asserts it here; prism-js and prism-c assert the same bytes. That
file is what makes "one wire format, three languages" a measurement rather than a claim.
The vectors ship inside the wheel, so pip install agience-prism is enough to run a conformance
gate — no source tree and no sibling checkout:
from prism.vectors import load_vectors
vectors = load_vectors("contract_vectors")
Self-contained
Prism resolves no path outside its own installation and imports nothing from the components that
depend on it. Where a deployment supplies data — operator bundles for prism.runner — it names the
directory with $AGIENCE_BUNDLE_ROOT or binds a payload with register_group(). Prism never
searches for a sibling checkout, because a path derived from where a file happens to sit is a
fallback that can drift from the bytes the mesh carries while the integrity gate keeps passing.
Development
pip install -e ".[dev]"
python -m pytest -q
python -m ruff check .
License
Apache-2.0 — see LICENSE and NOTICE. Contributing:
CONTRIBUTING.md. Security: SECURITY.md.
Prism is permissive deliberately: build on Agience over the wire with no copyleft reaching your code. The base install has no dependencies, so depending on it costs nothing.
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 agience_prism-0.1.0.tar.gz.
File metadata
- Download URL: agience_prism-0.1.0.tar.gz
- Upload date:
- Size: 293.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98115b00e79327497f53a61583e7e06606e91346eda4d9fa314378e6a5ee80ff
|
|
| MD5 |
9c35b01b8bfbcd0e8fc5e000aa1af413
|
|
| BLAKE2b-256 |
ee5db83ecd6dee14c4874638f3fefd76a0ff061c7b7ffa2047c6b2b571bcdc55
|
Provenance
The following attestation bundles were made for agience_prism-0.1.0.tar.gz:
Publisher:
publish.yml on Agience/agience-prism-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agience_prism-0.1.0.tar.gz -
Subject digest:
98115b00e79327497f53a61583e7e06606e91346eda4d9fa314378e6a5ee80ff - Sigstore transparency entry: 2693631106
- Sigstore integration time:
-
Permalink:
Agience/agience-prism-py@101f1b383a330db736cf70624aa582f10a63a929 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Agience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101f1b383a330db736cf70624aa582f10a63a929 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agience_prism-0.1.0-py3-none-any.whl.
File metadata
- Download URL: agience_prism-0.1.0-py3-none-any.whl
- Upload date:
- Size: 237.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 |
6332da7140c248ccf0aea5dffd2d830d6f19cb5411b96681e11f34101c1874af
|
|
| MD5 |
83f2618e6c9e9e38bc2b04fb9ef1a6eb
|
|
| BLAKE2b-256 |
8f4acae68c368fd091b783daf76d666b9a79bdd190bc947125ef4a03b4c81da7
|
Provenance
The following attestation bundles were made for agience_prism-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Agience/agience-prism-py
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agience_prism-0.1.0-py3-none-any.whl -
Subject digest:
6332da7140c248ccf0aea5dffd2d830d6f19cb5411b96681e11f34101c1874af - Sigstore transparency entry: 2693631132
- Sigstore integration time:
-
Permalink:
Agience/agience-prism-py@101f1b383a330db736cf70624aa582f10a63a929 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/Agience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@101f1b383a330db736cf70624aa582f10a63a929 -
Trigger Event:
push
-
Statement type: