Issue Verifiable Credentials to AI Agent
Issue a Credential to an AI Agent using cheqd's APIs.
Last updated
Was this helpful?
Issue a Credential to an AI Agent using cheqd's APIs.
Last updated
Was this helpful?
Once you have created your Trust Registry for the accreditation and authorisation of the organisations in your ecosystem, you can issue a credential to your AI Agent.
Each AI Agent must have its own DID to securely receive and manage credentials and accreditations. This identification allows the AI Agent to cryptographically control these credentials and accreditations.
As described in , you should have already designed and published schemas for your AI Agent ecosystem.
You must decide which schema to use for the credential you are issuing to the AI Agent. You should make sure that you, as an issuer, are accreditedToAttest
for the specific credential schema you want to use.
To ensure the AI Agent's credentials are demonstrably verifiable to a root of trust, certain steps are essential in the credential issuance process.
For subjectDid
use the DID created in Step 1.
An example of the request format is below:
The table below breaks down what components are required and why they are needed:
issuerDid
Yes
The Issuer DID issuing the credential to the AI Agent
subjectDid
Yes
The DID of the AI Agent
attributes
Yes
The specific permissions, scopes or attributes you want to issue to the AI Agent
type
Yes
The type of credential. This should match the types the issuer is accredited to issue,
format
No
Defaults to VC JWT
credentialSchema
Yes
The credential schema matching the attributes of the credential
termsOfUse
Yes
Pointers to the accreditations of the issuer
type
Yes
Must be attestationPolicy
parentAccreditation
Yes
Must point to the accreditation of the Issuer, matching the credential type and schema
rootAuthorisation
Yes
Must point to the root authorisation that has accredited DIDs higher in the trust chain.
Issue the compiled credential using the cheqd studio API enpoint below:
The Issuer, after issuing the credential to the AI Agent, may publish the response (the fully formatted verifiable credential) as a DID-Linked Resource.
The response format should look like the following example, including a proof (signed by the issuer).
You can follow the tutorial below to publish your issued credential as a DID-Linked Resource. Generally we suggest the resourceType
of VerifiableAttestation
for credentials issued to AI Agents.
This will store the schemas securely on the cheqd Network, where they can be fetched using DID URLs.
To complete the setup of your AI Agent trust registry and its associated credential, the final step is to provision this credential directly into the AI Agent's wallet using our MCP Server. Follow the tutorial below to finalize your setup!
Create AI Agent DID
Create a W3C conformant DID on cheqd using our MCP Server.
Create DID-Linked Resource
Link resources such as schemas to your DID, publishing as a DID-Linked Resource.
Provision Credential to AI Agent
Once you have issued your credential and have the JWT, you can provision this credential directly to the AI Agent using our MCP server.
This endpoint issues a Verifiable Credential. As input it takes the list of issuerDid, subjectDid, attributes, and other parameters of the credential to be issued.
Input fields for the creating a Verifiable Credential.
DID of the Verifiable Credential issuer. This needs to be a did:cheqd
DID.
did:cheqd:testnet:7bf81a20-633c-4cc7-bc4a-5a45801005e0
DID of the Verifiable Credential holder/subject. This needs to be a did:key
DID.
did:key:z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK
JSON object containing the attributes to be included in the credential.
{"name":"Bob","gender":"male"}
Optional properties to be included in the @context
property of the credential.
["https://schema.org/schema.jsonld","https://veramo.io/contexts/profile/v1"]
Optional properties to be included in the type
property of the credential.
["Person"]
Optional expiration date according to the <a href=https://www.w3.org/TR/vc-data-model/#expiration> VC Data Model specification.
2023-06-08T13:49:28.000Z
Format of the Verifiable Credential. Defaults to VC-JWT.
jwt
Possible values: Terms of use can be utilized by an issuer or a holder to communicate the terms under which a verifiable credential was issued.
{"type":"IssuerPolicy","id":"http://example.com/policies/credential/4","profile":"http://example.com/profiles/credential","prohibition":[{"assigner":"https://example.edu/issuers/14","assignee":"AllVerifiers","target":"http://example.edu/credentials/3732","action":["Archival"]}]}
RefreshService property MUST be one or more refresh services that provides enough information to the recipient's software such that the recipient can refresh the verifiable credential.
{"type":"ManualRefreshService2018","id":"https://example.edu/refresh/3732"}
Evidence property MUST be one or more evidence schemes providing enough information for a verifier to determine whether the evidence gathered by the issuer meets its confidence requirements for relying on the credential.
{"type":["DocumentVerification"],"id":"https://example.edu/evidence/f2aeec97-fc0d-42bf-8ca7-0548192d4231","verifier":"https://example.edu/issuers/14","evidenceDocument":"DriversLicense","subjectPresence":"Physical","documentPresence":"Physical","licenseNumber":"123AB4567"}