ServerRpc overview
Scope: ServerRpc (server-wide operations tied to the Client)
For an overview of RPC and the list of all RPC pages, see RPC.
This page summarizes ServerRpc methods by category. For usage examples, open the feature pages listed in the RPC index.
Use ping() and connect() to check and start the connection, and registerExtensionLaunchProvider() to register an extension launch provider. You can get the model list, token price units, and built-in catalog from models(), and the list of available tools from tools(). account() handles quota, authentication status, the list of logged-in users, login, and logout.
providersConfig()->addModel() is an experimental RPC that adds a model to the server’s saved provider configuration. If the provider isn’t saved yet, the CLI creates it, and providerAdded tells you so. The change is persistent, but it doesn’t modify running sessions.
For providersConfig usage examples, see Settings and managed settings.
Classify recorded trajectories (experimental)
taskAnalytics()->classifyTrajectory() classifies recorded Copilot events or ATIF data without creating a session. Archived tools aren’t executed, and nothing is added to conversation history or classification telemetry. Pass events in their original order. You can also set classifiers, maxConcurrentRequests, judge, and previousResult. With validateOnly: true, the runtime skips inference and returns only the local validation result.
For usage examples, see Sessions, host, and environment.
MCP, connectors, and secrets
mcp() lets you list, add, update, and remove MCP configurations, enable them, discover servers, search the registry, and plan and apply installations. connectors() lets you check connector capabilities, accounts, and the catalog. Server-side connector operations mainly consist of listing and updating per account. The experimental secrets()->addFilterValues() registers dynamic secrets generated by your host with the CLI’s redaction filter. The CLI then masks those values in session logs and exports.
For secrets usage examples, see MCP and connectors.
Skills, plugins, agents, instructions, and extensions
Each group lets you discover items, get available paths, change settings, and reload. commands() provides the list of built-in commands, and hooks() provides hook discovery before a session starts. Skills and plugins support enabling, disabling, and installation management, and agents can also return built-in agent information. Extensions discovers, enables, and disables persisted extensions. lsp() lists the server-wide language server settings.
For usage examples, see Skills, plugins, agents, instructions, and extensions.
Catalog and installation
Use catalog() to search for candidates, get official product recommendations, make selections, and get feeds. The Skills, Plugins, and MCP APIs let you review installation plans, apply them, query their status, and cancel them. Planning and applying are separate operations. See the later sections for actual installation examples.
Sessions, host, and runtime
sessions() handles searching persisted sessions, reading events, checking sizes, deleting and pruning, and forking. You can also create and load workspaces and use remote control. host() starts the host, publishes, lists, and unpublishes sessions, handles authentication, changes the session admission policy, and disposes of the host. For the high-level AHP host API, see AHP Host. runtime() handles the runtime lifecycle.
sessions()->hasEvents() checks whether a local persisted event log exists without opening the session. For usage examples, see Sessions, host, and environment.
Cloud agent tasks (experimental)
cloudTasks() creates, deletes, and gets cloud coding agent tasks, retrieves session logs and replays, changes sharing state, and resolves the session to open from a task ID. Each method accepts the matching Params type or an array and returns a typed DTO. When ok on a create result is false, check reason and message for why the service declined the request, and statusCode, errorMessage, and errorPayloadJson for a failed HTTP request.
For usage examples, see Sessions, host, and environment.
Git, environments, sandbox, and policies
Get branch, working directory, and Git remote information from git(), and discover GitHub repositories and owners with gitHubRepository() and gitHubOwners(). environments() handles Mission Control environments, sandbox() and sandboxProxyCa() handle sandbox support and the Proxy CA, contentExclusion() validates exclusion policies, and managedSettings() and userSettings() handle settings. Use settings() to remove individual keys from a settings file and to redact values for display.
gitHubRepository()->getById() resolves an owner and name from a GitHub repository ID, and lookupBranchPullRequest() searches the given repositories, in priority order, for a pull request from the given head owner and branch. Both take authInfo as is. The getById() result contains the owner and name in repository, or null when the repository isn’t found. The pull request lookup status is one of found, no-token, no-pr, or lookup-failed. Unknown values are kept as strings, so they don’t throw. pullRequest is an associative array when a pull request is found, otherwise null.
For gitHubRepository usage examples, see Git and GitHub.
gitHubFetch() provides authenticated GitHub API requests and named operations. gitHubRelease() provides release lookup, snapshots, asset downloads, and progress checks. In Fetch, sessionId selects a session’s authentication; when omitted, the process authentication is used. Set authOwnerId to use a host-managed authentication binding. In Release, authInfo selects runtime-managed credentials, and public releases can be looked up and downloaded anonymously. Delete the downloaded path yourself after use.
Fetch’s allocateRequestId(), request(), and executeOperation(), and Release’s abandonRequest(), getSnapshot(), and downloadAsset() can’t be called from Extensions. The Laravel SDK doesn’t currently expose the cancel RPC of either group, so you can’t cancel an in-flight operation from the SDK. abandonRequest() discards an unused Release request ID; it doesn’t stop an in-flight operation.
fetch() is an experimental API for general HTTP requests over the shared network transport. Create a connection-owned handle with create(), then call send() with the required responseMode. With stream, read the body in chunks with read(). With text, you get the whole body as UTF-8 text. With file, the runtime writes the body to destinationPath on the runtime host. Discard a handle you no longer need with cancel(). You can use it for requests without credentials and for streaming files.
Local models, HTTP inference, and file system
azureMl() provides local GPU memory information, the model catalog, resolution, and download, as well as status checks, cancellation, and deletion. It can also register, remove, and restore the provider configuration for Azure ML models using a family lease. llmInference() is an experimental API that relays model-layer HTTP requests to the client side. sessionFs() registers a file system/SQLite callback provider for sessions.
localModels() is an experimental, connection-scoped API for local model management. It configures management, inspects and watches state, refreshes the catalog, prepares, downloads, updates, repairs, and deletes models, cancels jobs, and dismisses notices. configure(), inspect(), and watch() return typed results that include a LocalModelsView and LocalModelsEvent[]. You can pass a CancellationToken to watch(). Cancelling the token sends a JSON-RPC cancellation notification and keeps the connection open. configure() doesn’t send sessionId when it’s null.
Network callbacks (experimental)
network()->setProvider() tells the runtime about the proxy resolution and Kerberos authentication callbacks registered on the client. The network option on the Client registers them automatically, so you normally do not need to call this RPC directly. The callback fields of NetworkSetProviderRequest indicate that the matching handler is registered. The RPC returns no value. The runtime must support the network.setProvider RPC. If it does not, the client throws an exception at startup that asks you to update the runtime.
For usage examples, see HTTP inference and file system.
Internal and experimental RPCs
The following RPCs are marked internal in the official SDK, but Laravel exposes them as @experimental. They may change or be removed in the future, and the runtime’s caller restrictions still apply. Use them to create, list, and remove agent registry entries, open an authentication URL in the browser, clean up expired large tool outputs, and get sandbox path grant warnings. List results don’t include connection credentials.
For usage examples, see Models, tools, and accounts, Sessions, host, and environment, and Skills, plugins, agents, instructions, and extensions.Last modified on November 19, 2026