A2UI Launched: Full CopilotKit support at launch!

A2UI Launched: CopilotKit has partnered with Google to deliver full support in both CopilotKit and AG-UI!

Check it out
LogoLogo
  • Overview
  • Integrations
  • API Reference
  • Copilot Cloud
Slanted end borderSlanted end border
Slanted start borderSlanted start border
  • API Reference
  • UI Components
  • CopilotTextarea
  • CopilotKit
  • Hooks
  • useAgent
  • useDefaultTool
  • useFrontendTool
  • useRenderToolCall
  • useHumanInTheLoop
  • useCopilotReadable
  • useCopilotAdditionalInstructions
  • useCopilotChat
  • useCopilotChatHeadless_c
  • useCopilotChatSuggestions
  • useCoAgent
  • useCoAgentStateRender
  • useLangGraphInterrupt
  • useCopilotAction
  • Classes
  • CopilotRuntime
  • CopilotTask
  • SDKs
LLM Adapters

AnthropicAdapter

Copilot Runtime adapter for Anthropic.

Copilot Runtime adapter for Anthropic.

Example

import { CopilotRuntime, AnthropicAdapter } from "@copilotkit/runtime";
import Anthropic from "@anthropic-ai/sdk";
 
const copilotKit = new CopilotRuntime();
 
const anthropic = new Anthropic({
  apiKey: "<your-api-key>",
});
 
return new AnthropicAdapter({
  anthropic,
  promptCaching: {
    enabled: true,
    debug: true
  }
});

Constructor Parameters

anthropicAnthropic

An optional Anthropic instance to use. If not provided, a new instance will be created.

modelstring

The model to use.

promptCachingAnthropicPromptCachingConfig

Configuration for prompt caching. See: https://docs.anthropic.com/en/docs/build-with-claude/prompt-caching

PREV
OpenAIAssistantAdapter
Slanted end borderSlanted end border
Slanted start borderSlanted start border
NEXT
LangChainAdapter

On this page

Example
Constructor Parameters