copilotkit-agent-runner 0.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +71 -0
- package/dist/index.cjs +969 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +632 -0
- package/dist/index.d.ts +632 -0
- package/dist/index.js +958 -0
- package/dist/index.js.map +1 -0
- package/package.json +101 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Elisha Kramer
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
# copilotkit-agent-runner
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/copilotkit-agent-runner)
|
|
4
|
+
[](https://opensource.org/licenses/MIT)
|
|
5
|
+
[](https://www.typescriptlang.org/)
|
|
6
|
+
|
|
7
|
+
**Open-source LangGraph thread history persistence for CopilotKit.** Restore chat history on page refresh with your own LangGraph deployment.
|
|
8
|
+
|
|
9
|
+
## The Problem
|
|
10
|
+
|
|
11
|
+
Building a chat app with [CopilotKit](https://copilotkit.ai) and [LangGraph](https://langchain-ai.github.io/langgraph/)? You've probably noticed:
|
|
12
|
+
|
|
13
|
+
- **Page refresh = empty chat** - All messages disappear
|
|
14
|
+
- **Thread switching loses context** - No automatic history restoration
|
|
15
|
+
- **No persistence of agent state** - Users lose context
|
|
16
|
+
|
|
17
|
+
CopilotKit's default runtime doesn't automatically fetch historical messages from LangGraph's checkpoint system. This package adds that capability.
|
|
18
|
+
|
|
19
|
+
## The Solution
|
|
20
|
+
|
|
21
|
+
**With this package:**
|
|
22
|
+
- Chat history restored on page load
|
|
23
|
+
- Seamless thread switching
|
|
24
|
+
- Agent state preserved
|
|
25
|
+
- Works with any LangGraph deployment (LangGraph Cloud, self-hosted)
|
|
26
|
+
- MIT licensed, open-source
|
|
27
|
+
|
|
28
|
+
## Installation
|
|
29
|
+
|
|
30
|
+
Step 1: Set these environment variables:
|
|
31
|
+
|
|
32
|
+
```env
|
|
33
|
+
# Required
|
|
34
|
+
LANGGRAPH_DEPLOYMENT_URL=https://your-deployment.langchain.com
|
|
35
|
+
|
|
36
|
+
# Optional (for authentication)
|
|
37
|
+
LANGSMITH_API_KEY=your-api-key
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Step 2:
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install
|
|
44
|
+
npm run dev
|
|
45
|
+
|
|
46
|
+
cd examples/nextjs-copilotkit
|
|
47
|
+
npm install
|
|
48
|
+
npm run dev
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
The app should be running on localhost:3000
|
|
52
|
+
|
|
53
|
+
## Contributing
|
|
54
|
+
|
|
55
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
56
|
+
|
|
57
|
+
1. Fork the repository
|
|
58
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
59
|
+
3. Commit your changes (`git commit -m 'Add amazing feature'`)
|
|
60
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
61
|
+
5. Open a Pull Request
|
|
62
|
+
|
|
63
|
+
## License
|
|
64
|
+
|
|
65
|
+
MIT License - see [LICENSE](LICENSE) for details.
|
|
66
|
+
|
|
67
|
+
## Credits
|
|
68
|
+
|
|
69
|
+
Created by [Elisha Kramer](https://github.com/ElishaKay).
|
|
70
|
+
|
|
71
|
+
Inspired by the need for thread history persistence in CopilotKit + LangGraph applications.
|