Commit ddea8d0
authored
feat(runtime, react): Scaffold Intelligence runner and agent (CopilotKit#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 documentation12 files changed
Lines changed: 1607 additions & 3 deletions
File tree
- packages/v2
- core
- src
- __tests__
- runtime
- src/runner
- __tests__
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
0 commit comments