At a glance
- Inside the attested VM: the API server, its database on an encrypted disk, encrypted backups, TLS termination, the geofence and the transparency log notary.
- Not inside it: agent funds. They sit in each agent’s wallet on NEAR Intents, under the policy the owner signed.
- Proof:
GET /tee/attestationreturns a TDX quote that binds the API’s TLS key, the notary’s keys and your own nonce. - Keys and releases: the VM gets its keys from our own dstack KMS, which runs on a separate Google Cloud TDX VM. Which code may get keys is decided by contracts on Ethereum.
- Verify it in about 15 minutes with
curl,openssl,jq,xxd,base64and Docker. No API key needed.
What it guarantees
What the TEE gives you
- TLS ends inside the attested VM. Its certificate key is created there and never leaves it.
- The host machine can’t read requests, keys or the database.
- Every container image is pinned by digest in the compose file that the quote attests.
- The notary that signs the transparency log holds keys bound into the same quote.
What it doesn't cover
- Funds. They’re in the agent’s wallet on NEAR Intents, not in the VM. The policy limits what the API can do with them.
- Front-1 metadata. Traffic reaches the VM through
front-1, a separate host we run. It forwards TLS ciphertext and has no certificate key, but it sees the caller’s IP address, the host name, and traffic size and timing. It keeps no access log and its journal is volatile. It can interrupt traffic or forge the address the geofence and rate limits use, but it cannot read or undetectably change the HTTP exchange. Inside the VM, the edge, TLS and ingress services see the address and remove it before the request reaches the API server, which records no caller address. - Logs and metrics. A telemetry container (Grafana Alloy) sends them out of the VM to Grafana Cloud. Before a log line leaves, every IPv4 address is replaced with
<redacted>and PostgresDETAILlines, which quote row values, are dropped. Its write token is a sealed secret. - Rebuilding from source. The images are built reproducibly, but the source isn’t public yet, so you can check which images run, not rebuild them.
What runs inside
Keys and releases
The VM does not hold its keys by itself. Our own dstack KMS, on a separate Google Cloud TDX VM, derives them and releases them only to a VM that passes its checks:- Contracts on Ethereum decide. An app contract lists the compose hashes that may obtain keys, and a KMS contract lists the OS images and KMS measurements it accepts. The KMS reads both through a light client inside its own VM, so a change counts only once it is about 13 minutes deep.
- Releases wait. The contracts are owned by a DAO. A new release is allowed only through a 24-hour timelock. A revocation takes effect at once, but it stops future key release only: it does not erase keys a running VM already holds.
- The compose names the KMS. The attested compose sets
key_providertokmsand pins the KMS’s CA key askey_provider_id, so a VM started under any other key provider does not match. - OS image trust. On Google Cloud, dstack takes the guest OS image identity from the VM’s virtual TPM, not from the TDX registers. Which kernel booted therefore also rests on Google’s vTPM.
Geofence
Connections from these jurisdictions are refused before TLS completes, matching the NEAR AI Cloud terms of service: Cuba, Iran, North Korea, Syria, and the Crimea (Sevastopol included), Donetsk and Luhansk regions of Ukraine. A refused client sees a closed connection, not an HTTP error. Addresses are placed by where they were allocated, so a caller on a rented foreign host is placed by that host.Endpoints
All three are publicGETs on the API host.
/tee/info and /tee/attestation can answer 503 with {"error":"busy"} and Retry-After: 1 when quote requests are already in flight, so try again after a second. Either can answer 502 with {"error":"attestation_unavailable"} when the VM could not produce the answer. A nonce that is not 64 lowercase hex characters is a 400.
Verify it yourself
This walkthrough checks that a connection toapi.agentsonintents.com ends inside a genuine, up-to-date TDX VM running the compose it publishes, and that the notary keys belong to that VM.
1
Prerequisites
curl, openssl, jq, xxd and Docker. Work in an empty directory:2
Read the VM's identity
app_id. It stays the same across releases of this deployment. compose_hash changes with every release.3
Ask for a quote with your own nonce
A fresh nonce proves the quote was made for you, now.
request_nonce must equal $NONCE.4
Get the TLS key fingerprint yourself
The SHA-256 of the certificate’s public key (SubjectPublicKeyInfo), read from your own connection:It must equal
tls_cert_fingerprint in att.json. The certificate renews about every 60 days. If the two differ, run steps 3 and 4 again.5
Check report_data
The quote’s Then check that This is the same layout NEAR AI Cloud’s verifier checks.
report_data is 64 bytes: SHA-256(signing_address ‖ tls_fingerprint) followed by your nonce. signing_address is the notary’s log key followed by its cosigner key.signing_address is exactly the two published notary keys. A key reads <name>+<key hash>+<base64>; the base64 decodes to one type byte and the 32-byte public key:6
Verify the quote with dstack-verifier
Run the open-source dstack verifier, pinned by digest, and send it the quote. It checks Intel’s signature chain and replays the event log. The environment variable points it at Intel’s own service for the TDX collateral.A pass needs all of these:
7
Tie the compose to the quote
The quote attests a compose hash. Now
/tee/info publishes the compose itself. They must match:app_compose is exactly what the VM runs. Read it to see every image digest, every measured setting and the names of the sealed secrets:8
Check where the keys come from
The attested compose must take its keys from a KMS, with the dstack gateway off:
key_provider must be kms and gateway_enabled must be false. key_provider_id is the KMS root’s public key (P-256, hex). Note it and compare it next time you check.With every check passing, a connection to the API host ends inside a genuine Intel TDX VM with a production OS image and an up-to-date TCB, running exactly the published compose with keys from our KMS, and the notary keys that sign the transparency log belong to that VM.
Steps 3 and 4 read the certificate over two separate TLS connections to the same host. That’s enough here, because the quote binds the key itself, and both connections must present it.
Next steps
Transparency Proofs
Check every execution’s audit trail against the log this notary signs.
How it works
The checks every action passes before it reaches the agent’s wallet.