Verifiable credentials for AI agents: OID4VCI and OID4VP without a QR code IzySSI's approach to W3C Verifiable Credentials via OpenID for Verifiable Credential Issuance (OID4VCI) and OpenID for Verifiable Presentations (OID4VP) can be applied to AI agents by replacing the human QR-code step with a headless wallet, since the QR code only carries a URL that can instead travel in an API response. The article argues that API keys and copied session tokens tell a receiving service only that the caller holds a valid secret, not who delegated the task, which actions were delegated, on which resources, or until when. It recommends generating the agent's key as a non-exportable key in a cloud KMS or HSM, tying key access to Kubernetes workload identity via SPIFFE/SPIRE SVIDs, and using OID4VCI 1.0 key attestations so issuers do not bind credentials to arbitrary keys. Verifiable credentials for AI agents: OID4VCI and OID4VP without a QR code A person scans a QR code with the wallet on their phone. An AI agent calling an MCP server at 2 a.m. has no phone and no camera. The protocols underneath, OID4VCI and OID4VP, never needed either: the QR code only carries a URL. Agents act for someone, but their credentials do not say who An AI agent that triages incidents, opens pull requests or scales a deployment calls APIs, tools and MCP servers for a person or a team. In most setups it does so with an API key, a client secret or a token copied from a developer’s session. From that credential the receiving service learns one thing: the caller holds a valid secret. It does not learn who delegated the task, which actions were delegated, on which resources, or until when. A key created for one task keeps working for every task after it. If the key leaks, whoever holds it looks exactly like the agent. When something goes wrong, the audit log shows a key ID and people rebuild the rest from chat histories. Self-sovereign identity solves a similar problem for people. A holder carries signed claims from an issuer and proves them to a verifier, which checks the issuer’s signature without calling the issuer at presentation time. This article shows how the same model, with the same protocols izySSI uses for people, applies to AI agents that have neither a phone nor a camera. How izySSI works for people today izySSI connects Keycloak to W3C Verifiable Credentials through OpenID for Verifiable Credential Issuance OID4VCI and OpenID for Verifiable Presentations OID4VP . The human journey has four steps: 1. The user logs in to the organisation’s site through Keycloak. 2. The site shows a QR code that encodes a credential offer. 3. The user scans it with the izySSI Android wallet, which runs the OID4VCI exchange and stores the credential. 4. Later, a relying party shows another QR code with an OID4VP authorization request. The wallet asks for consent and sends a signed presentation. Look at what the QR code carries in steps 2 and 4. In the first case it is an openid-credential-offer:// link, with the offer inline or a credential offer uri that points to it. In the second it is an authorization request, usually as a request uri . The QR code moves a URL from a screen to the device that holds the keys. Everything after that is HTTPS between the wallet and the issuer or the verifier. For an agent, the screen and the device are the same process, so the URL can travel in an API response. A headless wallet for the agent A wallet has three jobs: it holds a private key, it stores credentials bound to that key, and it builds presentations when a verifier asks for them. None of these needs a user interface. A headless wallet is a library or a sidecar that does the same three jobs inside the agent’s runtime. The key is what every credential gets bound to, so its protection sets the value of the credential. Generate it in a cloud KMS or an HSM as a non-exportable key and let the wallet call the signing API: the agent process never sees the private key. On Kubernetes, tie access to that key to the workload identity. SPIFFE/SPIRE issues each pod an SVID after attesting the node and the workload, so only the intended service account in the intended namespace can request signatures. The identifier can be a DID did:web under the organisation’s domain, or did:jwk derived from the key or simply the public key as a JWK, which is what SD-JWT VC puts in the cnf claim for holder binding. A SPIFFE ID such as spiffe://acme.example/ns/ops/sa/release-agent can travel in the credential as an attribute, so a verifier can match the presentation to a workload. An issuer should not bind a credential to whatever key it receives. OID4VCI 1.0 defines key attestations: a signed statement, from the wallet provider or the platform, that a key lives in a given kind of protected storage. For mobile wallets the attestation comes from the phone’s hardware. For a headless wallet it can come from the HSM Google Cloud KMS, for example, produces attestation statements for HSM-protected keys or from an internal attestation service that trusts the SPIRE server. The issuer checks it before issuing anything. Issuing a delegation credential with OID4VCI The agent should not log in by itself: the authority it needs belongs to a person. Issuance therefore starts with the person, in the same Keycloak login they use today. sequenceDiagram autonumber actor U as User participant K as Keycloak / izySSI issuer participant A as AI agent headless wallet U- K: Log in OIDC + MFA U- K: Delegate to agent: actions, resources, duration K-- A: Credential offer by API pre-authorized code U-- A: tx code over a separate channel optional A- K: POST /token pre-authorized code, tx code K-- A: access token A- K: POST /nonce K-- A: c nonce Note over A: Sign proof JWT with KMS key, add key attestation A- K: POST /credential proofs.jwt K- K: Check proof, nonce, attestation, agent key K-- A: SD-JWT VC bound to the agent key cnf The person delegates to a specific agent The user logs in to the izySSI portal through Keycloak with their usual credentials and MFA, picks a registered agent and chooses what to delegate: actions, resources and a maximum duration. Keycloak already knows the user’s roles, so the portal can refuse to delegate more than the user holds. The credential offer reaches the agent by API Where the human flow renders a QR code, the issuer sends the credential offer to the agent’s registration endpoint, or the orchestrator that starts the agent job passes it in. The offer uses the pre-authorized code grant: { "credential issuer": "https://ssi.acme.example", "credential configuration ids": "AgentDelegation SDJWT" , "grants": { "urn:ietf:params:oauth:grant-type:pre-authorized code": { "pre-authorized code": "SplxlOBeZQQYbYS6WxSbIA", "tx code": { "length": 6, "input mode": "numeric" } } } } The pre-authorized code is a single-use bearer secret, so the offer should expire within minutes. The tx code adds a second factor delivered over a different channel: the orchestrator can read it from a secret store, or the user can paste it into the agent’s job. Token, nonce and credential requests The agent redeems the code at the token endpoint, gets a fresh c nonce from the nonce endpoint and signs a proof JWT typ: openid4vci-proof+jwt with its KMS key. The proof names the issuer as audience, carries the nonce, and includes the key attestation in its header. POST /token HTTP/1.1 Host: ssi.acme.example Content-Type: application/x-www-form-urlencoded grant type=urn:ietf:params:oauth:grant-type:pre-authorized code &pre-authorized code=SplxlOBeZQQYbYS6WxSbIA&tx code=493536 POST /credential HTTP/1.1 Host: ssi.acme.example Authorization: Bearer czZCaGRSa3F0MzpnWDFmQmF0M2JW Content-Type: application/json { "credential configuration id": "AgentDelegation SDJWT", "proofs": { "jwt": "eyJ0eXAiOiJvcGVuaWQ0dmNpLXByb29mK2p3dCIs..." } } The issuer checks the proof signature, the nonce, the attestation, and that the public key belongs to the agent the user selected. Then it issues a credential bound to that key. What the delegation credential contains With SD-JWT VC, the decoded payload looks like this: { "iss": "https://ssi.acme.example", "vct": "https://ssi.acme.example/vct/agent-delegation/v1", "sub": "spiffe://acme.example/ns/ops/sa/release-agent", "iat": 1795424400, "exp": 1795425300, "cnf": { "jwk": { "kty": "EC", "crv": "P-256", "x": "TCAER19Zvu3OHF4j4W4vfSVoHIP1ILilDls7vCeGemc", "y": "ZxjiWWbZMQGHVWKVQ4hbSIirsVfuecCE6t4jT9F2HZQ" } }, "delegation": { "delegated by": "maria.rossi@acme.example", "actions": "deployments:scale", "deployments:get" , "resources": "k8s:prod-eu-1/ns/checkout" , "max replicas": 10, "ticket": "OPS-4182" }, "status": { "status list": { "idx": 4182, "uri": "https://ssi.acme.example/status/agents/1" } } } cnf.jwk is the holder binding: only the agent’s key can present this credential. delegation is not a registered claim. Its structure is defined by the credential type in vct , which the issuer and the verifiers agree on. The expiry here is 15 minutes; for longer jobs, hours rather than months. status points to a Token Status List entry for revocation before expiry. Claims that not every verifier needs, such as the delegator’s email or the ticket number, can be selectively disclosable, so the agent reveals them only to verifiers that ask. W3C VC Data Model 2.0 also works here, secured with JOSE/COSE or a Data Integrity proof. izySSI issues W3C VCs for people today; for agents, the format follows what the verifiers accept. Machine-to-machine presentation with OID4VP On the verifier side, the QR code becomes an HTTP response. sequenceDiagram autonumber actor U as User participant A as AI agent headless wallet participant S as Service / MCP server verifier participant I as izySSI issuer A- S: Tool call without access token S-- A: 401 + OID4VP request uri A- S: GET request uri S-- A: Signed request client id, nonce, dcql query, response uri Note over A: Select credential, disclose claims, sign KB-JWT nonce, aud A- S: POST response uri: vp token, state direct post S- I: Issuer keys and status list cached S- S: Verify, then apply policy opt Sensitive action S- U: Approval request U-- S: Approve end S-- A: Short-lived DPoP-bound access token A- S: Tool call with token + DPoP proof S-- A: Result The service asks for a presentation The agent calls a protected API or MCP server without a valid access token. Where a website would show a QR code, the service answers 401 with a pointer to an OID4VP authorization request. No standard yet says how a 401 should carry that pointer. The MCP authorization specification uses OAuth 2.1 with protected resource metadata RFC 9728 , so the request can be advertised there or in a WWW-Authenticate parameter that both sides agree on. The request is a signed JWT. In OID4VP 1.0 the verifier states what it wants with a DCQL query: { "client id": "x509 san dns:mcp.acme.example", "response type": "vp token", "response mode": "direct post", "response uri": "https://mcp.acme.example/oid4vp/response", "nonce": "n-0S6 WzA2Mj", "state": "eyJhZ2VudCI6InJlbGVhc2UifQ", "dcql query": { "credentials": { "id": "delegation", "format": "dc+sd-jwt", "meta": { "vct values": "https://ssi.acme.example/vct/agent-delegation/v1" }, "claims": { "path": "delegation", "actions" }, { "path": "delegation", "resources" }, { "path": "delegation", "delegated by" } } } } The agent builds and sends the presentation The headless wallet checks who is asking the request signature and the client id , finds a credential that satisfies the query and applies its own rules. An agent should present only to verifiers it was configured for, because a phishing MCP server can ask for credentials too. For an SD-JWT VC, the wallet discloses the requested claims and appends a key binding JWT signed with the agent’s key. The KB-JWT contains the nonce , the verifier’s client id as audience and a hash of the presentation, so it cannot be replayed to another service. With response mode=direct post the wallet posts the result to response uri : POST /oid4vp/response HTTP/1.1 Host: mcp.acme.example Content-Type: application/x-www-form-urlencoded vp token={"delegation": "eyJhbGciOiJFUzI1NiIsInR5cCI6ImRjK3NkLWp3dCJ9...~WyJ...~eyJ0eXAiOiJrYitqd3Qi..." } &state=eyJhZ2VudCI6InJlbGVhc2UifQ What the verifier checks php flowchart TD R vp token received -- C1{Issuer signature