CopilotKit
Reference / core / types

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

runtimeUrlstring

Base URL of the CopilotRuntime. The agent's request URL is derived from this value and the resolved transport.

transport"rest" | "single" | "auto"
Default: "auto"

Transport style used to reach the runtime. "auto" probes REST first, then falls back to the single-endpoint envelope.

credentialsRequestCredentials

Credentials mode applied to runtime fetch requests (e.g. "include").

runtimeMode"sse" | "intelligence" | "pending"
Default: "sse"

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).

intelligenceIntelligenceRuntimeInfo

Intelligence runtime metadata (e.g. the websocket URL) used when running in Intelligence mode.

capabilitiesAgentCapabilities

Declared agent capabilities returned by getCapabilities().

debugResolvedDebugConfig

Resolved debug configuration for the client-side event pipeline.

runtimeAgentIdstring

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",
});

Related