Home
Documentation / stack

Wallet4Agent — Technical Stack Overview

For developers building AI Agents with verifiable, accountable identity

This document provides a clean, implementation‑independent overview of the technical architecture and protocols used by Wallet4Agent.
It is written for Agent developers consuming Wallet4Agent — not for contributors modifying the internal codebase.
No internal code or repository access is required.

The goal is to understand:


🧭 1. Purpose of Wallet4Agent

AI agents must be able to:

Wallet4Agent provides exactly that.
It turns any AI agent into a verifiable digital entity with:


🏗️ 2. Architecture Overview

Wallet4Agent is composed of three main layers, all exposed through MCP tools:

  1. MCP Server
  2. Single RPC endpoint:
    POST https://wallet4agent.com/mcp
  3. JSON‑RPC based (tools/list, tools/call, initialize, ping, etc.)
  4. All operations (identity, credentials, verification, configuration) are available as tools.

  5. Identity Wallet

  6. Maintains a DID and DID Document for each Agent.
  7. Stores and manages verifiable credentials (SD‑JWT VC, VC JSON‑LD).
  8. Publishes public keys and optional Linked Verifiable Presentations.

  9. Authorization & Verification Layer

  10. Issues and validates access tokens for Agents (OAuth2).
  11. Integrates with external credential issuers (OIDC4VCI).
  12. Integrates with external verifiers (OpenID4VP / OIDC4VP) for user identity checks.

As an Agent developer, you only need to:

No database access, internal APIs, or KMS commands are required.


🆔 3. Identity Layer (DID & DID Document)

Each agent created through Wallet4Agent receives a W3C DID, typically:

did:web:wallet4agent.com:<unique-id>

This DID is associated with a DID Document that:

The DID Document is automatically updated when the developer:

This allows external systems (other agents, verifiers, infrastructures) to:


🔗 3.1 Linked Verifiable Presentations (Linked VP)

Linked Verifiable Presentations (Linked VP) allow Wallet4Agent to publish public verifiable credentials directly inside a DID Document...

🌐 3.2 DID Resolution (How Agents Discover Other Agents)

Any system can resolve a DID using a universal resolver such as https://dev.uniresolver.io/...

🔐 4. Cryptography & Key Management

4.1 KMS‑Bound Keys (Server‑controlled signing keys)

Wallet4Agent uses a per‑agent, cloud KMS key for critical signatures.

Key characteristics:

This ensures:

In public documents (like the DID Document), these keys appear as JWK values, but only the public part is published. The private key remains in KMS.

4.2 Developer‑supplied keys

Developers may add additional public keys to the wallet (via MCP tools). Typical uses:

Only public keys are stored and published.
The developer keeps and manages the corresponding private keys.


🔑 5. Authentication & Authorization

Wallet4Agent supports multiple actor roles and authentication mechanisms.

5.1 Developer Authentication (Dev PAT)

Developers authenticate using a Developer Personal Access Token (Dev PAT):

All administrative tools (configuration, rotation, key management, deletion) require a valid Dev PAT.

5.2 Agent Authentication Options

Agents authenticate separately from Developers. Available options:

Option A — Agent Personal Access Token (PAT)

Option B — OAuth 2.0 Client Credentials

Agents can act as OAuth clients, obtaining access tokens from the authorization server associated with Wallet4Agent.

Supported client authentication methods:

  1. client_secret_post
  2. client_secret_basic

In both cases, the agent is identified by:

Wallet4Agent functions as the Authorization Server (AS) issuing OAuth2 access tokens for Agents.
The Agent then calls the MCP endpoint with:

Authorization: Bearer <access_token>

Option C — OAuth 2.0 with private_key_jwt

For higher security and strong binding to keys controlled by the developer, Wallet4Agent also supports private_key_jwt:

This method is ideal when:


📜 6. Verifiable Credential Issuance (OIDC4VCI)

Wallet4Agent handles credential issuance from external issuers using OIDC4VCI.

Supported credential formats:

High‑level flow (from the Agent or Developer perspective):

  1. You obtain a credential offer (URL or JSON) from a trusted issuer.
  2. The Agent instructs Wallet4Agent, via MCP, to accept this credential offer.
  3. Wallet4Agent:
  4. Fetches issuer metadata:
    • openid-credential-issuer
    • oauth-authorization-server
  5. Acts as an OAuth client to that issuer.
  6. Wallet4Agent obtains a credential issuance access token.
  7. Wallet4Agent generates a proof of key ownership:
  8. A dedicated JWT signed by the agent’s KMS‑backed key
  9. Proves that the DID (and wallet) controls the key referenced in the credential.
  10. Wallet4Agent sends a credential request with this proof.
  11. The issuer returns a Verifiable Credential (SD‑JWT VC or VC JSON‑LD).
  12. Wallet4Agent stores the credential in the agent’s wallet as an attestation.
  13. The Agent can retrieve or present this credential via MCP tools.

All critical proofs and signatures in this flow are bound to the KMS key associated with the agent, not to any local file‑based key.


🧾 7. Verifying Users (OIDC4VP)

Wallet4Agent also integrates with OIDC4VP verifier services to validate user identities.

From the Agent’s perspective:

  1. The Agent calls a verification tool (via MCP) to start a user verification session.
  2. Wallet4Agent (or its verifier backend) returns:
  3. A QR code (image) or deeplink URL that the end‑user can open in their wallet app.
  4. A session_id or correlation identifier.
  5. The Agent displays the QR code or link to the user.
  6. The user scans with their EUDI wallet or compatible OIDC4VP wallet, and consents to share attributes.
  7. The Agent then periodically calls another MCP tool to poll the verification status.
  8. When verification completes, Wallet4Agent returns structured claims such as:
  9. Verified email
  10. over_18 or other age/eligibility attributes
  11. Profile attributes (name, country, assurance level, etc.)
  12. A wallet‑specific identifier, if relevant

Design principle:


📦 8. Credential Storage & Retrieval

Each Agent wallet can hold multiple credentials. Conceptually, each credential record contains:

MCP tools allow an Agent to:

Wallet4Agent does not require the Agent to care about internal storage format; all details are surfaced in a structured, MCP‑friendly way.


🌐 9. Protected Resource Metadata (OAuth PRM)

To make Agent integration easier, Wallet4Agent publishes OAuth Protected Resource metadata in line with RFC 9728, for example:

/.well-known/oauth-protected-resource/mcp

This metadata indicates:

Result: a compliant OAuth2 client (your Agent infrastructure, gateway, or platform) can automatically discover how to authenticate against the Wallet4Agent MCP server.


🤝 10. Responsible AI & Human‑in‑the‑loop

Each agent wallet includes configuration that can be used to enforce responsible behaviour, such as:

This can be used (by the developer or platform) to:

These features are optional but recommended for sensitive or regulated use cases.


🛡️ 11. Why Wallet4Agent is Secure by Design

Wallet4Agent is built around a few strong security principles:

The result: a foundation appropriate for industrial‑grade agentic systems where identity, trust, and accountability cannot be optional.


🧩 12. Summary for Developers

If you are an Agent developer, Wallet4Agent gives you:

Feature What you get
🆔 Agent identity DID + DID Document
🔑 Authentication Dev PAT, Agent PAT, OAuth2 Client Credentials, private_key_jwt
🔐 Cryptographic keys Cloud KMS signatures, non‑exportable
📜 Credential issuance Full OIDC4VCI support (SD‑JWT VC & VC JSON‑LD)
✅ Credential verification OIDC4VP with simple MCP tools and safe derived claims
👤 Human interaction QR code → wallet → verified attributes
🤝 Inter‑agent trust Ability to inspect credentials of other agents (when authorized)
⚙️ Configuration Auth mode, keys, policies all manageable via MCP
🛡️ Security KMS, OAuth2, DID rotation & key updates, role‑separated tokens

Your AI Agent becomes a verifiable digital entity, capable of participating in decentralized and regulated digital identity ecosystems while preserving security and accountability.


Maintainer: Wallet4Agent (Web3 Digital Wallet / Talao )
For feedback or additional documentation, use the contact channels on the Wallet4Agent website.

Standard Purpose Link
DID Core Core DID specification https://www.w3.org/TR/did-core/
Linked Verifiable Presentations Public VCs in DID Documents https://identity.foundation/linked-vp/spec/v1.0.0/
OIDC4VCI Credential issuance https://openid.net/specs/openid-4-verifiable-credential-issuance-1_0.html
OIDC4VP Credential presentation https://openid.net/specs/openid-4-verifiable-presentations-1_0.html
W3C Verifiable Credentials VC Data Model https://www.w3.org/TR/vc-data-model-2.0/
SD-JWT VC (IETF) Selective disclosure credential format https://www.ietf.org/archive/id/draft-ietf-oauth-sd-jwt-vc-12.html