Education

Know Your Agent (KYA): How to Vet an AI Agent Before You Serve, Pay or Lend to It

Know Your Agent is the check a merchant, an API or a lender runs before dealing with an autonomous AI agent: who registered it, which wallet it pays from, whether either is sanctioned, and whether its endpoints are really its own. Here is what a KYA check covers and how to run one.

Julian Gay
Julian Gay
Cred Protocol
November 23, 2026
7 min read
Know Your Agent (KYA): How to Vet an AI Agent Before You Serve, Pay or Lend to It

What Know Your Agent Means

Know Your Customer asks who a person is before a business serves them. Know Your Agent (KYA) asks the same question about software that acts on its own: an AI agent that pays for an API, places a trade or asks for credit, with no person approving each step.

The question is practical. An agent arrives as a wallet address and, sometimes, a name it gave itself. Before you settle its payment or extend it a credit line, you want to know four things:

  • Is it a registered agent at all? And if so, since when?
  • Who controls it? Which wallet registered it, and which wallet does it transact from?
  • Is anyone in that picture sanctioned, or funded by someone who is?
  • Is it who it says it is? Anyone can write "api.bigbank.com" into a profile.

None of these needs a passport scan. Agents that register on the ERC-8004 registries leave a public record: a registration file, an owner, a wallet, a mint date. The wallets behind them have transaction histories. A KYA check reads those records and turns them into an answer you can act on.

Why KYC Does Not Stretch to Agents

KYC assumes a person or a company at the other end, with documents to show. An agent has neither. It may be run by a company that has passed KYC somewhere, by a developer experimenting over a weekend, or by another agent. The party you are dealing with at the moment of payment is the software and its wallet.

That changes what can be verified. You cannot ask an agent for identification, but you can verify things a document never could: that the wallet paying you really controls the agent it claims to be, that the domain it advertises vouches for it, and that its money did not come from a sanctioned address. These are checks on behaviour and control, read from public data, and they can run in the second or so before a payment settles.

What a KYA Check Covers

Cred Protocol's Know Your Agent endpoint returns one profile for an agent, given either its ERC-8004 agent ID or just the wallet that is paying you. The profile has five parts.

SectionWhat it tells you
IdentityThe agent's name, description and advertised services from its registration file, when it was registered, and whether each endpoint's domain vouches for it
OperatorThe owner wallet, the one that registered the agent and can transfer it: its Cred score, age, transaction count and account type
Agent walletThe wallet the agent transacts from, with the same fields plus its liquidation history
ComplianceAn OFAC screen of both wallets, the agent wallet's first funding source, and every sanctioned counterparty it has dealt with on Base and Ethereum
ReputationCred's ERC-8004 feedback entries about the agent

Domain proof

The identity section deserves a closer look, because it closes the easiest impersonation route. A registration file can claim any endpoint. KYA counts a domain as verified only when the domain itself says so: it must serve a small JSON file at /.well-known/agent-registration.json that names this agent on this registry. A domain that names other agents but not this one is reported as a mismatch, which is a stronger warning than no file at all.

Flags and a Verdict

A profile is only useful if software can act on it, so every check ends in coded flags and one of three verdicts.

  • Block. The owner or the agent wallet is on an OFAC list. This is the only automatic refusal.
  • Review. Something needs a decision: the wallet was first funded by a sanctioned address, it has transacted with one, the agent was registered less than 30 days ago, its endpoints are unverified, or part of the check could not complete.
  • Pass. No flags, or only informational ones such as a past liquidation.

Two design choices matter here. First, flag codes (K01 to K13) are stable, so a policy written against them keeps working. Second, a check that could not run never passes. If a registry or a data provider did not answer, the verdict is at least "review", and the response lists what was unavailable.

What you do with a review verdict is yours to decide, and it usually depends on the amount. A new, unverified agent paying two cents for an API call is a different risk from the same agent asking for a credit line. A sanctioned funding source is a reason to refuse at any size.

Running a Check

One request, by wallet:

curl https://api.credprotocol.com/api/v2/agents/by-wallet/0xPAYER/kya \
  -H "Authorization: Bearer YOUR_API_KEY"

The response is abridged here:

{
  "agent_id": 22,
  "verdict": "review",
  "flags": [
    { "code": "K08", "flag": "new_registration", "severity": "review" }
  ],
  "identity": { "name": "Shop Agent", "registration_age_days": 14 },
  "operator": { "subject_type": "eoa", "score": 742, "wallet_age_days": 812 },
  "agent_wallet": { "subject_type": "smart_wallet", "score": 655, "wallet_age_days": 41 },
  "compliance": { "sanctioned": false, "exposure_risk": "none" }
}

A check costs 10 Cred Units. If the agent does not exist, or the wallet controls no agent, you get a 404 before anything is charged. The call can be paid with an API key or per request over x402 or MPP, which means an agent can check another agent without an account.

KYA at the Moment of Payment

The natural place for the check is the payment itself. If you sell over x402, you learn who is paying only when the payment header arrives. The Cred SDK adds a hook that runs between the facilitator's verify step and its settle step:

import { registerCredKya } from '@cred-protocol/sdk';

registerCredKya(server, { apiKey: process.env.CRED_API_KEY! });

The position is deliberate. Running after verify means only a payer who really signed the payment is looked up, so nobody can spend your lookups with a forged address. Running before settle means a refused payer's funds never move. The policy is configurable: which review flags refuse, what to do with a plain wallet that controls no agent, and whether to accept or refuse if the check cannot be completed in time. The TypeScript and Python SDK pages list every option.

What KYA Is Not

  • It is not identity verification of a person. KYA describes an agent and its wallets. It does not tell you who the human or company behind the agent is, and it is delivered as commercial analytics, not as a consumer report.
  • It covers registered agents. The profile is built from the ERC-8004 registry on Base. A wallet that controls no registered agent has no profile; you can still screen it against sanctions lists.
  • Sanctions coverage is OFAC. The SDN and Consolidated lists are checked. Other national lists are not included today.
  • A pass is not a guarantee. It says none of the checks found a problem. An agent with a clean record can still misbehave tomorrow, which is why reputation that accumulates over time matters alongside a point-in-time check.

Where to Start

If agents already pay you, the lowest-effort step is the x402 hook with its default policy: payers on a sanctions list, funded by a listed address or transacting with one are refused, everything else settles, and every decision is available to your audit log. From there, tighten the policy as you learn which flags matter for your product.

The Know Your Agent documentation has the full flag table, the response schema and the domain-proof format. To try it, create an API key and look up an agent you already deal with.

Ready to integrate credit scoring?

Start building with Cred Protocol today. Free sandbox access included.