Agience Crystal
Condensation and routing — signal to content type.
Crystal condenses incoming signal into typed content and routes it. As the dispatcher/gateway it maps a request by its content type to one of the chorus tekton services (aria, astra, iris, lumen, ophan, sage, seraph) and carries the gateway concerns: identity, topology, and the MCP client.
It reaches everything over the wire; nothing links it. Origin is called at ORIGIN_URI over
HTTP, and the store is injected by the host rather than imported — crystal imports neither.
Install
pip install agience-crystal # the contract and the ontology driver
pip install agience-crystal[service] # the gateway that boots — fastapi, uvicorn, httpx, …
pip install agience-crystal[ontology] # adds the coordinate, and numpy with it
The three are a measured split, not a preference. 23 of crystal's 34 non-test modules import on
agience-prism and the stdlib alone; 11 are the ones that serve, and those are what [service]
carries. [ontology] is separate again because crystal.ontology.geometry imports numpy at module
scope, and a gateway that never computes a coordinate should not install it.
Requires Python 3.11 or newer. The one base dependency is
agience-prism, Apache-2.0, whose own base install has
no dependencies at all.
Run it
Crystal is two servable surfaces on the same package, and they are different jobs.
The gateway — routes a request by content type to the tekton that owns it:
pip install 'agience-crystal[service]'
CRYSTAL_HOST=127.0.0.1 CRYSTAL_PORT=8085 \
MANTLE_URI=http://localhost:8082 ORIGIN_URI=http://localhost:8080 \
python -m crystal.main
The host — serves a set of tektons discovered at boot, assembling each with an embodiment:
MCP_HOST=127.0.0.1 MCP_PORT=8086 python -m crystal.host
Bind loopback and put a reverse proxy in front of anything public.
Configuration is the environment, and it is read in two places:
| read by | variables |
|---|---|
config.py — the gateway |
CRYSTAL_HOST, CRYSTAL_PORT (8085), CRYSTAL_EVENTS_ENABLED, MANTLE_URI, MANTLE_API_KEY, ORIGIN_URI, KEYS_DIR, EMBEDDINGS_URI, EMBEDDINGS_API_KEY, TYPE_CONTENT_TYPE, LOG_LEVEL |
host.py — the tekton host |
MCP_HOST, MCP_PORT, CRYSTAL_UPSTREAMS, CRYSTAL_APEX_PERSONA, CRYSTAL_HOST_DOMAIN, CRYSTAL_TLS_CERT, CRYSTAL_TLS_KEY, LOG_LEVEL |
type_registration.py additionally reads CRYSTAL_URI, CHORUS_PUBLIC_URI and
AGIENCE_SERVER_HOST_URI when a tekton pushes its types.
A gateway with no Mantle and no Origin still starts; it answers what it can reach.
The embodiment is injected, never imported
import crystal pulls no instrument and no numpy — checked in CI on a bare install, not asserted
here. The embodiment that measures arrives from the host at assembly, which is what lets the same
crystal run on a full node and on a constrained store.
No test here reaches a real instrument either. tests/test_embodiment_injection.py carries a
stub embodiment written against prism.embodiment in numpy and the stdlib, and the suite runs on
that — an implementation crystal knows nothing about, which is what makes the slot a real slot. The
claim that the instrument the host hands over also fits is asserted in agience-ember, which
imports crystal; making it from here would have meant importing the repository above this one.
Layout
| Path | Purpose |
|---|---|
src/crystal/ |
The dispatcher/gateway service — dispatch, identity, topology, MCP client, registries, host and entrypoint. |
src/crystal/ontology/ |
The coordinate: coupling, geometry, lookup, freshness, transducer. Behind the ontology extra, because geometry imports numpy at module scope. |
src/types/ |
Builtin content-type skeletons — type.json plus optional schema.json, behaviors.json, preview.json and handlers/. Repository content, read by a test; not shipped in the wheel, because nothing at runtime loads it from the package. |
tests/ |
The suite, including the ratchets that hold the import boundaries above. |
pyproject.toml |
Build, packaging and every dependency. There is no requirements.txt — the service extra is the one list. |
A tekton owns its own types. Each one ships ui/<top>/<sub>/type.json and pushes it to the
gateway's /register endpoint at host startup, signed with a service JWT. Types and tektons are
gateway state; the store never sees them.
Where it sits
agience-prism the contract, dependency-free crystal depends on it
agience-crystal this repository the gateway
agience-mantle the store a SIBLING — neither declares the other
agience-ember the observer unit declares crystal, and mantle, and prism
Crystal is below ember: ember declares crystal, and crystal declares nothing of ember. Mantle is beside crystal, not above or below it — reached over the wire and imported by neither side.
Contributing
See CONTRIBUTING.md. The suite needs two public siblings — agience-prism, the
package crystal declares, and agience-mantle for one file — and no environment variable, so a
fork can run it.
License
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_crystal-0.1.1.tar.gz.
File metadata
- Download URL: agience_crystal-0.1.1.tar.gz
- Upload date:
- Size: 253.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0ea7ba1ec93671813c7811867609772196987b44633b4cb51230633c5a7337e1
|
|
| MD5 |
ec41be54fcc16a00068e223ef106a041
|
|
| BLAKE2b-256 |
eaa48e539291e9078b68373b458c72b4f6455ab04e1368b40b5f74915636bca4
|
Provenance
The following attestation bundles were made for agience_crystal-0.1.1.tar.gz:
Publisher:
publish.yml on Agience/agience-crystal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agience_crystal-0.1.1.tar.gz -
Subject digest:
0ea7ba1ec93671813c7811867609772196987b44633b4cb51230633c5a7337e1 - Sigstore transparency entry: 2742422667
- Sigstore integration time:
-
Permalink:
Agience/agience-crystal@b948197c036a26e0836a6b051a714a795b33e3c8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Agience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b948197c036a26e0836a6b051a714a795b33e3c8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agience_crystal-0.1.1-py3-none-any.whl.
File metadata
- Download URL: agience_crystal-0.1.1-py3-none-any.whl
- Upload date:
- Size: 175.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 |
9f39d23c78948f9fad0e3e15013db64948245f1cd6fcce0af8ce35d47b235514
|
|
| MD5 |
521d04332ea6938cec51f11b8f5db7f1
|
|
| BLAKE2b-256 |
e0ea090cb254e873da22ee474749d48de0335c4044ccd11ce96a5c460ad18bcc
|
Provenance
The following attestation bundles were made for agience_crystal-0.1.1-py3-none-any.whl:
Publisher:
publish.yml on Agience/agience-crystal
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agience_crystal-0.1.1-py3-none-any.whl -
Subject digest:
9f39d23c78948f9fad0e3e15013db64948245f1cd6fcce0af8ce35d47b235514 - Sigstore transparency entry: 2742422695
- Sigstore integration time:
-
Permalink:
Agience/agience-crystal@b948197c036a26e0836a6b051a714a795b33e3c8 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/Agience
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@b948197c036a26e0836a6b051a714a795b33e3c8 -
Trigger Event:
push
-
Statement type: