<!--
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
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.
<!--
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
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>
## 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)
## 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)
## 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)
<!--
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