mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
7b7e5cc510
Add two request-scoped regressions for #6676 beyond the unit tests: - test_replayed_cancelled_turn_strips_orphan_function_call_blocks: the poisoned-checkpoint shape (run cancelled mid-turn, function_call blocks persisted with no ToolMessages and no intercept state) driven through wrap_model_call/awrap_model_call — the model must receive a history with no orphaned blocks and no unanswered tool_calls, which is what keeps langchain-openai from re-emitting them as Responses input items without a matching function_call_output. - test_next_model_call_keeps_answered_function_call_blocks_on_restore: the legitimate resume path — restored frontend call with its synthetic result plus the answered backend call keep their function_call blocks, proving the sanitizer does not over-strip the orphan-handoff contract.
CopilotKit Python SDK
The official Python SDK for CopilotKit - build AI copilots and agents into your applications.
Features
- 🚀 Easy integration with LangGraph and LangChain
- 🔄 Built-in support for stateful conversations
- 🛠 Extensible agent framework
- 🔌 FastAPI-ready endpoints
- 🤝 Optional CrewAI integration
Installation
pip install copilotkit
With CrewAI support:
pip install "copilotkit[crewai]"
Quick Start
from copilotkit import Copilot
# Initialize a copilot
copilot = Copilot()
# Add your tools and configure the copilot
copilot.add_tool(my_custom_tool)
# Run the copilot
response = copilot.run("Your task description here")
Documentation
For detailed documentation and examples, visit copilotkit.ai
Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Support
Built with ❤️ by the CopilotKit team