Commit Graph

1601 Commits

Author SHA1 Message Date
Jordan Ritter d11d13f869 chore: add comment explaining dual Escape handler interaction 2026-03-06 10:28:47 -08:00
Ran Shem Tov 4a294d2be3 chore: add tests 2026-03-06 19:24:00 +01:00
Ran Shem Tov a53bc556b2 feat: only add a2ui renderer when a2ui is enabled in runtime 2026-03-06 19:24:00 +01:00
Ran Shem Tov 4966e5cf1f feat: eagerly create default A2UI renderer when middleware is enabled 2026-03-06 19:24:00 +01:00
Ben Taylor faf7399919 feat(core): Add Micro Redux helpers for cross-framework state management (#3391)
<!--
Thank you for sending the PR! We appreciate you spending the time to
work on these changes.

Help us understand your motivation by explaining why you decided to make
this change.


**Please PLEASE reach out to us first before starting any significant
work on new or existing features.**

By the time you've gotten here, you're looking at creating a pull
request so hopefully we're not too late.

We love community contributions! That said, we want to make sure we're
all on the same page before you start.
Investing a lot of time and effort just to find out it doesn't align
with the upstream project feels awful, and we don't want that to happen.
It also helps to make sure the work you're planning isn't already in
progress.

As described in our contributing guide, please file an issue first:
https://github.com/ag-ui-protocol/ag-ui/issues
Or, reach out to us on Discord: https://discord.com/invite/6dffbvGU3D


You can learn more about contributing to copilotkit here:
https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md

Happy contributing!

-->

## What does this PR do?

(Describe the changes introduced in this PR)

## Related PRs and Issues

- (Direct link to related PR or issue, if relevant)

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation
2026-03-06 11:30:39 -06:00
Mike Ryan c943907737 feat(core): Add Micro Redux helpers for cross-framework state management 2026-03-06 09:16:04 -08:00
github-actions[bot] 1fd878c582 chore(post-release): update version to 1.53.1-next.0 2026-03-06 17:10:16 +00:00
Ran Shemtov ad697dea79 Merge branch 'main' into feat/a2ui-message-renderer-in-react-core 2026-03-06 18:01:06 +01:00
Ran Shem Tov 8667fc7606 feat: move a2ui message renderer to v2s react package 2026-03-06 16:33:36 +01:00
Alem Tuzlak 69d9e869e3 feat(react-core): export CopilotKit from v2 subpath
Re-export the CopilotKit component and CopilotKitProps type from
@copilotkit/react-core/v2 so users can import the full-featured
provider (with 1.50 compatibility layer) directly from the v2 subpath.
2026-03-06 14:04:06 +01:00
Ben Taylor a5ce8abdcc feat(runtime, react): Explicit error handling and retires for IntelligenceAgent* (#3379)
<!--
Thank you for sending the PR! We appreciate you spending the time to
work on these changes.

Help us understand your motivation by explaining why you decided to make
this change.


**Please PLEASE reach out to us first before starting any significant
work on new or existing features.**

By the time you've gotten here, you're looking at creating a pull
request so hopefully we're not too late.

We love community contributions! That said, we want to make sure we're
all on the same page before you start.
Investing a lot of time and effort just to find out it doesn't align
with the upstream project feels awful, and we don't want that to happen.
It also helps to make sure the work you're planning isn't already in
progress.

As described in our contributing guide, please file an issue first:
https://github.com/ag-ui-protocol/ag-ui/issues
Or, reach out to us on Discord: https://discord.com/invite/6dffbvGU3D


You can learn more about contributing to copilotkit here:
https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md

Happy contributing!

-->

## What does this PR do?

This PR expands on reconnection and error handling for the
IntelligenceAgent and IntelligenceAgentRunner interactions with the
Phoenix lib/server, like timeouts and disconnects.

It explicitly defines exponential backoff behavior (Phoenix has default
settings, but they are silently disabled if you add error callbacks.
While that was only done in the AgentRunner to begin with, it felt
strange to leave it as a foot gun elsewhere).

There is also added logic to ensure cleanup messages are sent (at best
effort) before channels are closed.

Additionally:
* each agent run through the IntelligenceAgentRunner now gets its own
web socket connection (before, it only got its own _channel_)
* the IntelligenceAgent now stops a running agent by publishing a stop
(custom AG-UI) message to Phoenix, which is handled by the
IntelligenceAgentRunner.

## Related PRs and Issues

- https://linear.app/copilotkit/issue/ENT-54
- https://linear.app/copilotkit/issue/ENT-59

## Checklist

- [ ] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation
2026-03-05 20:38:15 -06:00
github-actions[bot] 57eb016a10 chore(post-release): update version to 1.53.0 2026-03-05 23:57:25 +00:00
github-actions[bot] 671fd0ae47 chore(post-release): update version to 1.53.0-next.6 2026-03-05 23:41:37 +00:00
Maxim 501e8d70ae fix(runtime): skip afterRequestMiddleware when user didn't configure one
The v1 CopilotRuntime always set afterRequestMiddleware on the v2 runtime,
causing parseSSEResponse to attempt reading the cloned SSE stream body even
when no user hooks existed. This results in "Failed to read SSE response
body in afterRequestMiddleware" warnings. Only register the handler when
the user actually provided afterRequestMiddleware or middleware.onAfterRequest.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 18:38:06 -05:00
github-actions[bot] 3ba2352ef8 chore(post-release): update version to 1.53.0-next.5 2026-03-05 23:06:01 +00:00
Tyler Slaton f822c051de refactor(runtime): mcp -> mcpApps w/ granular config
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-05 17:40:28 -05:00
github-actions[bot] 9f12589107 chore(post-release): update version to 1.52.2-next.4 2026-03-05 21:28:52 +00:00
Maxim 2bf990b74b chore: formatting 2026-03-05 16:25:16 -05:00
Maxim d975e98892 feat: add onError prop to CopilotChat, simplify connectAgent error handling
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Maxim 94e4dce4f2 feat: add onError prop to CopilotKitProvider (no publicApiKey gate)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Maxim e97790e4ae fix: useAgent returns provisional agent on runtime error state
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Maxim 8ccd943284 fix: tool argument parse errors no longer crash the app
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Maxim bcb5f350ca fix: runAgent emits error instead of re-throwing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Maxim 1fa0eed9a0 fix: connectAgent emits error instead of re-throwing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-05 16:25:16 -05:00
Tyler Slaton 0e0befe35b fix(runtime): fix issue with undefined serviceAdapters
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-05 15:39:21 -05:00
Benjamin Taylor b78189e008 feat(runtime, react): DRY test helper and move helper function to utils 2026-03-05 12:49:23 -06:00
github-actions[bot] 2173e89096 chore(post-release): update version to 1.52.2-next.3 2026-03-05 17:42:38 +00:00
Jordan Ritter 005d77f87e fix: remove server-side runtime dependency from runtime-client-gql (#3310)
## Summary

- `@copilotkit/runtime-client-gql` declared `@copilotkit/runtime` as a
dependency, but never imports from it at runtime
- This caused barrel re-exports to pull server-side code into client
bundles (600KB → 4.3MB)
- Removed the package.json dependency and added an Nx
`implicitDependencies` entry to preserve build ordering (graphql-codegen
needs the schema file that runtime generates)

Fixes #3225

## Test plan

- [x] Verified no source imports from `@copilotkit/runtime` in
runtime-client-gql
- [x] Nx build ordering preserved via `implicitDependencies`
- [x] Full build passes (including graphql-codegen)
- [x] All tests pass

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-03-05 13:31:21 -04:00
Jordan Ritter f64f7de8d8 fix: rewrite dead via.placeholder.com URLs in A2UI Image component (#3309)
## Summary

- The A2UI Composer's Image component used `via.placeholder.com` URLs
for fallback/placeholder images
- That domain is dead, resulting in broken images
- Replaced with `placehold.co` which provides the same service

Fixes #3109

## Test plan

- [x] Verified no remaining references to `placeholder.com` in the
codebase
- [x] Build passes

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-03-05 13:30:50 -04:00
Jordan Ritter 087451ed9f fix: add missing CSS classes to v2 CopilotChat components (#3307)
## Summary

- v2 CopilotChat components were missing the CSS class names that v1
provided (`copilotKitMessages`, `copilotKitInput`,
`copilotKitResponseButton`, etc.)
- Users relying on these classes for custom styling had no way to target
v2 components
- Added matching CSS classes to all relevant v2 chat components

Fixes #3133

## Test plan

- [x] Test verifying all expected CSS classes are present on rendered
components
- [x] Full package test suite passes
- [x] Build passes

🤖 Generated with [Claude Code](https://claude.ai/code)
2026-03-05 13:30:21 -04:00
Benjamin Taylor 8b26574a15 feat(runtime, react): Add more explicit Phoenix.js retry config and error case handling 2026-03-05 10:33:27 -06:00
Ran Shemtov 55a349175d Merge branch 'main' into feat/a2ui-mcp-runtime-props 2026-03-05 17:30:12 +01:00
Alem Tuzlak b433824476 Testing #3250 (#3253)
Triggering E2E for #3250
2026-03-05 17:29:00 +01:00
Ran Shem Tov e76e5e7c11 chore: use latest agui 2026-03-05 16:43:33 +01:00
Ran Shem Tov ff6130ece9 chore: formatting 2026-03-05 16:41:29 +01:00
Ran Shem Tov 947978e777 feat: enable mcp and a2ui middleware directly from copilotkit runtime 2026-03-05 16:41:29 +01:00
github-actions[bot] 3ff24c8b05 chore(post-release): update version to 1.52.2-next.2 2026-03-05 10:31:34 +00:00
Tyler Slaton 286ed58927 Merge branch 'main' into 3169-multiple-requests 2026-03-04 21:30:27 -05:00
Maxim 3ea54b2e65 Merge branch 'main' into feat/upgrade-ai-sdk 2026-03-05 01:27:05 +04:00
Ben Taylor ddea8d0f99 feat(runtime, react): Scaffold Intelligence runner and agent (#3348)
<!--
Thank you for sending the PR! We appreciate you spending the time to
work on these changes.

Help us understand your motivation by explaining why you decided to make
this change.


**Please PLEASE reach out to us first before starting any significant
work on new or existing features.**

By the time you've gotten here, you're looking at creating a pull
request so hopefully we're not too late.

We love community contributions! That said, we want to make sure we're
all on the same page before you start.
Investing a lot of time and effort just to find out it doesn't align
with the upstream project feels awful, and we don't want that to happen.
It also helps to make sure the work you're planning isn't already in
progress.

As described in our contributing guide, please file an issue first:
https://github.com/ag-ui-protocol/ag-ui/issues
Or, reach out to us on Discord: https://discord.com/invite/6dffbvGU3D


You can learn more about contributing to copilotkit here:
https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md

Happy contributing!

-->

## What does this PR do?

This PR adds an initial scaffolding of the CopilotKit Intelligence agent
runner and React agent classes.

Both will be part of the new threads-enabled feature set, and will be
iterated upon in subsequent PRs.

For this PR, the React agent is not tied into `useAgent`, so it cannot
currently be interacted with.

Also, in this PR, docs that describe the agent and runner architecture
are not updated, as it is assumed that these classes may change
substantially and rapidly in the very near term.

A big part of this PR is the integration of the Phoenix JS client SDK to
enable the IntelligenceAgent and IntelligenceAgentRunner to connect to
the Intelligence platform's Phoenix server. That allows threaded AG-UI
messages to be streamed from to and from the platform, instead of
directly from agent runner to client agent hook.

The message structure for the Phoenix connection is still in flux.

Note: while the SQLite-backed agent runner is in a separate package, the
IntelligenceAgentRunner was intentionally placed along side the
`ProxiedCopilotRuntimeAgent` to make it that much easier to switch from
the latter to the former if desired.

## Related PRs and Issues

- https://linear.app/copilotkit/issue/ENT-59
- https://linear.app/copilotkit/issue/ENT-54

## Checklist

- [x] I have read the [Contribution
Guide](https://github.com/copilotkit/copilotkit/blob/master/CONTRIBUTING.md)
- [ ] If the PR changes or adds functionality, I have updated the
relevant documentation
2026-03-04 14:05:17 -06:00
Maxim 9241c2b611 feat(runtime): upgrade AI SDK to v6 to match v2 agent 2026-03-04 15:02:37 -05:00
Maxim bdedf25f6d feat(agent): upgrade AI SDK to v6 for LanguageModelV3 compatibility 2026-03-04 15:02:16 -05:00
Tyler Slaton 7c87c4ac61 chore(runtime): fix linter issues
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-04 13:14:01 -05:00
Alem Tuzlak 910945f07a fix(runtime): update OpenAI import to use default export 2026-03-04 13:14:01 -05:00
Tyler Slaton aebb9b5918 fix(runtime): remove openai as a peerdep
Signed-off-by: Tyler Slaton <tyler@copilotkit.ai>
2026-03-04 13:14:01 -05:00
Benjamin Taylor 5322f2b3f0 feat(runtime, client): remove unhelpful void usage 2026-03-04 11:44:15 -06:00
Benjamin Taylor 18143c09be feat(runtime, react): Change executeAgentRun to use Observable semantics instead of Promise 2026-03-04 11:00:29 -06:00
Benjamin Taylor c6b8b5868c feat(runtime, react): Wrap Phoenix connection in an observable in run/connect 2026-03-04 10:32:47 -06:00
Benjamin Taylor 96c96c90cc feat(runtime, react): Remove some outlining comments and format others to be smaller 2026-03-04 09:02:15 -06:00
Alem Tuzlak 33372d2804 Merge branch 'main' into 3169-multiple-requests 2026-03-04 13:48:03 +01:00