RPC (Remote Procedure Call)
In the official SDK, recent new features are supported through auto-generated code from api.schema.json.
In the Laravel version, the same features are implemented by following generated SDKs for other languages.
ServerRpc
An RPC class bound to the Client.
For an overview of the methods by category, see ServerRpc overview.
Basic call example
Features that were already in the SDK have also been added again in the auto-generated version.
Usage examples by feature
Representative call examples are grouped into pages by feature.
SessionRpc
An RPC class bound to the Session.
You can also use features that weren’t possible in earlier SDKs, such as plan mode.
For an overview of the methods by category, see SessionRpc overview.
Usage examples by feature
Representative call examples are grouped into pages by feature.
- Model, mode, name, and plan
- Workspaces, agents, Fleet, and skills
- MCP
- Plugins and extensions
- Managed settings, debug, and history
- Tools, permissions, commands, and UI
- Logs, shell, usage, telemetry, and authentication
- Provider (BYOK)
- Queue, schedules, and tasks
- Remote and sandbox
- Session information and local session management
- Session memory
- Session canvas
- Feature flags and workflow
- SessionFS callbacks
Using arrays for arguments
Dedicated classes are used for both arguments and return values, but you can also pass arguments as arrays.
Testing
Copilot::fake() mocks are not available, so mock with Copilot::expects('client') or Copilot::expects('start').Last modified on November 26, 2026