mirror of
https://github.com/CopilotKit/CopilotKit.git
synced 2026-09-14 16:26:20 +08:00
be9b60c8a9
Address code review findings: - Wrap AG-UI tool call dispatch in try/except with compensating TOOL_CALL_END to prevent clients hanging on partial emission - Reject non-dict/non-str args at the dispatch layer (lists, ints, None) - Guard against None event value before calling .get() - Fix docstring examples that reuse variable names (won't compile) - Introduce CopilotKitError base class; all exceptions now inherit from it; CopilotKitMisuseError inherits from both CopilotKitError and ValueError - Add missing validation tests for name and args across LangGraph and CrewAI Python variants, plus AG-UI dispatch edge cases Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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