API Contract Summary
This section summarizes the primary integration surface for clients of the Agentic Vehicle Experience.
Complete endpoint specifications are in docs/VSA_API_CONTRACT.md in the AVX repository.
POST /assistant/chat
The primary web and mobile client entry point. Sends a conversational turn to the AVX agent and receives a text response with optional citations and classification metadata.
Authentication: Cognito ID token in the Authorization: Bearer header.
Persona is inferred server-side from the token’s Cognito group claims; no persona parameter is required from the client.
Request body:
{ "prompt": "What does DTC P0420 mean for my vehicle?", "sessionId": "session_ms1719340_r8abc123xyz", "vin": "1AAAA00A0AA000123" }
| Field | Required | Description |
|---|---|---|
|
|
Yes |
The conversational utterance from the user. |
|
|
Yes |
Client-generated session identifier. Must be at least 33 characters to satisfy the AgentCore session-ID minimum length requirement. Recommended format: |
|
|
No |
Vehicle Identification Number for context scoping. When present, the agent resolves vehicle identity, live state, and service history for this VIN. Use a synthetic value ( |
Response body (200):
{ "result": "DTC P0420 indicates catalyst system efficiency is below the threshold ...", "sessionId": "session_ms1719340_r8abc123xyz", "classification": "P2", "vin": "1AAAA00A0AA000123", "citations": ["dtc-P0420.md", "tsb-2024-en-0298.md"] }
| Field | Description |
|---|---|
|
|
The agent’s natural-language response to the prompt. |
|
|
Echoed from the request; use for multi-turn continuity. |
|
|
Triage severity assigned by the classifier: |
|
|
Echoed from the request when present. |
|
|
Array of knowledge-base document references that grounded the response. Empty array when no KB retrieval occurred. |
Error codes:
| HTTP Status | Meaning |
|---|---|
|
400 |
Malformed request body or missing required fields. |
|
401 |
Missing or invalid Cognito ID token. |
|
403 |
Authenticated but not authorized for this tenant (token |
|
429 |
Rate limit exceeded (API Gateway default throttle: 100 req/s steady, 50 burst). |
|
500 |
Agent runtime error. Check CloudWatch logs for the |
REST Endpoints
All REST endpoints share the same Cognito JWT authentication and error model as /assistant/chat.
The base URL is the prod stage of the AVX vsa-{stage}-api API Gateway, emitted as a CloudFormation output.
| Endpoint | Method | Purpose |
|---|---|---|
|
|
POST |
Conversational agent entry point (see above). |
|
|
POST |
Deterministic P0–P3 triage classifier. Request: |
|
|
GET |
Returns the last-known state of a vehicle: odometer, fuel/charge level, active DTCs, and location. Backed by the CMS Redis live-key-state store. |
|
|
GET |
Returns the ordered list of service events for a vehicle from the CMS DynamoDB service-history table. |
|
|
GET |
Returns recent trip records for a vehicle. Supports |
|
|
GET |
Returns safety-event records (hard braking, collision signals, geofence violations) for a vehicle. |
|
|
GET |
Returns the profile and linked vehicles for the authenticated driver, resolved from the Cognito token |
|
|
POST |
Initiates a human handoff. Starts an Amazon Connect chat ( |
|
|
GET |
Returns the public subset of tenant configuration (branding, feature flags, voice settings). Internal fields such as ARNs, queue IDs, and triage-policy thresholds are not returned. |
WebSocket API
The WebSocket API provides server-push messaging to connected clients.
Connect URL:
wss://{wsApiId}.execute-api.{region}.amazonaws.com/prod?token={cognitoIdToken}
The Lambda authorizer validates the Cognito ID token on connect; the connection is rejected with HTTP 401 if validation fails.
On successful connect, the connection ID is recorded in the vsa-{stage}-ws-connections DynamoDB table alongside the resolved tenantId.
Server-to-client messages: the deployed platform does not push
server-initiated messages.
To add streaming telemetry or reasoning events, implement a publisher Lambda
that reads the CMS Redis live-key-state layer and posts to connected
WebSocket clients via the API Gateway Management API @connections endpoint.
Client-to-server messages: any message sent by the client is acknowledged with {"ack": true} and otherwise ignored at present.
Authentication Summary
| Channel | Mechanism |
|---|---|
|
REST API |
|
|
WebSocket |
|
|
Voice (Nova 2 Sonic / bidirectional) |
SigV4-signed WebSocket upgrade to the AgentCore runtime endpoint. The Cognito ID token is forwarded in the request payload ( |
|
AgentCore text runtime |
HTTP POST to the AgentCore runtime endpoint, SigV4-signed. Cognito token forwarded in payload. |