did:t3n DID plus an agent card that T3N hosts and serves for other agents and services to discover — no external storage required. Every step uses the t3n CLI that ships with the @terminal3/t3n-sdk package — no code required.
Onboarding, not permissions. This page gives an agent an identity and a card. It does not grant the agent access to anything — no user data, no contract functions. That’s a separate step the data owner performs afterwards: see Agent Auth.Two onboarding paths. This is the one where an agent registers itself — public and discoverable. If instead an organization provisions and owns the agent (with a card kept private by default), see Register an Organization-owned Agent.
- Download the SDK
- Get the agent’s key
- Get the agent’s DID
- Scaffold the agent card
- Host the agent card on T3N
- Verify the registration
All commands that talk to the network accept
--env testnet|production (or the T3N_ENV environment variable). Use --env testnet while you’re building — the examples below do.1
Download the SDK
The CLI is part of the TypeScript SDK. You can run it with zero install, or install it globally:The rest of this guide uses the global
t3n form; substitute npx @terminal3/t3n-sdk if you skipped the install.2
Get the agent's key
The agent’s identity key is a standard Ethereum-style secp256k1 private key (32 bytes,
0x-prefixed hex). The easiest way to get one is the claim page — it issues a key together with metered test credits, and registration is a write operation that consumes credits.Put the key in your shell’s environment; every signing command reads it from there (or from --api-key):There is no
t3n keygen command. Any tool that generates an Ethereum keypair produces a usable key — but a key generated outside the claim page starts with no credits, so the claim page is the practical path.3
Get the agent's DID
A T3N DID has the form
did:t3n:<40 hex characters>. The network binds it to your key the first time you authenticate — so you don’t compute it yourself, you read it back:4
Scaffold the agent card
The agent card is a JSON document, following the ERC-8004 registration format, that describes your agent and lists its service endpoints — including its A2A agent card. Scaffold one with:Run interactively, it walks you through name, description, image, and which services to include (A2A / MCP / DID). In scripts or CI it falls back to flags: Before moving on, replace the placeholders: point the
--out <file> (default agent-card.json), --name, --description, --image, --did, --x402, and --force to overwrite an existing file.The generated agent-card.json looks like this:A2A service endpoint at your agent’s real .well-known/agent-card.json URL, the MCP endpoint at your MCP server (or remove services you don’t offer), and make sure the DID service endpoint is your $AGENT_DID (the --did flag fills this in for you). Keep the whole card under 16 KiB — that’s the limit T3N accepts when it hosts the body in the next step.5
Host the agent card on T3N
T3N hosts the card for you — no external bucket, pinning service, or web server required. One command stores your That’s it — your card is now served, verbatim, at
agent-card.json and publishes it to a world-readable endpoint keyed by your DID:GET /api/agent-card/<did>. host-card does two things in one transaction: it stores the card privately under your DID, then publishes a public copy. Update it any time by editing the JSON and re-running host-card; take it down with t3n agent card-unpublish.T3N validates and serves the card body itself: it must be a single JSON object of at most 16 KiB, and it is served byte-for-byte at
GET /api/agent-card/<did>. This is the T3N-hosted path — you no longer need to host the JSON anywhere else.Under the Hood: what does host-card actually do?
Under the Hood: what does host-card actually do?
host-card opens an authenticated session with your agent key and runs two writes on the built-in tee:org-data/contracts TEE contract: it stores the card as ordinary org-data in your self-owned agent-cards scope (private, keyed by a deterministic entry id for your DID), then agent-card-publish copies that body into the world-readable public:agent_cards map the endpoint reads. You can only host or publish a card for your own DID; an organisation hosting on behalf of its agents uses --owner/--agent and a consent link (see Agent Auth).6
Verify the registration
Resolution is public — anyone can fetch your card without a key. Hit the endpoint directly:If you also registered a URI with Consumers verify ownership through the DID document itself: the
set-card, it appears in your DID document’s AgentService endpoint, resolvable through the public DID resolver (GET /api/did/<did>):verificationMethod binds the DID to the owner’s key, and the card body is served at the T3N endpoint above. t3n did get <did> prints the same view, and t3n agent registry <did> --full (authenticated) reads the full registry record directly from the contract.If the endpoint returns your card, you’re done — your agent is registered and discoverable on T3N.What’s next
- The agent now has an identity and is discoverable. Next, let it actually do something — granting permission to act on users’ data and contracts → Agent Auth and Delegate Access
- How DIDs work on T3N → Decentralized Identifiers
- Registration writes consume credits → Tokens