Back to Copilotkit

Channels Agent Setup

showcase/integrations/claude-sdk-python/docs/setup/channels-agent-setup.mdx

1.64.2699 B
Original Source

Follow the Claude Agent SDK Python quickstart to configure the agent. Keep the AG-UI server created by your chosen quickstart path running on port 8000.

The Claude adapter is mounted at the server root:

dotenv
AGENT_URL=http://localhost:8000/

Install the HTTP adapter in the Channels runner:

bash
npm install @ag-ui/[email protected]

Create a new HTTP adapter for every channel thread:

ts
import { HttpAgent } from "@ag-ui/client";

export function makeAgent(threadId: string) {
  const agent = new HttpAgent({ url: process.env.AGENT_URL! });
  agent.threadId = threadId;
  return agent;
}