Attempting to wire up the lightest weight combo I can think of, but I'm stuck at "Invalid adapter configuration: EmptyAdapter is only meant to be used with agent lock mode. For non-agent components like useCopilotChatSuggestions, CopilotTextarea, or CopilotTask, please use an LLM adapter instead.
NOTE: This error only displays during local development."
CopilotKit: Vite React app (without Next.js)
CopilotRuntime: Node.js HTTP
CoAgent: LangGraph Self hosted (FastAPI)
import { createServer } from 'node:http';
import {
CopilotRuntime,
ExperimentalEmptyAdapter,
copilotRuntimeNodeHttpEndpoint,
} from '@copilotkit/runtime';
const serviceAdapter = new ExperimentalEmptyAdapter();
const server = createServer((req, res) => {
const runtime = new CopilotRuntime({
remoteEndpoints: [
{ url: "http://localhost:8000/langgraph" },
],
});
const handler = copilotRuntimeNodeHttpEndpoint({
endpoint: '/copilotkit',
runtime,
serviceAdapter,
});
return handler(req, res);
});
server.listen(4000, () => {
console.log('Listening at http://localhost:4000/copilotkit');
});