Adverserial clients verify a fresh TEE and GPU attestation before they send content. Your coding tool talks only to a local gateway; the gateway exchanges your billing key for a bounded entitlement and connects directly to the attested confidential runtime.
01 / LOCALYour toolCodex, Claude Code, OpenCode, Pi, Hermes, Kimi Code, or your application.
02 / VERIFYClient SDKPolicy, TDX and GPU evidence, key binding, and receipt checks.
03 / DIRECTConfidential runtimeEHBP-encrypted content reaches api.adverserial.ai, not a compatibility proxy.
One supported route.Use the confidential SDK and local gateway for every integration. Verification fails closed: a missing policy, untrusted key, stale evidence, invalid attestation, or receipt failure stops the request.
Quickstart
Clone the confidential SDK, create an isolated Python environment, and install both the verifier and loopback gateway. Python 3.10 or newer is required.
Get your normal Adverserial billing key from billing.adverserial.ai. The key stays on your computer: the gateway uses it only to obtain a short-lived, single-request entitlement. The confidential runtime receives that entitlement, never your long-lived key.
Verification gate
Before the gateway starts, configure independently obtained verification material. The verifier checks the Intel TDX and NVIDIA evidence against the published policy; it does not treat a proxy-signed receipt as hardware proof.
Do not bypass this step. Pull trusted receipt keys and the active endpoint policy from verify.adverserial.ai. A development-only trust-on-first-use key is not an acceptable production configuration. If the registry has not published an active policy for your model and endpoint, the confidential client must refuse to send content.
# JSON object: {"<receipt-key-id>": {"kty":"EC", "crv":"P-256", "x":"…", "y":"…"}}
# published at https://verify.adverserial.ai/policies/production.json
export ADVERSERIAL_RECEIPT_KEYS_FILE="$HOME/.config/adverserial/receipt-keys.json"
# The SDK ships the reference verifier for the current Phala TDX + NVIDIA CC
# deployment (Intel collateral via dcap-qvl, NVIDIA EAT bundles via NRAS JWKS):
export ADVERSERIAL_HARDWARE_VERIFIER_COMMAND="$PWD/typescript/bin/adverserial-hardware-verify.mjs"
The hardware verifier recomputes the nonce and public-key bindings, verifies the Intel TDX quote against Intel collateral, and validates every NVIDIA EAT against NRAS public keys. It rejects synthetic development evidence, missing evidence, and mismatched bindings. Custom TEEs can substitute their own verifier command with the same stdin/stdout contract.
Start the local confidential gateway
The gateway binds to 127.0.0.1 only. It supports OpenAI Chat Completions, Anthropic Messages, and OpenAI Responses on the same local endpoint, so existing tools can keep their native protocol while the content path becomes confidential.
The gateway validates a fresh policy and hardware proof, gets an entitlement from billing, sends the encrypted request to the attested endpoint over direct TLS, then verifies the signed inference receipt. It logs neither prompt bodies nor API keys.
Canonical model IDs
MODEL
CANONICAL ID
LOCAL BASE URL
CyberGLM
lordx64/cyberglm
http://127.0.0.1:8787/v1
CyberKimi
lordx64/cyberkimi
http://127.0.0.1:8787/v1
Use these exact model IDs in every tool configuration. The local gateway rejects non-canonical model IDs rather than routing them somewhere else.
Configure your coding client
Each configuration points to the loopback gateway. Set your billing key in the client’s local secure storage or environment; it is converted into a bounded entitlement before the request crosses the network.
CLAUDE CODE
Anthropic Messages
export ADVERSERIAL_API_KEY="sk-YOUR-KEY"
source /absolute/path/to/confidential-sdk/profiles/claude-code.confidential.sh
claude
# Routes Claude to /v1/messages at the local gateway.
# The gateway preserves tool_use/tool_result and streamed tool JSON.
CODEX
OpenAI Responses
cp /absolute/path/to/confidential-sdk/profiles/codex.confidential.toml \
~/.codex/confidential.config.toml
export ADVERSERIAL_API_KEY="sk-YOUR-KEY"
# Install the attestation skill once:
codex plugin marketplace add AdverserialAI/confidential-sdk --ref main
codex plugin add adverserial-verify@adverserial
codex --profile confidential
# Uses /v1/responses with structured function calls,
# tool outputs, and streamed function arguments.
# In Codex: $adverserial-verify
KIMI CODE
Anthropic Messages
cd /absolute/path/to/confidential-sdk/plugins
npm install && npm run build
# In Kimi Code: /plugins install ./kimi-code
# Then: /reload
[providers.adverserial]
type = "anthropic"
base_url = "http://127.0.0.1:8787"
api_key = "sk-YOUR-KEY"
[models.cyberglm]
provider = "adverserial"
model = "lordx64/cyberglm"
export ADVERSERIAL_API_KEY="sk-YOUR-KEY"
pi --extension /absolute/path/to/confidential-sdk/plugins/pi/adverserial-confidential.ts \
--model adverserial-confidential/lordx64/cyberglm
# Pi does not register the model until a fresh
# adverserial-verify attestation check succeeds.
CODEX DESKTOP
Shares the CLI configuration
# The Codex desktop app reads the same
# ~/.codex/config.toml as the CLI.
# Apply the Codex block, then restart the app.
# In a new chat: $adverserial-verify
# The plugin runs its bundled verifier.
The gateway preserves text, function definitions, function calls, function outputs, and streamed function-argument data. It rejects unsupported hosted-provider tools, files, images, and provider-side conversation state rather than degrading to a non-confidential route.
Copy-ready profiles for every harness live in the SDK profiles directory. They contain no key material and direct every prompt to the loopback gateway.
Claude Code’s desktop app shares ~/.claude with the CLI, so the same environment block applies to both. Its profile pins interactive, background-agent, and small/fast roles to lordx64/cyberglm. The loopback gateway recognizes only Claude-family child aliases and canonicalizes them before verification; billing and the runtime receive only the canonical ID. Kimi Code accepts the same Anthropic Messages route; its own configuration reference is providers and models.
Install and verify each client
Install the integration from its public source, restart the coding client when the harness requires it, and run a fresh check before sending sensitive content. The local gateway independently verifies again before confidential dispatch, so a plugin badge is never the only enforcement point.
Restart Codex, then type $adverserial-verify. Start confidential inference with codex --profile confidential.
Claude Code
Install the Claude Code plugin from its README, then source profiles/claude-code.confidential.sh before claude.
Use /adverserial-verify-claude:attestation. The SessionStart hook and status badge show the cached verdict.
Kimi Code
Build plugins/, then run /plugins install /path/to/confidential-sdk/plugins/kimi-code and /reload.
Use /adverserial-verify:attestation. The plugin checks at session start and shows status.
OpenCode
Follow the OpenCode README to build and register the plugin shim.
Ask the agent to use adverserial_verify, or install the documented /attestation custom command.
Pi
Launch Pi with plugins/pi/adverserial-confidential.ts as its extension.
Use /adverserial-verify or adverserial_verify. CyberGLM is not registered until verification succeeds.
Hermes
Copy the documented skill to ~/.hermes/skills/adverserial-verify/ and merge the Hermes model alias.
Ask Hermes to verify the endpoint before use, then select /model cyberglm.
Use the Python SDK directly
Use the Python SDK when your application needs end-to-end verification plus TLS SPKI pinning on the data path. Configure the independent hardware-verifier callback before calling verify_endpoint.
Direct endpoint connection, entitlement exchange, encrypted transport, and receipt enforcement.
Build and install instructions, source, test suites, and supported plugin versions are maintained in the confidential-sdk repository.
Read the result
Every completed confidential request returns a signed receipt. The SDK checks its signature, model and policy identity, expiration, evidence binding, request hash, response hash, and the attested TLS key. Streaming requests receive the receipt at the end of the stream; treat a missing or invalid receipt as a failed exchange.
Expected result.VERIFIED means the client accepted the current policy, fresh evidence, model identity, key binding, and receipt. FAILED means no prompt was sent or the exchange must be treated as unverified.
Security boundary
YOUR MACHINELong-lived billing key
Used locally to obtain a bounded entitlement. Do not put it in a repository, browser bundle, or shared configuration.
CONFIDENTIAL RUNTIMEPrompt and completion
Decrypted only inside the attested runtime. The model server is reached over local loopback.
BILLINGEntitlement and token counts
Receives account authorization and signed count-only metering records, not prompt or completion bytes.
VERIFY REGISTRYPublic evidence
Publishes policy, release metadata, and receipt keys. It is not in the prompt-content path.
Report a vulnerability privately. Send suspected security issues to [email protected]. Do not include customer prompts, API keys, or credentials in a public issue.