Files
Martha Schumann 981734fb99 fix: propagate useCopilotReadable context and CopilotKit properties into Python LangGraph agent state
Two silent failures in the Python SDK prevented frontend context from reaching the agent:

1. langgraph_default_merge_state rebuilt copilotkit as {actions} only, dropping the
   useCopilotReadable items the TypeScript runtime had placed in state.copilotkit.context.
2. CopilotKitContext.properties were never forwarded through execute_agent → agent.execute(),
   so <CopilotKit properties={...} /> values never reached state.copilotkit.properties.

Both fields now land cleanly under state["copilotkit"] on every agent invocation.
Also adds tests, a showcase example, and a new docs page.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-15 18:37:51 -07:00
..
2025-02-28 12:21:54 +01:00

CopilotKit Python SDK

PyPI version License: MIT

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