Back to Copilotkit

Channels Agent Setup

showcase/integrations/ms-agent-dotnet/docs/setup/channels-agent-setup.mdx

1.64.2777 B
Original Source

Follow the Microsoft Agent Framework .NET quickstart to configure your agent. Keep its AG-UI server running on http://localhost:8000: the CLI starter's agent project or the Use an existing agent path's AGUIServer project.

The shared Microsoft agent is mapped at the server root:

dotenv
AGENT_URL=http://localhost:8000/

Install the HTTP adapter in the Channels process:

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;
}