Skip to main content
This guide will help you make your first attested TLS connection using Atlas. Choose your platform below to get started.

Prerequisites

  • Node.js 18 or higher
  • npm or pnpm

Installation

npm install @concrete-security/atlas-node

Basic example

Create a simple attested fetch:
import { createAtlsFetch } from "@concrete-security/atlas-node"

const fetch = createAtlsFetch({
  target: "enclave.example.com",
  policy: {
    type: "dstack_tdx",
    allowed_tcb_status: ["UpToDate", "SWHardeningNeeded"],
    disable_runtime_verification: true  // Development only
  },
  onAttestation: (att) => {
    console.log("TEE Type:", att.teeType)
    console.log("TCB Status:", att.tcbStatus)
    console.log("Trusted:", att.trusted)
  }
})

const response = await fetch("/api/data")
console.log("Status:", response.status)
console.log("Attestation:", response.attestation)

AI SDK integration

Connect to an LLM running in a TEE:
import { createAtlsFetch } from "@concrete-security/atlas-node"
import { createOpenAI } from "@ai-sdk/openai"
import { streamText } from "ai"

const fetch = createAtlsFetch({
  target: "llm.example.com",
  policy: {
    type: "dstack_tdx",
    allowed_tcb_status: ["UpToDate"]
  },
  onAttestation: (att) => console.log(`TEE verified: ${att.teeType}`)
})

const openai = createOpenAI({
  baseURL: "https://llm.example.com/v1",
  apiKey: process.env.OPENAI_API_KEY,
  fetch
})

const { textStream } = await streamText({
  model: openai.chat("your-model"),
  messages: [{ role: "user", content: "Hello from a verified TEE!" }]
})

for await (const chunk of textStream) {
  process.stdout.write(chunk)
}
Use openai.chat(model) for OpenAI-compatible servers like vLLM. The default openai(model) uses the Responses API which most servers don’t support yet.

Next steps

Understanding the examples

All examples above use disable_runtime_verification: true or DstackTdxPolicy::dev() for development. This skips bootchain and application verification but still validates:
  • The server is running in a genuine TEE
  • The TCB status meets requirements
  • The attestation is cryptographically valid
Production deployments must provide full verification with expected_bootchain, os_image_hash, and app_compose. See Policy configuration for details.

Next steps

Platform guides

Complete guides for each platform

Policy configuration

Configure attestation policies for production

Examples

More examples and integration patterns

API reference

Complete API documentation

Build docs developers (and LLMs) love