Commit Graph

655 Commits

Author SHA1 Message Date
Alem Tuzlak 136bfc1182 Merge branch 'main' into feat/multimodal-builtin-agent 2026-04-07 09:51:46 +02:00
Max Korp 3bd279d680 fix: format files 2026-04-06 17:20:06 -07:00
Jordan Ritter d9f58fb388 feat(showcase): add deep-agents-finance-erp showcase (#3592)
## Summary

Adds a full-featured **Finance ERP showcase** demonstrating CopilotKit
v2 deep agents with:

- **Multi-agent orchestrator** (research + projections subagents via
`deepagents`)
- **14 frontend tools** rendered inline in the CopilotSidebar — charts,
cash position cards, dashboard widgets, and human-in-the-loop approval
dialogs
- **Customizable dashboard** with drag/resize widgets controlled by the
AI agent
- **Component gallery** at `/components` showcasing all frontend tool
renderers

### Architecture

```
Orchestrator (FinanceOS AI)
├── research subagent — queries ERP data (invoices, accounts, inventory, HR)
├── projections subagent — forecasts, scenario analysis, trend computation
└── frontend tools (registered as backend stubs) — AG-UI streams events,
    CopilotKit frontend matches to useFrontendTool renderers
```

Frontend tools are registered as lightweight `@tool` stubs on the
orchestrator. When the model calls them, the AG-UI adapter streams
`ToolCall` events that CopilotKit matches to `useFrontendTool` /
`useHumanInTheLoop` renderers by name. HITL tools use
`copilotkit_interrupt()` to pause the graph for user approval.

### Key files

| Area | Files |
|---|---|
| Agent | `agent/agent.py`, `agent/prompts.py`, `agent/tools.py`,
`agent/frontend_tools.py` |
| Frontend hooks | `src/hooks/use-render-chart.ts`,
`use-render-cash-position.ts`, `use-approve-invoice-payment.ts`, ... (14
total) |
| Dashboard | `src/context/dashboard-context.tsx`,
`src/components/dashboard/` |
| Layout | `src/components/layout/shell.tsx` (tool registration +
context sharing) |

All changes are scoped to `examples/showcases/deep-agents-finance-erp/`
— no SDK or package modifications.

## Test plan

- [ ] `cd agent && pip install -e . && python main.py` — agent starts on
:8123
- [ ] `cd .. && npm install && npm run dev` — frontend starts on :3000
- [ ] "What's our current cash position?" → `CashPositionCard` renders
inline
- [ ] "Give me a cash flow projection" → `InlineChatChart` renders
- [ ] "Process payment for overdue invoices" → `InvoiceApprovalCard`
with Approve/Reject
- [ ] "Remove the expense breakdown" → dashboard widget removed
- [ ] `/components` page renders all tool previews

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-06 16:19:14 -07:00
GeneralJerel c186e20e0d feat(showcase): add deep-agents-finance-erp project
Finance ERP showcase powered by CopilotKit deep agents. Includes a
Next.js 16 frontend with 7 CopilotKit-registered tools, a LangGraph
multi-agent backend (orchestrator + research/projections subagents),
Postgres-backed dashboard gallery with 12 widget types and 4 templates,
and human-in-the-loop approval flows for invoices and inventory.
2026-04-06 16:16:12 -07:00
Martha Kelly Schumann 2d4782f68d Merge branch 'main' into fix/a2ui-activity-thread-clone 2026-04-06 10:04:55 -07:00
Martha Schumann 07b9ec13ec chore(a2ui): add /a2ui-demo page and DemoButtonAgent for manual fix validation
Adds a minimal demo at /a2ui-demo that uses the demo-button agent to
reproduce and validate the A2UI thread-clone bug fix. The agent renders
an A2UI surface with a Confirm button on first run; clicking it fires a
second run that emits a text confirmation message.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-06 09:45:23 -07:00
Alem Tuzlak 53a2e9c6e3 Merge branch 'main' into feat/multimodal-builtin-agent 2026-04-06 17:30:11 +02:00
Alem Tuzlak 5f464e6a0d fix(example): map AG-UI text parts to TanStack AI format (text → content) 2026-04-06 15:34:17 +02:00
Alem Tuzlak 39344c00f7 fix(example): preserve multimodal content arrays in TanStack AI agent 2026-04-06 15:30:08 +02:00
Alem Tuzlak a076a69852 fix: correct tsconfig extends paths for v1 node examples 2026-04-06 14:55:07 +02:00
Alem Tuzlak 18c7a6001d feat: multimodal attachments — UI polish, deprecations, docs, codemod
Attachment queue & previews:
- Image lightbox with View Transition API morph animation
- Video lightbox with native controls and play button overlay
- Document lightbox (PDF via blob URL, text inline, info card fallback)
- Drop zone overlay with upload icon
- Filename preservation via InputContent metadata
- Proper video thumbnail sizing and play/pause indicator
- Fix attachment queue positioning (max-w-3xl constraint)
- Padding between X button and content for audio/document cards
- Document filenames wrap instead of truncating

Attachments config:
- onUploadFailed callback for validation/upload errors (file-too-large, invalid-type, upload-failed)
- onUpload accepts sync or async returns
- AttachmentUploadResult discriminated union with explicit interfaces
- Metadata field on Attachment and onUpload return type

AG-UI version bump:
- Bump @ag-ui/client, @ag-ui/core, @ag-ui/encoder, @ag-ui/proto to 0.0.51
- Remove process.env Vite workaround (fixed upstream in 0.0.51)

Deprecation lifecycle:
- @deprecated JSDoc on all legacy image upload APIs
- ImageRenderer, ImageRendererProps, ImageUpload type, imageUploadsEnabled prop,
  inputFileAccept prop, ImageRenderer prop, AIMessage.image, ImageData
- Codemod at codemods/migrate-attachments.ts (15 tests)
- Migration guide updated with codemod instructions and new type shapes

Docs:
- New guide: docs/(root)/multimodal-attachments.mdx
- Updated migration guide with onUpload return type, metadata, codemod section
- Cross-links from prebuilt-components and migration guide
- Label change: "Add photos or files" → "Add attachments"

Tests:
- CopilotChat.attachments.test.tsx — 5 tests for onUploadFailed
- migrate-attachments codemod — 15 tests
2026-04-06 14:55:06 +02:00
Alem Tuzlak 085ac18057 feat(example): dual agent setup — BuiltInAgent + TanStack AI with agent toggle 2026-04-06 14:54:47 +02:00
Alem Tuzlak 64ffb9bee9 feat(example): update react-router example to test multimodal attachments 2026-04-06 14:54:47 +02:00
Ran Shemtov 2afc3c380e Merge branch 'main' into claude/explore-agentcore-cli-a25GL 2026-04-06 13:59:33 +02:00
Ran Shem Tov 5bedf17b66 fix(cli): align defaults in template and deployment 2026-04-06 13:57:56 +02:00
Ran Shem Tov 6985d58112 feat(cli): remove unused lambda tool 2026-04-06 13:55:10 +02:00
Tyler Slaton 9c940dcaac Merge branch 'main' into claude/rebase-against-main-PGEp1 2026-04-05 21:46:05 -07:00
Maxim 2fb966bd68 fix: apply a2ui-root Strict Mode fix to example apps
Follow-up to #3607 — the same problematic `import { v0_8 } from "@a2ui/lit"`
pattern existed in 4 example files. Switch to `@a2ui/lit/0.8` subpath for value
imports and remove an unused v0_8 import. Also broaden the lint rule glob to
cover `examples/` and prevent regression.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 20:31:58 +02:00
Ran Shemtov 1b7496a516 Merge branch 'main' into claude/explore-agentcore-cli-a25GL 2026-04-03 19:03:19 +02:00
Alem Tuzlak 68f9b8ad45 feat(examples): add runtime adapter examples for Express, Hono, Node, Deno, Elysia, and CF Workers
Example projects demonstrating the new fetch-based runtime adapters
across six server frameworks/runtimes.
2026-04-03 18:41:29 +02:00
Tyler Slaton 4f1f132d41 fix: address issues with licensing, formatting and types (#3597) 2026-04-03 09:38:41 -07:00
Tyler Slaton b0da854de9 fix: convert showcase PNGs to proper LFS pointers
These images were committed as raw binaries on main despite
.gitattributes marking *.png for LFS tracking. Re-add them through
the LFS clean filter so they're stored as pointers.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:24:23 -07:00
Tyler Slaton 275544f23a chore: apply formatter changes from pre-commit hook
Auto-formatted showcase and web-inspector files picked up by the
lint-fix pre-commit hook.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 09:23:18 -07:00
Ran Shem Tov d1f57e6b37 feat(cli): provide a clean scaffolded agentcore project per framework 2026-04-03 17:36:37 +02:00
Alem Tuzlak c5d80f8cd3 chore(examples): update demo video and title in open-mcp-client showcase (#3603)
## Summary

- Updated demo video in the readme
- Updated the title for the open-mcp-client showcase
2026-04-03 15:36:25 +02:00
Ran Shem Tov 4cc494c84d chore: fix formatting 2026-04-03 15:04:40 +02:00
Anmol Baranwal db7ad5250b chore: add demo video and update title in README 2026-04-03 18:01:54 +05:30
Ran Shem Tov efe66dcb28 chore(agentcore): add suffix on fast main stack for tracking 2026-04-03 10:12:56 +02:00
Jerel 179cbfae03 Merge branch 'main' into showcase/add-showcase-open-mcp-app-NBTmf 2026-04-02 08:44:27 -07:00
Jerel 4413987477 fix(open-mcp-client): address PR review feedback
Remove duplicate .claude/skills and .cursor/skills directories (keep
.agent/skills only), pin mcp-use to ^1.22.3, fix OpenAI model to
gpt-5.4-2026-03-05, align e2b (^2.13.0) and @modelcontextprotocol/sdk
(^1.25.2) versions across packages, replace vivek100 repo URLs with
CopilotKit/CopilotKit, fix clean script to preserve pnpm-lock.yaml,
and fix threejs-server main field to point to built output.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:41:57 -07:00
Jerel 0eeafb23c8 chore(open-mcp-client): remove Vercel deployment references
Replace Vercel-specific comments and README sections with
generic or Render-specific content. Keep .vercel in gitignore
as a standard exclusion.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:25:34 -07:00
Jerel d0955e1f9d chore(open-mcp-client): add agent skills README and exclude skills from Docker build
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:22:17 -07:00
Jerel 4454b8491c chore(open-mcp-client): update GitHub link to CopilotKit/CopilotKit
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:12:36 -07:00
Jerel 15e37ac73c chore(open-mcp-client): add Render deployment config
Add Dockerfile (multi-stage, Next.js standalone), .dockerignore,
render.yaml, and pnpm-lock.yaml. Fix stale @ts-expect-error in
route.ts that broke production builds.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 08:10:30 -07:00
Alem Tuzlak 401a27c981 fix: resolve rebase conflicts and format files
- Remove stale eslint-config-custom refs from package.json files
- Regenerate pnpm-lock.yaml
- Format agentcore and other files with oxfmt
2026-04-02 16:43:34 +02:00
Alem Tuzlak 4ca5b9b621 style: fix package.json sort order after rebase 2026-04-02 16:39:56 +02:00
Alem Tuzlak 932b371bc7 fix: reformat conflict-resolved files
https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:40 +02:00
Alem Tuzlak 79ce60c580 chore: migrate from eslint+prettier to oxlint+oxfmt
Replace eslint and prettier with oxlint and oxfmt for faster linting
and formatting across the monorepo. Remove all eslint and prettier
configs, dependencies, and related packages. Add .oxlintrc.json and
.oxfmtrc.json for the new tooling. Update CI workflows and lefthook
hooks accordingly. Reformat codebase with oxfmt.

https://claude.ai/code/session_01GMkSf29p78HuMR1mbXn8He
2026-04-02 16:39:05 +02:00
Jerel 07c479fdab feat: add open-mcp-client showcase example
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 07:15:17 -07:00
Ran Shem Tov d7735a0177 chore(agentcore): explain AgentCoreRunner with why-it-exists comment block 2026-04-02 13:03:14 +02:00
Ran Shem Tov de2e9d31bc chore(agentcore): simplify agent identity extraction and remove dead code 2026-04-02 13:01:55 +02:00
Ran Shem Tov 3af48ff4e7 chore(agentcore): add local dev setup 2026-04-02 10:49:35 +02:00
Ran Shem Tov a3af6a9b53 chore(agentcore): removed unused files and classes 2026-04-02 10:49:35 +02:00
Ran Shem Tov 47a3808908 chore(agentcore): use local uncommitted config.yaml 2026-04-02 10:49:35 +02:00
Ran Shem Tov 169756b60e chore(agentcore): add missing frontend files 2026-04-02 10:49:35 +02:00
Claude 0d9e3b88f6 chore(post-release): update version to 1.55.0-next.8
The previous publish workflow released 1.55.0-next.8 to npm but the
post-release commit failed to push to main (blocked by branch
protection). This applies the version bumps and pre.json updates that
the workflow would have committed, unblocking future releases.

https://claude.ai/code/session_01N8sLK9h9p6FdRjyHqzKzVV
2026-04-02 02:23:27 +00:00
Alem Tuzlak cce5177af9 feat(examples): add React Router v7 example with TanStack AI agent (#3561)
## Summary

- Adds a new example app at `examples/v2/react-router` demonstrating
CopilotKit with React Router v7 (SSR/framework mode) and TanStack AI as
the default agent
- `TanStackAIAgent` wraps TanStack AI's `chat()` via a factory callback
pattern, giving users full type safety over adapter/model configuration
- CopilotKit runtime is mounted as a Hono route on the same server that
serves React Router SSR

## Key files

| File | Purpose |
|------|---------|
| `app/agent.ts` | `TanStackAIAgent` — thin `AbstractAgent` wrapping a
`chat()` factory, with AG-UI event normalization |
| `app/server.ts` | Hono server config mounting CopilotKit endpoint +
React Router SSR |
| `app/routes/_index.tsx` | Full-page `CopilotChat` UI |

## Notes

Discovered that TanStack AI's AG-UI events have subtle differences from
`@ag-ui/core` spec (extra fields, own type definitions instead of
importing from `@ag-ui/core`, own `runId`/no `threadId`). The
`TanStackAIAgent` normalizes these by consuming only text/tool deltas
from the stream and re-emitting clean `@ag-ui/client`-compatible events.
Will follow up with TanStack AI team on aligning their event types with
`@ag-ui/core`.

## Test plan

- [x] `pnpm build` passes
- [x] Dev server starts and serves the app
- [x] CopilotChat renders and streams responses from TanStack AI via
CopilotKit runtime
- [x] TypeScript type checks pass with zero errors

🤖 Generated with [Claude Code](https://claude.com/claude-code)
2026-04-01 11:58:13 +02:00
Martha Schumann 0f01f3ea2d fix(state-manager): address code review feedback
- Replace boolean param with SubscribeConfig object on subscribeToAgent
- Invert handleNewMessage guard to early-return on missing input
- Remove module-scope isAnthropic variable in demo route (SSR safety)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-31 07:51:35 -07:00
Alem Tuzlak 8b4b32a44d style(examples): fix formatting in react-router example 2026-03-31 13:47:49 +02:00
Alem Tuzlak 7eaade9201 feat(examples): add React Router v7 example with TanStack AI agent
Add a new example app at examples/v2/react-router demonstrating CopilotKit
with React Router v7 (SSR/framework mode) and TanStack AI as the default agent.

- React Router v7 SSR with Hono server via react-router-hono-server
- CopilotKit runtime mounted as a Hono route on the same server
- TanStackAIAgent: thin AbstractAgent wrapper that accepts a chat() factory
  callback, giving users full type safety over TanStack AI's adapter/model config
- Proper AG-UI event normalization bridging TanStack AI's event format to
  what CopilotKit's @ag-ui/client pipeline expects
- Full-page CopilotChat UI with Tailwind CSS v4
2026-03-31 13:45:01 +02:00