Scenario Example: SDK Native Integration Mode (No Gateway)
Scenario Description
An e-commerce platform (server) provides product query and order creation APIs. A user uses an AI Shopping Assistant (agent/client) to query products and place orders on their behalf. Mode Characteristics: The e-commerce platform server natively integrates the ATH protocol, requiring no additional gateway deployment. The agent interacts directly with the server.Participating Roles
| Role | Description |
|---|---|
| User | A consumer on the e-commerce platform, using the AI Shopping Assistant |
| Agent | AI Shopping Assistant, completing shopping operations on behalf of the user |
| E-commerce Platform | Provides API services such as product query and order creation, with native ATH protocol integration |
Process Description
Prerequisite: User Pre-Authorization
- The user opens the AI Shopping Assistant and authorizes it to query products and create orders on their behalf
- The user signs an authorization credential with scope:
goods:read,order:create, valid for 2 hours - The AI assistant securely stores the user’s authorization credential
Complete 9-Step Handshake Process
Step 1: Agent Initiates Handshake Request
The AI assistant sends a handshake request to the e-commerce platform:Step 2: E-commerce Platform Returns Handshake Response
The e-commerce platform validates the request format and returns its identity information:Step 3: Agent Sends Identity Proof
The AI assistant signsrandom_654321 with its private key and sends the identity proof:
Step 4: E-commerce Platform Returns Identity Verification Result
The e-commerce platform verifies the signature successfully and returns the list of supported scopes:Step 5: Agent Sends Scope Request
The AI assistant requests product query and order creation permissions, attaching the user’s authorization credential:Step 6: E-commerce Platform Confirms Authorization with User
The e-commerce platform sends an authorization confirmation to the user via app push notification:Step 7: User Returns Authorization Confirmation Result
The user taps “Approve”, and the e-commerce platform receives the user’s confirmation result.Step 8: E-commerce Platform Returns Scope Approval Result
The e-commerce platform approves the authorization request and returns the scope information:Step 9: Handshake Complete, Session Established
Both parties complete key negotiation. The e-commerce platform issues an access token, and the AI assistant can begin accessing the APIs:Mode Advantages
- Higher Performance: No gateway forwarding, resulting in lower latency
- More Complete Functionality: Can fully leverage all features of the ATH protocol
- Better Security: End-to-end encryption with no intermediate nodes
Applicable Scenarios
- Self-developed servers where you have the ability to modify code and integrate the ATH protocol
- Scenarios with high performance requirements
- Scenarios requiring the full protocol feature set