ProxiedCopilotRuntimeAgentConfig
Configuration object for constructing a ProxiedCopilotRuntimeAgent.
Overview
ProxiedCopilotRuntimeAgentConfig is the constructor argument for ProxiedCopilotRuntimeAgent. It extends AG-UI's HttpAgentConfig (omitting url, which is derived from runtimeUrl) and adds the routing, transport, and runtime-mode fields the proxy needs to reach a CopilotRuntime.
Import
import type { ProxiedCopilotRuntimeAgentConfig } from "@copilotkit/core";Definition
interface ProxiedCopilotRuntimeAgentConfig
extends Omit<HttpAgentConfig, "url"> {
runtimeUrl?: string;
transport?: CopilotRuntimeTransport;
credentials?: RequestCredentials;
runtimeMode?: RuntimeMode | "pending";
intelligence?: IntelligenceRuntimeInfo;
capabilities?: AgentCapabilities;
debug?: ResolvedDebugConfig;
runtimeAgentId?: string;
}Properties
Base URL of the CopilotRuntime. The agent's request URL is derived from this value and the resolved transport.
Transport style used to reach the runtime. "auto" probes REST first, then falls back to the single-endpoint envelope.
Credentials mode applied to runtime fetch requests (e.g. "include").
Runtime mode. "sse" and "intelligence" are the resolved modes; "pending" marks the mode as not-yet-resolved (resolved via a runtime-info fetch on the Intelligence delegate path).
Intelligence runtime metadata (e.g. the websocket URL) used when running in Intelligence mode.
Declared agent capabilities returned by getCapabilities().
Resolved debug configuration for the client-side event pipeline.
When set, runtime requests are routed to this agent on the runtime instead of agentId. The local agentId remains the registry key used for subscriber bookkeeping; only outbound routing is overridden.
Usage
import { ProxiedCopilotRuntimeAgent } from "@copilotkit/core";
const agent = new ProxiedCopilotRuntimeAgent({
runtimeUrl: "/api/copilotkit",
agentId: "default",
transport: "auto",
credentials: "include",
});