Requests permission from the user for a tool call operation.
Called by the agent when it needs user authorization before executing a potentially sensitive operation. The client should present the options to the user and return their decision.
If the client cancels the prompt turn via session/cancel, it MUST
respond to this request with RequestPermissionOutcome::Cancelled.
See protocol docs: Requesting Permission
Handles session update notifications from the agent.
This is a notification endpoint (no response expected) that receives real-time updates about session progress, including message chunks, tool calls, and execution plans.
Note: Clients SHOULD continue accepting tool call updates even after
sending a session/cancel notification, as the agent may send final
updates before responding with the cancelled stop reason.
See protocol docs: Agent Reports Output
OptionalwriteWrites content to a text file in the client's file system.
Only available if the client advertises the fs.writeTextFile capability.
Allows the agent to create or modify files within the client's environment.
See protocol docs: Client
OptionalreadReads content from a text file in the client's file system.
Only available if the client advertises the fs.readTextFile capability.
Allows the agent to access file contents within the client's environment.
See protocol docs: Client
OptionalcreateCreates a new terminal to execute a command.
Only available if the terminal capability is set to true.
The Agent must call releaseTerminal when done with the terminal
to free resources.
OptionalterminalGets the current output and exit status of a terminal.
Returns immediately without waiting for the command to complete. If the command has already exited, the exit status is included.
OptionalreleaseReleases a terminal and frees all associated resources.
The command is killed if it hasn't exited yet. After release, the terminal ID becomes invalid for all other terminal methods.
Tool calls that already contain the terminal ID continue to display its output.
OptionalwaitWaits for a terminal command to exit and returns its exit status.
This method returns once the command completes, providing the exit code and/or signal that terminated the process.
OptionalkillKills a terminal command without releasing the terminal.
While releaseTerminal also kills the command, this method keeps
the terminal ID valid so it can be used with other methods.
Useful for implementing command timeouts that terminate the command and then retrieve the final output.
Note: Call releaseTerminal when the terminal is no longer needed.
OptionalextExtension method
Allows the Agent to send an arbitrary request that is not part of the ACP spec.
To help avoid conflicts, it's a good practice to prefix extension methods with a unique identifier such as domain name.
OptionalextExtension notification
Allows the Agent to send an arbitrary notification that is not part of the ACP spec.
The Client interface defines the interface that ACP-compliant clients must implement.
Clients are typically code editors (IDEs, text editors) that provide the interface between users and AI agents. They manage the environment, handle user interactions, and control access to resources.