You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This page documents the AppSync GraphQL API. The authoritative source for argument and return types is the GraphQL schema — refer to it for exact input/output shapes.
Authorization: Every operation is callable over the internet and requires a user authenticated via Amazon Cognito (@aws_cognito_user_pools), except the three publish* mutations (publishResponse, publishRuntimeUpdate, publishEvaluationUpdate), which are invoked only by backend Lambda functions via IAM (@aws_iam) and are not user-callable. The tables below note only the exceptions in the Auth column.
Note: The chat data path does not go through this API. The browser streams to AgentCore directly over a SigV4-signed WebSocket — including tool-step updates. AppSync is used for CRUD (sessions, agents, knowledge bases, evaluations, experiments, skills) and for runtime/evaluation status notifications via subscriptions. See Architecture.
Chat & Messaging
User messages are sent to the agent over the direct WebSocket, not through this API (there is no sendQuery mutation — it was removed when chat moved to the direct WebSocket). The operations below cover the AppSync side-channel that delivers responses and tool-action descriptions back to the browser, plus feedback.
Operation
Type
Functionality
Auth
Comments
publishResponse
Mutation
Publish response tokens and the final agent answer to the client
Lambda only
The browser subscribes via receiveMessages
receiveMessages
Subscription
Subscribe to publishResponse for a session
publishFeedback
Mutation
Publish a user's feedback on an agent-generated response
Thumbs up/down and free-text feedback
Sessions
Operation
Type
Functionality
Auth
Comments
listSessions
Query
List all of the user's chatbot sessions
getSession
Query
Get a specific session by session id
Allows reloading a conversation to view or continue it
deleteUserSessions
Mutation
Delete all of the user's sessions
deleteSession
Mutation
Delete a specific user session
renameSession
Mutation
Modify a session title
A session title defaults to the first 100 characters of the first user message
saveToolActions
Mutation
Save tool actions for a specific message in a session
Persists a user-friendly description of the agent's tool invocations to the session history
saveVoiceSession
Mutation
Persist a voice-to-voice conversation's history to a session
Used by Nova Sonic voice sessions to save the transcript and runtime/endpoint
updateMessageExecutionTime
Mutation
Update the execution time for a message in a session
Knowledge Bases & Documents
Operation
Type
Functionality
Auth
Comments
listKnowledgeBases
Query
List available Bedrock Knowledge Bases
Filters on AWS tags: stack name and environment
createKnowledgeBase
Mutation
Create a new Bedrock Knowledge Base from the application
deleteKnowledgeBase
Mutation
Delete an existing Bedrock Knowledge Base
listDataSources
Query
List data sources associated with a Knowledge Base
createDataSource
Mutation
Create a new S3 data source and attach it to a Knowledge Base
deleteDataSource
Mutation
Remove an S3 data source from a Knowledge Base
getInputPrefix
Query
Get the raw input prefix associated with a data source
syncKnowledgeBase
Mutation
Synchronize a Knowledge Base
A fallback mechanism — Knowledge Base synchronization normally runs automatically
listDocuments
Query
List documents in a data source
deleteDocument
Mutation
Delete a document from a data source
getDocumentMetadata
Query
Get the metadata associated with a document
updateMetadata
Mutation
Update the metadata of a single document
batchUpdateMetadata
Mutation
Update the metadata of a set of documents
Used to upload metadata as JSONL
getPresignedUrl
Query
Get an S3 object presigned URL
Used to display the document behind a knowledge-base reference
checkOnProcessStarted
Query
Check whether document processing has started for a set of S3 objects
Polled after the user uploads documents through the UI
checkOnProcessCompleted
Query
Check whether document processing has completed for a set of S3 objects
Polled after the user uploads documents through the UI
checkOnDocumentsRemoved
Query
Check whether documents have been removed from the doc-processing state table
Polled after the user deletes documents through the UI
checkOnSyncInProgress
Query
Check whether a data-source sync is currently in progress
Polled after the user adds/deletes documents through the UI