mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
85418bc25a
Stacked on `fix/thread-events-404-is-empty` so the diff shows only this work. Retarget to `main` once that lands. ## Spreadsheets Dropping an `.xlsx` into the composer did nothing — the accept filter discarded it silently. Widening the filter alone would have made it worse: the pinned `@ai-sdk/openai@3` converter accepts no document media type but `application/pdf` and throws before a request is made, so the run would die instead of degrading. - **Dependency-free `.xlsx` / `.csv` reader.** ZIP central directory plus OOXML, through `DecompressionStream` and `DOMParser`. It decodes date serials via `styles.xml` (otherwise a date renders as `45231`) and places cells by column reference (otherwise one omitted cell shifts every later value under the wrong header). No SheetJS: its npm build is frozen at a release carrying known advisories, and this folder already declined that trade for PDF writing. - **Rendered to a column-aligned table document.** Comparisons of table encodings put an aligned markdown-style table well ahead of CSV for model comprehension, and the same document is what a human reads. - **`buildPdf` paginates.** It emitted a single page and drew overflow past the bottom margin, so anything past ~48 rows was absent from a structurally valid PDF. Single-page output is byte-identical, so the existing golden assertions stand unchanged. - **A per-run bridge around the agent** swaps the media type to `application/pdf` on the model leg only and restores the original type and metadata on the way back, so the composer chip and the transcript both read `XLS` with the real filename. It keys on the exact payload, so a genuine PDF attachment can't be caught by it. - **`onUploadFailed` is wired.** A rejected or unreadable file says so instead of vanishing. The demo workbook is committed as a generator, not a binary blob, so the fixture exercises the real reader: shared strings, date-styled serials, a second sheet, deflate. ## Dependency upgrade `@copilotkit/*` → **1.71.0**, `@ag-ui/*` → **0.0.59**, and the `@ag-ui` canary overrides deleted from both `pnpm-workspace.yaml` and `package.json`. Those overrides existed for one reason: a released `@ag-ui/core` rejected `SUBAGENT_*` events in the HTTP transport and killed banking's harness console. Stable 0.0.59 ships `SUBAGENT_STARTED` / `SUBAGENT_FINISHED` / `SUBAGENT_ERROR`, and 1.71.0 depends on exactly 0.0.59 — so keeping them would pin the tree *behind* its own dependency. The workspace file's own note said to delete both once the canary line shipped stable. **`pnpm-lock.yaml` is deliberately not included.** It is `skip-worktree` in this worktree and the local copy was generated with a local-only `patchedDependencies` entry pointing at an untracked patch file. Committing either would reference a patch nobody else has. The lock needs regenerating on merge. ## Verification Driven on the running demo, not just in tests: - Gen UI renders in the transcript - The subagent harness completes the offsite run — 14 rows, 6 merchants, $2,377.15, 1m 4s — confirming stable AG-UI carries the events the overrides were protecting - Memory recall returns seeded memories - A dropped spreadsheet answers with a table built from the real file, and survives a reload - A plain PDF attachment still badges as PDF and is still read correctly `pnpm lint`, `pnpm typecheck`, 2494 unit tests and `pnpm build` all pass. ## Reskin skill Checked for staleness, per the standing rule. Two things had gone wrong and are corrected here: `buildPdf` was documented as single-page, and two passages told skin authors that `onUploadFailed` is wired by nobody.
CopilotKit Examples
This directory contains 52 consolidated demo repositories showcasing CopilotKit integrations, canvas apps, and showcases.
Each example is a self-contained project. To get started:
GIT_LFS_SKIP_SMUDGE=1 git clone <repo-url>
cd examples/<category>/<name>
# Follow the example's own README for setup instructions
Note: The
v1/andv2/directories at the top level are legacy workspace examples from earlier CopilotKit releases and are not part of the consolidated demo set.
Integrations (20)
Framework integration starters demonstrating CopilotKit with various agent frameworks.
| Example | Description |
|---|---|
| langgraph-python | Starter template for building AI agents using LangGraph (Python) and CopilotKit |
| langgraph-js | Starter template for building AI agents using LangGraph (JS) with Turborepo monorepo |
| langgraph-fastapi | Starter template for building AI agents using LangGraph with FastAPI and Poetry |
| mastra | Starter template for building AI agents using Mastra and CopilotKit |
| crewai-flows | Starter template for building AI agents using CrewAI Flows (uv-based) |
| llamaindex | Starter template with a LlamaIndex investment analyst agent |
| pydantic-ai | Starter template with a PydanticAI investment analyst agent |
| ms-agent-framework-python | CopilotKit with Microsoft Agent Framework (Python/FastAPI, AG-UI protocol) |
| ms-agent-framework-dotnet | CopilotKit with Microsoft Agent Framework (.NET/C#, AG-UI protocol) |
| strands-python | Starter template with a Strands investment analyst agent |
| strands-typescript | Starter template using AWS Strands (TypeScript), AG-UI, and CopilotKit |
| mcp-apps | Integration of MCP Apps with CopilotKit using Three.js |
| adk | Starter template using Google ADK with an investment analyst agent |
| agent-spec | Starter for Agent Spec with A2UI-powered frontend tool rendering |
| a2a-a2ui | Starter for A2UI + A2A with a restaurant finder agent (Gemini/ADK) |
| agno | Starter template using Agno with an investment analyst agent |
| crewai-crews | Starter template for building AI agents using CrewAI Crews |
| a2a-middleware | Multi-agent starter with A2A Protocol and AG-UI Protocol (LangGraph + ADK) |
| claude-sdk-python | Starter template using the Claude Agent SDK (Python) and CopilotKit |
| claude-sdk-typescript | Starter template using the Claude Agent SDK (TypeScript) and CopilotKit |
Canvas (7)
AI-powered canvas applications with visual card interfaces, real-time state sync, and HITL workflows.
| Example | Description |
|---|---|
| langgraph-python | AG-UI canvas starter with LangGraph — interactive cards with real-time AI sync |
| llamaindex | AG-UI canvas starter with LlamaIndex — visual cards, multi-step planning, HITL |
| llamaindex-composio | Hackathon starter with LlamaIndex, CopilotKit, and Composio (Google Sheets integration) |
| pydantic-ai | AG-UI canvas starter with PydanticAI — visual cards, planning, HITL |
| mastra | AG-UI canvas starter with Mastra — interactive cards with real-time AI sync |
| gemini | Open Gemini Canvas — post generator and stack analyzer agents (Gemini + LangGraph) |
| mastra-pm | AG-UI + Mastra workshop — shared state, multiple clients, generative UI |
Showcases (25)
Full-featured demo applications highlighting CopilotKit capabilities in real-world scenarios.
| Example | Description |
|---|---|
| reskinnable-demo | Runtime-reskinnable demo — banking and airline skins over one shell, agent and all |
| presentation | PowerPoint-like web app built with CopilotKit |
| deep-agents | Deep research assistant with planning, memory/files, and generative UI (Tavily) |
| deep-agents-job-search | Job application assistant — resume parsing, skill extraction, DeepAgents orchestration |
| generative-ui | Generative UI for agentic apps — AG-UI protocol showcase |
| generative-ui-playground | Playground for static GenUI, MCP Apps, and A2UI generative UI types |
| grok-generative-ui | grok-4.6 searches X server-side, then composes the dashboard from real components |
| mcp-apps | MCP Apps demo — airline booking, hotel booking, investment simulator, kanban board |
| research-canvas | ANA (Agent Native Application) — research canvas with Tavily search and LangGraph |
| mcp-demo | Working Memory — MCP server-client integration for project management (Linear) |
| strands-file-analyzer | AI-powered document analysis with Strands Agents and Amazon Bedrock |
| microsoft-kanban | Kanban board demo with CopilotKit + Microsoft Agent Framework (.NET, AG-UI) |
| multi-page | Multi-page Remix app with CopilotKit |
| orca | Cisco CopilotKit demo — PR and repository analytics dashboard |
| pydantic-ai-todos | AI-powered todo board with PydanticAI (Todo, In-Progress, Done columns) |
| scene-creator | Scene creator with LangGraph + Gemini 3 — AI-generated characters and backgrounds |
| adk-dashboard | Generative canvas with Google ADK — metrics, charts, and real-time data |
| langgraph-js-support-agents | Multi-agent telecom support system with intent, lookup, reply, and escalation agents |
| multi-agent-canvas | Open Multi-Agent Canvas — manage multiple agents (travel, research, MCP) in one chat |
| chatkit-studio | Open ChatKit Studio — explore and build embeddable chat experiences |
| enterprise-brex | Enterprise banking demo with authorization, operations, and generative UI |
| a2a-travel | A2A + AG-UI multi-agent travel demo (LangGraph + Google ADK) |
| spreadsheet | AI-powered Excel-like spreadsheet web app |
| todo | Simple todo app built with CopilotKit |
| strands-crm | Enterprise sales CRM — dashboard, pipeline, products, quotes, reports & agentic canvas (TypeScript Strands + AG-UI) |