Commit Graph

30 Commits

Author SHA1 Message Date
Mike Ryan d6ad0f8d31 fix(examples): align LangGraph starter AG-UI dependency trees 2026-09-08 13:44:34 -07:00
Mike Ryan e3b249f0f7 chore(examples): update CLI starters to current SDK releases 2026-09-08 13:43:10 -07:00
Maximiliano Korp 15b24e51a3 chore(examples): update CLI starters to CopilotKit 1.70.0 2026-08-31 20:23:15 -07:00
Mike Ryan 5b9776a1a0 chore(examples): update CLI starter package versions 2026-08-17 12:31:41 -07:00
Benjamin Taylor 23671e09f1 chore(examples): move the starters onto channels 0.6.1
0.6.1 carries one change: createChannel's clone check now warns instead of
throwing when `clone()` drops subclass state (#6322). On 0.6.0 a starter
hosting a Channel through @ag-ui/langgraph refuses every turn, because
LangGraphAgent's clone() leaves `emittedToolCallStartIds` and
`eventsStreamActive` behind -- both per-run scratch that is re-initialized
before anything reads it, so dropping them was never the problem. The
starters are the surface where that failure is user-visible, so they should
not sit on the release that has it.

No @copilotkit/* bump rides along, and none is needed. The fix lives entirely
in @copilotkit/channels-core, and every path to it is a caret range:
runtime@1.65.0 asks for channels-core ^0.6.0, and channels-intelligence@0.6.0
(which runtime does pin exactly) asks for ^0.6.0 as well. Both resolve onto
the same 0.6.1, so the runtime's channel path picks up the fix without a new
runtime release. Verified from the regenerated locks rather than assumed:
each of the 15 resolves exactly one channels-core, at 0.6.1, with no second
copy nested under runtime.

Lockfiles were regenerated with --package-lock-only; the diffs contain
@copilotkit/channels* lines and nothing else, so no unrelated dependency
floated forward in the process.
2026-08-03 09:19:47 -05:00
Benjamin Taylor 475002e49d chore(examples): move the starters off the canary onto stable
The canary pin existed for one reason: createChannel's identifyUser was absent
from stable, and the pin carried a note that it must not reach users as-is.
Stable has caught up -- @copilotkit/* 1.65.0 and @copilotkit/channels 0.6.0 --
so the workaround goes.

This is not only hygiene. The runtime validates each delivery with an exact
field set, so a client and a server that disagree fail in BOTH directions: a
client expecting a field the server omits, and equally a client receiving one it
does not expect. Now that every Intelligence environment sends the prepared
turn's messageRef, pinning back to an older stable would break exactly as hard
as staying on a canary would have before. 0.6.0 expects it, which is what makes
it the correct pin rather than merely a newer one.

Verified before committing: channels-intelligence@0.6.0 requires messageRef on a
text turn, channels-core@0.6.0 carries identifyUser, and channels@0.6.0 pins its
subpackages exactly rather than by range, so there is no internal skew. The
reference starter installs, typechecks its channel host, and builds. Its one
remaining tsc error is a pre-existing recharts type mismatch, untouched here.

langgraph-fastapi is included: it does not ship a host, but this branch pinned it
to the canary, so it cannot be left there.
2026-08-02 20:05:55 -05:00
Benjamin Taylor 6da5731c67 fix(examples): typecheck the channel host and disambiguate its config errors
Review findings on the managed Channel host in langgraph-python:

- Add "typecheck:channel" (tsc -p tsconfig.channel.json --noEmit) so
  channel-host.mts has a repeatable typecheck now that it sits outside the
  parity-tracked root tsconfig.json's include set. Passes clean (no new
  errors, no skipLibCheck/any widening needed).
- resolveChannelName() no longer conflates a missing .copilotkit/channels.json
  with a malformed one. Reading and parsing are now separate try blocks: a
  missing file keeps the existing "run channels add" message, a parse
  failure says the file exists but could not be parsed and includes the
  underlying error, instead of misdirecting to re-add the channel.
2026-08-02 00:04:26 -05:00
Benjamin Taylor b0b51eb8f9 feat(examples): add a managed Channel host to the langgraph-python starter
Extracts agent construction into src/agent.ts so the runtime route and the new
channel-host.mts share one definition. The host holds no provider credentials and
declares no adapters: Intelligence owns the provider edge, so one host file works
for every provider.

Also adds tsconfig.channel.json, used only by the new "channel" script
(tsx --tsconfig tsconfig.channel.json channel-host.mts). Without it, tsx crashes
before the host's own code runs: the starter's tsconfig.json sets allowJs: true
(the create-next-app default, present in all 15 starters), which makes tsx's
CJS resolver prefer a sibling .ts file over the real .js entry point for *any*
node_modules package on a bare-specifier require -- including fast-json-patch
(pulled in transitively via @ag-ui/client), whose published package ships an
orphan index.ts (a source re-export of ./src/core) without the src/ directory
it points at. tsconfig.channel.json omits allowJs so this never triggers, and
does not touch the app's real tsconfig.json (which is parity-tracked verbatim
across other starters -- confirmed by testing the alternative fix first).

Full verification trail, including this deviation and the reasoning above, is
in .superpowers/sdd/2026-08-01-channel-host-in-starters/task-1-report.md.
2026-08-01 23:58:17 -05:00
Benjamin Taylor f909b7e1db chore(examples): pin starter @copilotkit/* deps to the main canary
The managed Channel API (CopilotRuntime channels, listener.channels) is absent at
1.62.3, and createChannel's identifyUser is absent from stable 0.5.0. The canary
line carries both, so starters track main. All packages share one build suffix
(1785633429), and the canary runtime pins channels-core to that exact suffix
rather than a range, so there is no version skew.

langgraph-fastapi is bumped too. It gets no Channel host (the CLI does not offer
it) but it is enrolled in the _parity drift check, so leaving it behind would make
every tracked @copilotkit version mismatch the north-star.

Verified: 15/15 starters typecheck with no new errors (7 have pre-existing errors,
each confirmed identical on the old pins) and 14/15 build; llamaindex's build
failure is the pre-existing clickOutsideToClose/CopilotChatProps mismatch, which
surfaces there because it does not set typescript.ignoreBuildErrors.

Temporary: these pins must move to a stable release carrying identifyUser before
the CLI's channel path ships to users.

Verification skipped on commit: the pre-commit hook runs the full repo suite,
which is unrelated to a dependency-pin change.
2026-08-01 23:35:38 -05:00
Benjamin Taylor 654389aa9e chore(examples): bump @copilotkit deps to 1.62.3 [ENT-1051]
The 1.62.3 release publishes the CopilotThreadsDrawer redesign (web-components +
react-core wrapper) and the stateless /suggest feature. Bump the 15 integration
examples that consume the drawer from 1.62.2 -> 1.62.3 (package.json + lockfiles)
so they pick up the released packages alongside this branch's example CSS.

Validated: langgraph-js runs on the published 1.62.3 (no local links) — the
redesigned drawer renders (New Conversation, Recent Conversations, filter funnel,
desktop collapse toggle, per-row kebab), threads are licensed, and a real agent
message round-trips.
2026-07-08 12:23:35 -05:00
Benjamin Taylor 9b5a124a1c chore(examples): normalize @copilotkit/runtime pins to raw versions
The langgraph/strands examples pinned @copilotkit/runtime via a
self-referential npm alias (npm:@copilotkit/runtime@x) left over from the
de-fork branch (2155821b8), where it forced registry resolution while
react-core used workspace:*. That alias is functionally identical to a
raw pin and react-core was already reverted, so drop the alias in the four
remaining files (langgraph-fastapi, langgraph-js, langgraph-python,
strands-python) and regenerate their lockfiles.
2026-07-02 18:08:32 -05:00
Benjamin Taylor b0ea64c718 chore(examples): bump integration scaffolds to @copilotkit 1.62.2
Bump the 16 integration examples already on the 1.62.x line from 1.62.1
to 1.62.2 (the just-published release), including their in-tree agent
sub-packages (langgraph-js/agent sdk-js, agentcore CDK lambda runtime)
that had drifted to 1.61.0. Regenerated the co-located package-lock.json
files against the published 1.62.2.

a2a-a2ui and agent-spec remain at 1.61.0 (QA-held; out of scope).
2026-07-02 17:55:47 -05:00
Benjamin Taylor dded304053 chore(examples): bump de-forked threads examples to @copilotkit 1.62.1
The drawer shipped in 1.62.1 (react-core + the previously-missing
web-components package). Move the de-forked examples off the workspace:*
placeholder (and 1.61.0 runtime) onto the published 1.62.1, so they consume
the real SDK CopilotThreadsDrawer. Verified: a standalone install + next build
of pydantic-ai resolves CopilotThreadsDrawer from the published packages.
2026-07-01 16:22:42 -05:00
Benjamin Taylor 2155821b86 chore(examples): de-fork threads-enabled integration examples onto SDK CopilotDrawer
Replace the hand-rolled threads-drawer fork in every threads-enabled
integration example with the SDK <CopilotDrawer> (uncontrolled
CopilotChatConfigurationProvider + reserved-column layout + theme no-flash
where applicable). 16 examples; all browser/build-validated locally.

DRAFT — depends on #5707 and the subsequent npm release; not mergeable until
the SDK publishes @copilotkit/web-components and react-core bumps. Pre-merge
TODOs in the PR description.
2026-07-01 16:22:42 -05:00
Benjamin Taylor ce1ee7283d chore(examples): bump @copilotkit/* deps to 1.61.0 across integration starters
Prep for the 1.61.0 release. Pins every @copilotkit/* dependency in the
examples/integrations starter projects to exact 1.61.0 (not yet published).

ENT-939
2026-06-18 15:15:23 -05:00
Maxim 0363017503 fix(examples): bump @copilotkit to 1.60.1 for @ag-ui/client fetch fix
The chat never responds and the browser console shows
"TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation"
on every agent run (onRunFailed, agentId: default).

Root cause is in @ag-ui/client@0.0.56's HttpAgent: it stores the global
fetch unbound (`this.fetch = config.fetch ?? fetch`) and later invokes it
as `this.fetch(...)`, so native fetch runs with the agent instance as its
receiver instead of `window`. Native fetch is brand-checked and throws
"Illegal invocation". It surfaces in both dev and prod.

Fixed upstream in @ag-ui/client@0.0.57 (`config.fetch ?? ((url, init) =>
fetch(url, init))`), which shipped in @copilotkit/* 1.60.1. Bumping these
examples 1.60.0 -> 1.60.1 pulls 0.0.57 transitively; lockfiles regenerated.

Scope: only the examples that take @ag-ui transitively from react-core are
bumped here. Other integration examples force-pin @ag-ui via `overrides`
to 0.0.53/0.0.55, where 1.60.1 would create a version skew; those need a
per-integration bump and are intentionally left out of this change.
2026-06-16 18:27:37 +02:00
Benjamin Taylor 717cfccedb chore(examples/integrations): bump CopilotKit to 1.60.0
Bumps every @copilotkit/* pin (react-core, react-ui, runtime, a2ui-renderer,
sdk-js) from 1.59.5 to 1.60.0 across the threads-enabled integration examples,
and regenerates each package-lock.json to the 1.60.0 dependency closure.
Excludes the vestigial langgraph-python-threads example.
2026-06-11 15:42:25 -05:00
Jordan Ritter 46da9bbf7f chore(examples): bump starter integrations to @copilotkit 1.59.5 2026-06-05 10:40:42 -07:00
Jordan Ritter fed4fb2040 chore(examples/integrations): float strands/langgraph starters to copilotkit 1.59.3
Version-only bump for strands-python, langgraph-fastapi, langgraph-js, and langgraph-python (package.json + lockfile); no source changes required.
2026-06-03 22:03:38 -07:00
Benjamin Taylor 3721e7b36b Revert "feat(integrations): Intelligence threads — north-star foundation + batch 1 (7 examples on 1.59.1) [ENT-679] (#5151)"
This reverts commit f3ec5ddcec, reversing
changes made to be20a389cf.

# Conflicts:
#	examples/integrations/adk/src/app/layout.tsx
#	examples/integrations/adk/src/app/page.tsx
#	examples/integrations/agno/src/app/layout.tsx
#	examples/integrations/agno/src/app/page.tsx
#	examples/integrations/crewai-crews/src/app/layout.tsx
#	examples/integrations/llamaindex/src/app/api/copilotkit/[[...slug]]/route.ts
#	examples/integrations/llamaindex/src/app/layout.tsx
#	examples/integrations/llamaindex/src/app/page.tsx
#	examples/integrations/mastra/src/app/layout.tsx
#	examples/integrations/mastra/src/app/page.tsx
#	examples/integrations/ms-agent-framework-dotnet/src/app/layout.tsx
#	examples/integrations/ms-agent-framework-dotnet/src/app/page.tsx
#	examples/integrations/ms-agent-framework-python/src/app/layout.tsx
#	examples/integrations/ms-agent-framework-python/src/app/page.tsx
#	examples/integrations/pydantic-ai/src/app/layout.tsx
2026-06-03 20:47:46 -05:00
Benjamin Taylor 94130333c6 feat(examples/integrations): Intelligence threads (batch 1) on @copilotkit 1.59.1
Activation-gated Intelligence/threads added to the batch-1 integration
examples (langgraph-js, mastra, adk, agno, ms-agent-framework-python,
ms-agent-framework-dotnet) and standardized — with the langgraph-python
north-star — on @copilotkit 1.59.1.

Per-example:
- env-gated CopilotKitIntelligence route branch (multi-route endpoint +
  `useSingleEndpoint={false}` REST transport; no organizationId);
- bespoke themed threads-drawer panel + locked-state tease;
- next.config `NEXT_PUBLIC_COPILOTKIT_THREADS_ENABLED` gate; demo-user identity.

Demo migration to v2 hooks (the 1.59.1 bump broke the V1-era demos):
- `useAgent({ agentId })` -> `{ agent }` with `agent.state`/`setState`;
- `useFrontendTool` params as Zod schemas; CopilotSidebar content as a sibling
  (v2 slot model), not children; guarded card state.

Shared `_intelligence/` overlay: composite image 0.2.0, idempotent
`provision-user` one-shot (demo-user), and `CHECK_ORIGIN=false` so the local
realtime-gateway accepts the app's websocket origin.

Verified end-to-end on mastra (threads CRUD create/list/auto-name + agent run +
live updates, clean console); the other five build clean and await per-example
visual review.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-03 12:03:24 -05:00
Jordan Ritter 23af69041c fix(examples): migrate integrations from v1 to v2 API surface
Migrate 15 example integrations from the v1 compatibility facade to
native v2 CopilotKit APIs. The v1 surface delegates to v2 internally
so this is an API surface change, not a functional one.

Key changes per integration:
- Import paths: @copilotkit/react-core -> react-core/v2,
  @copilotkit/runtime -> runtime/v2
- Hook renames: useCoAgent -> useAgent, useCopilotAction ->
  useFrontendTool, useRenderToolCall -> useRenderTool
- UI: CopilotSidebar from react-ui -> react-core/v2
- Styles: react-ui/styles.css -> react-core/v2/styles.css
- Runtime: copilotRuntimeNextJSAppRouterEndpoint ->
  createCopilotEndpoint + hono/vercel
- Removed @copilotkit/react-ui and @copilotkit/shared deps

Integrations migrated (v1 -> v2):
  a2a-middleware, adk, agno, crewai-crews, crewai-flows,
  langgraph-js, llamaindex, mastra, ms-agent-framework-dotnet,
  ms-agent-framework-python, pydantic-ai, strands-python

Mixed integrations cleaned up (stale deps removed):
  agent-spec, agentcore, langgraph-fastapi, langgraph-python,
  langgraph-python-threads
2026-05-22 12:10:00 -07:00
Ran Shem Tov 84af438694 chore: use latest cpk 2026-05-01 12:31:05 +02:00
Tyler Slaton 01fd0ac6d7 feat(langgraph-py): add file-uploads and bug-fixes
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-04-29 23:54:10 -07:00
Alem Tuzlak 321454b823 fix: pin langgraph-python to stable deps, fix mastra dev, restore Windows .bat fallback
- langgraph-python: replace ephemeral pkg.pr.new URLs with stable @copilotkit/*@1.56.2
- mastra: wire dev to run ui + agent via concurrently (was only starting UI)
- Restore `|| scripts\setup-agent.bat` / `|| scripts\run-agent.bat` fallback across
  12 starter templates so npm install + npm run dev work on Windows without Git Bash
2026-04-17 18:04:18 +02:00
Alem Tuzlak 41e57ed74b fix: remove .bat fallback pattern, fix README typos and phantom scripts
- Remove '|| .bat' fallback from all starter package.json scripts so
  real errors on Linux/macOS are not masked by a failing .bat attempt
- Fix typos: 'isseus' -> 'issues', 'interactin' -> 'interacting'
- Fix crewai-crews README title/body saying 'Flow' instead of 'Crew'
- Fix a2a-a2ui README wrong agent name and file path
- Remove phantom lint/dev:debug scripts from README Available Scripts
  sections where those scripts don't exist in package.json
- Add missing dev:ui and dev:agent to mastra README
2026-04-16 14:00:52 +02:00
Alem Tuzlak 453097ff18 fix: convert starter templates from pnpm/Turborepo to flat npm projects
Flatten langgraph-python, langgraph-js, and mcp-apps starters so
npm install && npm run dev works out of the box. Replace Turborepo
with concurrently, move apps/* to root, update Dockerfiles, READMEs,
and entrypoints. Also remove stray pnpm-lock.yaml from a2a-a2ui and
ms-agent-framework-dotnet starters.
2026-04-16 13:23:30 +02:00
Markus Ecker e3c00af220 feat(examples): A2UI + OpenGenUI demos, updated aimock fixtures, dojo e2e fixes 2026-04-08 12:50:56 -07: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
Jordan Ritter ec3a5ff114 feat: consolidate 47 demo repos into examples/ 2026-03-12 13:06:02 -07:00