Documentation Index
Fetch the complete documentation index at: https://springaicommunity.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Module 07: Agent Requests (Client Side)
Handle file read/write requests from agents on the client side.What You’ll Learn
- Registering
readTextFileHandlerandwriteTextFileHandler - Advertising file system capabilities via
ClientCapabilities - The inverted request flow: agents request, clients serve
Inverted Request Flow
In ACP, the request direction is inverted for file operations compared to traditional client-server: the agent requests files from the client. This allows agents to access the user’s local filesystem through a controlled interface — the client decides which files to expose and how to handle writes.The Code
To enable this, the client registers file handlers on its builder and advertises file system capabilities during initialize. When the agent callscontext.readFile() or context.writeFile(), these handlers are invoked: