Files
copilotkit__copilotkit/sdk-python/README.md
2026-07-22 08:55:37 -07:00

2.9 KiB

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
  • 🧠 Verified sync and async Intelligence skill registry clients

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")

Intelligence skill registry

Fetch and atomically cache the current verified skill set for a learning container:

from copilotkit import CopilotKitIntelligence

intelligence = CopilotKitIntelligence(
    api_key="...",
    project_namespace="my-project",
)
skill_set = intelligence.skills.get("55555555-5555-4555-8555-555555555555")
for skill in skill_set.skills:
    print(skill.skill_id, skill.path)

For framework integrations, skill_set.skill_descriptors provides an ordered, immutable projection of each installed skill's identity, display metadata, verified directory, and artifact manifest. Its frozen descriptor records include the manifest SHA-256 plus every file's path, role, media type, byte length, and raw SHA-256. The client exposes these descriptors only after projection identity, manifest, bundle, per-file digest and size, and atomic install verification all succeed.

Use AsyncCopilotKitIntelligence and await intelligence.skills.get(...) in an async application. get() always contacts the registry and never silently falls back after an outage. To explicitly use a fully verified local copy, call get_cached() (or await it on the async client); its result has freshness == "cached". Learning container IDs must be canonical UUIDs. Registry requests use the canonical /v1/learning-containers/{id}/skills endpoint.

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