TODO: This section needs further development and refinement.
TODO: This section needs further development and refinement.
TODO: This section needs further development and refinement.
As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.
The key words MAY and MUST in this document are to be interpreted as described in BCP 14 [[RFC2119]] [[RFC8174]] when, and only when, they appear in all capitals, as shown here.
The primary objective of the Agent Identity module is to address the interconnection and interoperability challenges between any two agents, particularly when these agents belong to different companies, organizations, or development platforms. They must be able to mutually identify, establish trust, and transfer identity information:
Therefore, agent identity protocols must possess excellent interoperability.
Decentralized Identifiers (DIDs) provide a standards-based, verifiable identity primitive for agents to identify, authenticate, and authorize each other across heterogeneous ecosystems.
did:wba:agent.example.com:alice
resolves to https://agent.example.com/alice/did.json
), enabling straightforward discovery without bespoke networks.Note: The did:wba method follows a Web-anchored resolution model aligned with existing enterprise and public Internet deployments.
Method reference: did:wba method design specification
When a client makes a request to a service on different platforms, the client can use the domain name combined with TLS to authenticate the service. The service then verifies the identity of the client based on the verification methods in the client's DID document.
The client can include the DID and signature in the HTTP header during the first HTTP request. Without increasing the number of interactions, the service can quickly verify the identity of the client. After the initial verification is successful, the service can return a access token to the client. The client can then carry the access token in subsequent requests, and the service does not need to verify the client's identity each time, but only needs to verify the access token.
When the client first makes an HTTP request to the service, it needs to authenticate according to the following method.
The client sends the following information through the Authorization header field to the service:
did:wba:example.com%3A8800:user:alice#key-1
, the verification method's DID fragment is key-1
.Client request example:
Authorization: DIDWba did="did:wba:example.com%3A8800:user:alice", nonce="abc123", timestamp="2024-12-05T12:34:56Z", verification_method="key-1", signature="base64url(signature_of_nonce_timestamp_service_did)"
The client generates a string containing the following information:
{
"nonce": "abc123",
"timestamp": "2024-12-05T12:34:56Z",
"service": "example.com",
"did": "did:wba:example.com:user:alice"
}
After receiving the client's request, the service performs the following verification:
verification_method
in the request.nonce
, timestamp
, service
, did
, and verification_method
from the Authorization header.{
"nonce": "abc123",
"timestamp": "2024-12-05T12:34:56Z",
"service": "example.com",
"did": "did:wba:example.com:user:alice"
}
did
and verification_method
.After the service successfully verifies the client's identity, it can return a access token in the response. The access token is recommended to be in JWT (JSON Web Token) format. The client can then carry the access token in subsequent requests, and the service does not need to verify the client's identity each time, but only needs to verify the access token.
The following generation process is not required by the specification, but is provided for reference. Implementers can define and implement it as needed.
JWT generation method reference RFC7519.
Generate Access Token
Assuming the service uses JWT (JSON Web Token) as the access token format, JWT typically contains the following fields:
The payload can include the following fields (other fields can be added as needed):
{
"sub": "did:wba:example.com:user:alice", // User DID
"iat": "2024-12-05T12:34:56Z", // Issued time
"exp": "2024-12-06T12:34:56Z", // Expiration time
}
Implementers can add other security measures in the payload, such as using scope or binding IP addresses.
Return Access Token The generated header, payload, and signature are concatenated and URL-safe Base64 encoded to form the final access token. Then, the access token is returned through the Authorization header:
Authorization: Bearer <access_token>
Client Send Access Token The client sends the access token through the Authorization header field to the service:
Authorization: Bearer <access_token>
Service Verify Access Token After receiving the client's request, the service extracts the access token from the Authorization header and verifies it, including verifying the signature, verifying the expiration time, and verifying the fields in the payload. The verification method is based on RFC7519.
401 Response
When the server fails to verify the signature and requires the client to reinitiate the request, it should return a 401 response.
Additionally, if the server doesn't support recording client request Nonces, or requires clients to always use server-generated Nonces for signing, it may return a 401 response with an authentication challenge containing a Nonce for each initial client request. However, this increases the number of client requests, and implementers can choose whether to use this approach.
Error information is returned through the WWW-Authenticate header field, for example:
WWW-Authenticate: Bearer error="invalid_nonce", error_description="Nonce has already been used. Please provide a new nonce.", nonce="xyz987"
Contains the following fields:
invalid_request
: Request format error, missing required fields, or contains unsupported parameters.invalid_nonce
: Nonce has already been used.invalid_timestamp
: Timestamp is out of range.invalid_did
: DID format error, or unable to find corresponding DID document.invalid_signature
: Signature verification failed.invalid_verification_method
: Unable to find corresponding public key based on verification method.invalid_access_token
: Access token verification failed.forbidden_did
: DID lacks permission to access server resources.When the client receives a 401 response, if the response contains a Nonce, the client must use the server's Nonce to regenerate the signature and reinitiate the request. If the response doesn't contain a Nonce, the client must use a client-generated Nonce to regenerate the signature and reinitiate the request.
It's important to note that both client and server implementations should limit the number of retry attempts to prevent infinite loops.
403 Response
When server authentication succeeds but the DID lacks permission to access server resources, a 403 response should be returned.
The following example demonstrates a DID document using the did:wba method:
{
"@context": [
"https://www.w3.org/ns/did/v1",
"https://w3id.org/security/suites/ed25519-2020/v1"
],
"id": "did:wba:agent.example.com:alice",
"verificationMethod": [
{
"id": "did:wba:agent.example.com:alice#key-1",
"type": "Ed25519VerificationKey2020",
"controller": "did:wba:agent.example.com:alice",
"publicKeyMultibase": "z6MkhaXgBZDvotDkL5257faiztiGiC2QtKLGpbnnEGta2doK"
}
],
"authentication": [
"did:wba:agent.example.com:alice#key-1"
],
"service": [
{
"id": "did:wba:agent.example.com:alice#agent-desc",
"type": "AgentDescription",
"serviceEndpoint": "https://agent.example.com/alice/description.json"
}
]
}
This DID resolves to: https://agent.example.com/alice/did.json
Note: This section is being continuously refined. We sincerely invite community members to contribute and jointly improve the technical specifications and implementation solutions for agent identity standards.
The core objective of the Agent Description module is to establish standardized agent description mechanisms, enabling agents to clearly publish their basic information, service capabilities, and interaction interfaces to other agents in the network, thereby achieving efficient capability discovery and collaboration matching:
Therefore, agent description protocols must possess good extensibility and semantic clarity, ensuring that different agents can accurately understand each other's capability boundaries.
The following example demonstrates an agent description document:
{
"@context": {
"@vocab": "https://schema.org/",
"ad": "https://example.com/ad#"
},
"@type": "ad:AgentDescription",
"name": "SmartAssistant",
"did": "did:wba:agent.example.com:alice",
"description": "An intelligent agent providing natural language processing capabilities",
"version": "1.0.0",
"interfaces": [
{
"@type": "ad:NaturalLanguageInterface",
"protocol": "YAML",
"url": "https://agent.example.com/alice/nl-interface.yaml"
}
]
}
Note: This section is being continuously refined. We sincerely invite community members to contribute and jointly improve the technical specifications and implementation solutions for agent description standards.
The core objective of the Agent Discovery module is to establish efficient agent discovery mechanisms, enabling agents to be conveniently found and accessed by other agents in different network environments, thereby building dynamic and open agent collaboration networks:
Note: This section is being continuously refined. We sincerely invite community members to contribute and jointly improve the technical specifications and implementation solutions for agent discovery standards.
The core objective of the Security Considerations module is to ensure the security of agents during interactions, establish multi-layered security protection systems, and maximize defense against various security threats and malicious attacks:
Therefore, agent security protocols must adopt defense-in-depth strategies, establishing corresponding security protection measures at the network layer, application layer, and data layer.
Note: This section is being continuously refined. We sincerely invite community members to contribute and jointly improve the technical specifications and implementation solutions for agent security standards.
The core objective of the Privacy Considerations module is to maximize the protection of personal privacy during agent interactions, ensuring that users' sensitive information is not improperly transmitted or leaked between agents, and establishing privacy-first interaction mechanisms:
Therefore, agent privacy protocols must make privacy protection a fundamental design principle, ensuring that technological progress does not come at the expense of user privacy.
Note: This section is being continuously refined. We sincerely invite community members to contribute and jointly improve the technical specifications and implementation solutions for agent privacy protection standards.