# The discovery profile

The public format of a business's signed discovery profile, version 1, with its JSON Schema, so any tool can read and verify one.

The discovery profile is a signed JSON document that says a business accepts Provenance approvals, what its rules are and which agents sell for it. Any tool can read and verify one with this page and the [JSON Schema](https://provenanceauth.com/schemas/provenance-profile/v1.json).

**Status:** working draft of format version 1, maintained by Provenance. New optional fields may be added within version 1; a field's meaning never changes within a version. Other tools are welcome to read and serve it.

## When to use it

- You build a buyer agent and want to know, before you buy, whether a business accepts Provenance and when a person must approve.
- You need to tell a business's real selling agent from an agent on a lookalike domain.
- You build a crawler, directory or payment tool that reads business capabilities.

## How it works

1. A business with a verified domain chooses what to publish. Provenance generates the profile and signs it.
2. The profile is served at `GET /v1/public/businesses/{business}/profile` and, optionally, at the business's own `/.well-known/provenance.json`. Its URL also rides in the business's x402, ACP, AP2 and checkout answers.
3. A reader verifies the signature against the issuer's JWKS, then reads the fields.

### Fields

- `object` (string): Always `provenance_profile`.
- `version` (string): The format version, `"1"`.
- `business` (object): `id` (`biz_…`), `name`, and `origins`: the domains the business proved it controls, by a well-known file or a DNS TXT record.
- `accepts` (object): What the business accepts: Provenance approvals (always true in a published profile), network permissions, and its payment rails.
- `rules` (object): `person_required_over` (orders above it, in `currency`, need a person's approval; null when not published) and `currency` (ISO 4217).
- `categories` (string[]): Lowercase slugs the business chose.
- `selling` (object[]): Each selling agent: `agent_id`, `name`, `kids` (its active Ed25519 key ids), `origin`, `endpoints` (`a2a`, `mcp`, `offers`, each present only when set), `categories`, and `seller_confirmation` (`offered`, `min_amount`, `response_time`).
- `profile_url` (string): Where the hosted copy lives.
- `directory_url` (string): The business's page in the Provenance directory.
- `schema` (string): The JSON Schema of this format.
- `revision` (integer): Raised each time the content changes.
- `updated_at` (string): When the content last changed (ISO 8601).
- `signature` (string): A compact JWS. See below.

The profile never holds people, prices or volumes.

### The signature

`signature` is an ES256 compact JWS with header `typ: provenance-profile+jwt` and a `kid` from the issuer's `/.well-known/jwks.json`. Its payload:

```json
{
  "iss": "https://api.provenanceauth.com",
  "sub": "biz_01JDSAMPLE0SALTMARSH0DATA00",
  "iat": 1793880000,
  "exp": 1796472000,
  "revision": 3,
  "profile_sha256": "9b1c…"
}
```

To verify a copy:

1. Check the JWS with the issuer's key for its `kid`, and that `exp` hasn't passed.
2. Check that `sub` equals `business.id`.
3. Remove `signature` from the profile, serialize the rest as canonical JSON (keys sorted at every depth, no whitespace) and check that its SHA-256, in lowercase hex, equals `profile_sha256`.

The signature lasts 30 days and the hosted copy is signed again daily. `verifyProfile` and `verifySellerAgent` in the TypeScript SDK, `verify_profile` and `verify_seller_agent` in the Python SDK, and `VerifyProfile` and `VerifySellerAgent` in Go do all three.

### On a business's domain

`/.well-known/provenance.json` holds the same signed document, byte for byte. It also proves the domain for the store directory and the seller check, in place of `provenance-store.json` and `provenance-agent.json`. Pages may point to it with `Link: </.well-known/provenance.json>; rel="provenance"`.

For each selling agent with an A2A endpoint, an A2A agent card (A2A 1.0) is generated at `GET /v1/public/businesses/{business}/agents/{agent_id}/agent-card.json`. Its extension entry names this format's schema URL and carries the profile's URL, the agent id and its key ids. A domain's own `/.well-known/agent-card.json` always takes precedence.

## Related

- [Be findable by agents](https://provenanceauth.com/docs/authorize/guides/be-findable-by-agents.md)
- [Find a business](https://provenanceauth.com/docs/authorize/guides/find-a-business.md)
- [Verify tokens offline](https://provenanceauth.com/docs/authorize/guides/verify-tokens.md)
