LLM council
- Web chat
A Next.js LLM council that sends one prompt to four models in parallel, streams their answers, and asks a judge model for a concise answer with per-model agreement scores.
- Web chat
agent/agent.tstypescriptimport { defineAgent } from "eve";
export default defineAgent({
model: "anthropic/claude-opus-5",
limits: {
maxOutputTokensPerSession: 4_000,
},
});
LLM Council
An eve and Next.js demo that sends one prompt to four models in parallel, streams their answers, and asks a judge model for a concise answer with per-model agreement scores.
The council uses:
- xAI Grok 4.5
- Anthropic Claude Opus 5
- OpenAI GPT-5.6 Sol
- Moonshot AI Kimi K3
Architecture
The application follows one simple flow:
The root eve agent delegates the same prompt to four declared subagents. Each subagent has a fixed AI Gateway model and runs in its own durable session. The Next.js client follows those child session streams so every response appears independently as it is generated.
After all four members finish, the root agent returns a concise answer and per-model agreement scores using a structured output schema. withEve() and useEveAgent() keep the agent routes and UI in the same Next.js application.
The main pieces are:
agent/instructions.md— fan-out and judging behavioragent/subagents/— the four fixed council membersagent/lib/schemas.ts— final answer and score schemaapp/council-app.tsx— submission, child streaming, and rendering
Run locally
eve link connects the app to a Vercel project and pulls the AI Gateway credentials needed by the models. Open the local URL printed by Next.js.