Overview
What is Aether?
Aether is the VeilNet real-time engine for digital twins. It hosts an embedded OPC UA server so HMIs, SCADA, and other OPC UA clients browse the same variables you expose over REST and MCP. Weaves run your Python logic on a fixed cycle—plant models, observers, or closed-loop control against live hardware.
Nexus (singleton runtime)
Nexus is the singleton stack inside a running process:
- Embedded OPC UA server (bind address from
Nexus(opc_ua_url=...)). - FastAPI HTTP API (default 0.0.0.0:8000).
- MCP over HTTP (mounted at
/nexus). - Certificates under
certs/(self-signed material is generated on first run when missing).
Call nexus.start() to run the stack after you have defined Sigils and Weaves.
Licensing
Every Nexus run requires a license JWT—including local development, examples, and tests. There is no mode that skips it. Use an early-access or trial key from VeilNet, or a token your operator distributes.
Supply the token in either way:
- Set the environment variable
VEILNET_AETHER_TOKENto the JWT string, or - Pass the token when you construct
Nexus(for example atoken=argument onNexus(...); use the exact parameter name from your SDK version).
Offline validation: Nexus verifies the JWT locally (cryptographic signature and expiry) using the runtime’s configured signing secret. No internet access is required for that check, so air-gapped sites work as long as the token and verification secret are configured.
Sigil (one OPC UA variable)
A Sigil represents one OPC UA node:
- Readable always; writable when you allow REST/MCP/OPC UA writes (
writable=True, default where not stated otherwise in examples). - Omit
opc_ua_urlto host the variable on Aether’s embedded server. - Set
opc_ua_url(and optionaluser_name/passwordor certificate fields) to read and write a node on an external OPC UA server such as a PLC.
REST and MCP follow the same read/write rules as OPC UA for that Sigil.
Weave (periodic callback)
A Weave registers an async callback invoked every cycle_time seconds. Use it for physics, synchronization, or closed-loop control that reads and writes Sigils.
How the pieces connect
At a high level:
- You construct one
Nexuswith the embedded OPC UA listen address (for exampleopc.tcp://0.0.0.0:4840in Docker so the published port works), and a license JWT viaVEILNET_AETHER_TOKENorNexus(..., token=...)(see Licensing above). - You declare Sigils with
node_idstrings (OPC UA NodeId form) and initial values. - You attach one or more Weave instances with
label,cycle_time, andcallback. - You call
nexus.start()(typically underif __name__ == "__main__").
External tools can then use:
- OPC UA at your configured endpoint.
- HTTP
GET /healthfor liveness,/docsfor interactive OpenAPI. - MCP at
/nexusfor agent and tool integrations.