Skip to main content

Feature flags and workflow

Scope: SessionRpc (per-session operations tied to a Session) For an overview of RPC and the list of all RPC pages, see RPC.

Session feature flags (experimental)

Use $session->rpc()->featureFlags() to configure, read, and update the feature flag service bound to the session. configure() and update() return the current service state, and read() returns the snapshot and the evaluation of the flags you specify, as typed DTOs. The SDK adds the session ID to each call automatically.

workflow

The experimental RPC APIs for workflows, connectors, diagnostics, and more added in the Copilot CLI 1.0.89 series are also available from SessionRpc. Pass these variable protocol payloads as JSON-compatible arrays; responses are also returned as arrays. The current sessionId is added to each call automatically.
workflow() calls the low-level RPCs provided by the CLI. A high-level API for registering and running PHP closures as workflows, like the Node.js SDK has, wasn’t added in this sync. These new RPC groups depend on the CLI version and are experimental, so use them only with a compatible CLI.
Last modified on November 19, 2026