SHIP (Secure Heterogeneous Inference Programming) is a formally constrained Domain-Specific Language for translating natural language to verifiable bytecode.
To bridge the gap between model inference and actionable outcomes, such as asset transfers, agent interactions, or smart contract invocations, Theseus introduces SHIP. SHIP is essential to express, verify, and govern the intent of sovereign AI agents, especially in inference-to-asset alignment scenarios where economic transactions or external actions result directly from model outputs.
While large language models (LLMs) are capable of generating text that resembles executable logic, they are inherently non-deterministic and lack formal guarantees about structure, safety, or correctness.
Attempting to use raw LLM outputs (e.g., via prompting) to generate bytecode or transaction logic introduces serious issues:
LLMs may hallucinate functions, misplace parameters, or generate unsafe constructs
Outputs may contain Turing-complete logic or fail to terminate, creating DoS risks
Free-form outputs cannot be cleanly tied to proof anchors, making verification infeasible
The economic or operational intention behind raw outputs is implicit
To overcome these limitations, SHIP adheres to the following principles:
All constructs are statically bounded and compiled to verifiable opcode sequences with known gas and memory profiles.
SHIP programs are compatible with Theseus' backends and generate Tensor Commit proofs alongside inference outputs.
Each program is uniquely tied to its originating agent context and is traceable.
SHIP fragments can be staged, delegated, or templated by meta-agents.
The agent runs a model and produces outputs (e.g., a token string).
SHIP is used to translate natural language into structured outputs in two ways:
The SHIP compiler transforms structured outputs into a valid, bounded sequence of operations.
Tensor Commit proves inference integrity, and SHIP bytecode is cross-validated against execution constraints.
Upon finalization, the program is submitted to the runtime.
A sovereign agent runs a summarization model on-chain. The summary contains a trigger like "Pay 10 $THE to agent_xyz for document processing".
This text would be parsed directly into bytecode, causing chances for execution unaligned with the agent's intention.
In pseudocode:
SHIP programs are compiled to AIVM opcodes and executed via AGENT_TICK() or MODEL_INFER() syscall extensions.
Each SHIP construct maps directly to safe AIVM primitives, such as TLOAD, TCUSTOM, STATE_EXPORT, or TRANSFER_TOKEN.
Proofs are attached via Tensor Commit to anchor the linkage between inference and outcome.
This page is being expanded with: