Register your agent so Herald lets it in
Herald admits an agent when five things are true on Concordium testnet:
- It is registered in the CIS-8004 Agent Registry
<12802,0>CCDExplorer ↗ and its status is Active. - The Agent Card at its
agent_urihashes (SHA-256 of the raw bytes) to themetadata_hashpinned on chain. - The card carries a Verified by Concordium badge in
capabilities.extensions[]. - Its owner has proved with Concordium ID that a real person, over 18, birthday never shown, stands behind it (see Prove a person stands behind it).
- It pays from its
agentWallet(or, if none is set, from the owner account).
The owner account is a normal Concordium account, so an Identity Provider already checked the person behind it. Herald asks for one zero-knowledge statement on top, so a real person, over 18, birthday never shown, stands behind the badge, and learns nothing else.
The easy way: from your browser
Open /register, connect the Concordium Browser Wallet (testnet), name your agent and approve two transactions. Your wallet's account becomes the badge's owner, you pay the testnet fees yourself (in the first real run they were 22.80 and 17.94 testnet CCD, so the account needs about 40), and Herald hosts the cards. Then you land on the prove page for your badge, where your own Concordium ID proof makes it pass. Herald never holds your keys. The steps below are the same flow by hand, for any stack.
The short version (any stack)
Every step below uses the hosted registry service https://agent-registry-mcp.concordium.com/mcp, which holds no keys. You sign with your own wallet.
build_agent_cardwith your name, description,agent_uriand owner account. The badge hastokenAddress: nullfor now.- Host the returned JSON byte for byte at
agent_uri. Don't reformat it. build_registerwith thatagent_uriand the card's SHA-256, then sign and send it as a contract update to<12802,0>CCDExplorer ↗. Note yourtoken_id.build_agent_cardagain with thetoken_id(orbuild_agent_badge). Host it at a new, versioned URL.build_set_agent_uriwith the new URL and the new hash in one transaction. Sign and send.check_badgemust saybadge_valid: truewith no issues. Then try Herald's free check:GET /api/check/<your badge>.
Exact commands for Herald's own demo agents
All commands run from the repo root with CONCORDIUM_NETWORK=testnet. Keys come only from env vars
(<ROLE>_WALLET_EXPORT = path to a wallet export JSON, or <ROLE>_WALLET_EXPORT_B64 = its base64).
If a key is missing, each script writes a sign-ready payload to out-payloads/ (gitignored), prints the next step and exits 0.
--dry-run never reads a key.
Roles: herald (HERALD_OWNER), badged (VISITOR_BADGED), revoked (VISITOR_REVOKED), stranger (VISITOR_STRANGER), sponsor (FACILITATOR_SPONSOR).
BASE below is the deployment that hosts the cards, e.g. https://herald-xxxx.vercel.app. It must be publicly reachable (Deployment Protection off for that deployment, or a public alias) so the registry can fetch and hash the cards.
0. Accounts
Create five throwaway testnet accounts in the Concordium wallet with the test Identity Provider, fund each from the testnet faucet, and export each as a wallet export JSON. Herald owner also receives payments (HERALD_PAYTO_ADDRESS), or use a sixth account.
| Role | Needs CCD for |
|---|---|
| Herald owner | registry txs (a few CCD) |
| Facilitator sponsor | fees of every paid admission (keep 50+ CCD) |
| Badged visitor | registry txs + 7 CCD per pass |
| Revoked visitor | registry txs |
| Stranger | 7 CCD (it tries to pay with the borrowed badge; no funds move) |
1. Herald
export CONCORDIUM_NETWORK=testnet BASE=https://herald-xxxx.vercel.app
pnpm tsx scripts/build-card.ts --name herald --base-url $BASE # pass 1 card, v1
git add public/cards && git commit -m "cards: herald v1" && git push # deploy so $BASE/cards/herald-v1.json is live
pnpm tsx scripts/register-agent.ts --name herald # prints token_id and badge
pnpm tsx scripts/build-card.ts --name herald --base-url $BASE --token-id <T> # pass 2 card with the real badge, v2
git add public/cards && git commit -m "cards: herald v2" && git push # deploy v2
pnpm tsx scripts/pin-card.ts --name herald --token-id <T> # setAgentURI + hash, then check_badge must be valid
Set HERALD_BADGE=<badge> in Vercel.
2. Badged visitor
Same sequence with --name visitor-badged. Its agentWallet defaults to its own account at registration, which is what the demo needs.
If you want a separate payment wallet: pnpm tsx scripts/set-agent-wallet.ts --role badged --token-id <T> --wallet-role <role>.
Set VISITOR_BADGED_BADGE=<badge> in Vercel.
3. Revoked visitor
Same sequence with --name visitor-revoked, then:
pnpm tsx scripts/revoke-agent.ts --role revoked --token-id <T>
pnpm tsx scripts/mcp.ts check_badge id=<badge> # on_chain.status: "Revoked"
Set VISITOR_REVOKED_BADGE=<badge> in Vercel.
4. Stranger
Nothing to register. Its account just needs 7 CCD. Set VISITOR_STRANGER_WALLET_EXPORT_B64 in Vercel.
Checks
pnpm tsx scripts/mcp.ts contract_info # <12802,0>
pnpm tsx scripts/sign-and-send.ts --file out-payloads/<x>.json --dry-run # decode any payload, no key
pnpm tsx scripts/verify-served-cards.ts $BASE # served bytes hash == file hash
curl $BASE/api/check/<badge> # Herald's free check, steps 1 to 7
Prove a person stands behind it
Door step 7 passes only when the badge's owner has proved with Concordium ID that a real person, over 18, birthday never shown, stands behind it. The proof is zero-knowledge: Herald learns that the statement holds, nothing personal.
POST /api/id/challenge {"badge": "<badge>"}returns a single-use nonce (10 minutes) and the request: statement: adobrange on the account credential (the one Concordium ID statement Herald asks for),ConnectionID=herald,ResourceID=badge:<badge>, requestedBlockHash.- Build a
VerifiablePresentationV1account proof from the owner account's credential with that context and a recent finalized block hash. A Concordium wallet that supports Verify and Access can do this; so canpnpm id:attestwith the identity seed. POST /api/id/attest {"badge", "presentation"}. Herald checks the proof's credential belongs to the badge's owner account, the badge, the nonce and the block, then verifies it on chain. The attestation lasts 30 days.GET /api/id/attestation/<badge>shows the stored proof and re-verifies it against the chain right now.
HERALD_ID_SEED_FILE=seed.txt HERALD_ID_OBJECT_FILE=identity-object.json \
pnpm id:attest -- --base $BASE --badge <badge> --cred-index <owner credential index>
# attested badge=… owner=… statement=dob<=… block=… reverified=true
Cards on a stable URL
Cards are served byte for byte from public/cards/ on any host. HERALD_CARDS_BASE_URL (default HERALD_PUBLIC_URL) is where new card versions say they live. The stable base is https://useherald.vercel.app.
pnpm repin:all -- --base https://useherald.vercel.app # dry run: builds v3 cards, checks served bytes, prints the plan
pnpm repin:all -- --base https://useherald.vercel.app --agent-llm-token <id> --send # after deploying: re-pins every agent
Old card versions stay in place, so nothing breaks before the re-pin.