Skip to main content

Overview

An agent acts for real people, but to most sites it looks like any other bot. It gets blocked, sent through guest checkout, or asked for a password it shouldn’t hold. Sites have no way to know who it acts for. Sites that use Agent Acceptance can tell agents apart even without a credential, from the platform an agent declares, the requests it signs, and bot detection. None of that says which person the agent acts for. A credential is the strongest proof a site can get. See Accepting Agents at Your Site. Key challenges for agent builders:
  • Proving to a site that a verified person is behind the agent
  • Doing that without handing the agent the person’s passwords
  • Sharing only what each site needs, and nothing more
  • Cutting off an agent fast if its key is compromised or something changes
With KYA, Baselayer verifies the person once. When their agent needs to identify itself to a site, your backend asks Baselayer to mint a short-lived credential for that site. This works the same whether you run an agent platform or your business runs its own agents.
  • Each credential works at one site and only with the agent key it was issued for.
  • You can revoke a credential at any time, and sites refuse it in near-real time.
  • The credential carries identity, not spending authority or payment details.

Choose what a credential shares

A person’s credential can share only the customer ID and the checks that passed, or also the details the site’s profile asks for. You pick with the mint’s level. A business credential always takes level: L3. See Agents Acting for a Business. The level you send (L2 or L3) sets what the credential shares. The verification.level inside the credential (2 or 3) records which checks passed, and Baselayer sets it from those checks, not from your mint. The same person gets the same customer ID at one site across agents, keys, sessions and credentials. A different site gets a different ID.

How it works

1

Verify the person once

You send the person through Hosted Enrollment, a Baselayer-hosted flow in your brand. They enter their phone number, date of birth and country, type the code Baselayer texts them, and confirm their details.If you already collected the person’s details, you can send them through the API instead. Either way, the result is a stable individual_ref. People verified through the API don’t go through the phone and email checks, so their credentials carry no verification.level.See Hosted Enrollment and Verifying an Identity.
2

Create a key for the agent

Each agent generates and holds an Ed25519 key pair. The private key stays with the agent. You send only the public key when you ask Baselayer to mint a credential.
3

Find out what the site needs

The agent requests a protected page. The site answers 401 with a step-up. Its requirement names the keys the credential must prove and the exact fields the site may read.
4

Get a nonce

The agent calls the site’s POST /nonces and gets a single-use nonce and the site’s audience.
5

Mint a credential for that site

Your backend calls Baselayer with your API key, the site’s audience, the agent’s public key, the level and the fields the site’s requirement lists. Minting runs on your backend, so the API key stays off the agent.See Minting Credentials.
6

Present it

The agent signs the site’s nonce and audience with its private key, then presents the credential to the site. If the site accepts it, the site returns its own access token. See Presenting a Credential for the full exchange.
You can list the credentials Baselayer minted for you, look up a credential by ID, and revoke one before it expires. See Managing and Revoking Credentials and Audit Log.

Your first credential

Run one credential end to end in sandbox:
  1. Email support@baselayer.com to get your keys and a sandbox to test in.
  2. Verify the test person. With Sandbox selected, enroll them through your hosted enrollment flow with the phone number and date of birth in Run a full sandbox test.
  3. Mint a credential with your sandbox key and the test person’s individual_ref. See Minting Credentials. To test a production person instead, use the test mint.
  4. Present it to your test site, with sandbox credentials turned on there. See Presenting a Credential and Let your test site accept sandbox credentials.

What each party sees

Next steps