How the Agent Client Protocol works
Initialization Phase
initialize
to establish connectionauthenticate
if required by the AgentSession Setup - either:
session/new
to create a new sessionsession/load
to resume an existing session if supportedPrompt Turn
session/prompt
to send user messagesession/update
notifications for progress updatessession/cancel
to interrupt processing if neededsession/prompt
response with a stop reasonloadSession
capability).fs.readTextFile
capability).fs.writeTextFile
capability).result
fielderror
object with code
and message