- I'll write the code myself
- Claude Code
- Codex
1
Get your API key
Go to the claim page and sign in. You get an API key and test credits instantly — no approval wait.
2
Set up your project
Create a fresh project and install the SDK:Then put the key from Step 1 into your shell’s environment — the code in the next step reads it from there, it isn’t written into any file:
Don’t pin an old version by habit.
@terminal3/t3n-sdk ships frequently (breaking grant-shape and other changes land in minor versions — see the Changelog), so npm install @terminal3/t3n-sdk with no version suffix — always latest — is the right default here. Pin an exact version only once you’ve deliberately decided to hold back, and check the changelog when you do bump.Using Next.js, Vite, or another bundler?
Using Next.js, Vite, or another bundler?
The SDK’s WASM component can break under Next.js/Turbopack, Vite, or older Webpack. If you hit a WASM parse/module-loading error, isolate it first with a plain Node script or server-only route; on Next.js, try a no-bundle exception for
@terminal3/t3n-sdk.3
Connect and authenticate
Create a file named
quickstart.ts in your project and paste this in. Don’t paste the code directly at your shell prompt — see Running the code samples in this guide for the cat > quickstart.ts << 'EOF' pattern this and every later step assumes:trustAnchor is required — T3nClient throws immediately if it’s missing. resolveTrustAnchor(env) is the right call for any hosted node; the only other valid value is the explicit opt-out { unsafe_trust_server: true }, for local dev nodes only. See Verify the trust anchor for what it’s actually checking.4
Run it
From the same directory as If you see a
quickstart.ts:did:t3n:... value printed, you’re connected.What’s next
You now have two things every later page assumes you already have: an authenticatedt3n client and its tenantDid. Keep both around (same variable names, same file) as you continue:
- Next: Set Up Dev Env, then create your organisation. Even working alone you need one: it’s how you create agents and fund them, and your agents pay for their own calls. Your tenant and contracts stay where they are.
- Then build something that actually runs inside the confidential-compute enclave → Write your first TEE contract, a private vault your agent can only ask yes/no questions of
- Letting an AI agent act on a user’s behalf → Member Delegation
- Understanding what
resolveTrustAnchoractually verifies → Verify the trust anchor - The shape of the whole ADK before you dive in further → ADK Tour
- Hit an error? → Common Errors