Skip to main content

Reference Python SDK for Cortex Capsule Protocol (CCP)

Project description

CCP

Cortex Capsule Protocol (CCP) — v0.1 Draft

CCP standardizes communication between devices (robots, microcontrollers, gateways) and Cortex Capsule servers (local or cloud brain runtime).

Contents

  • Core specification
  • HTTP mapping
  • JSON schemas
  • Message examples

Structure

Get started

  1. Read the core spec: docs/spec/ccp-core.md
  2. Check HTTP mapping: docs/spec/http-binding.md
  3. See schemas: docs/spec/message-schemas.md
  4. See examples: examples/

How to use CCP

  • This repo is the specification, not a dependency to install.
  • Projects should depend on a CCP SDK (language/runtime specific) that implements the protocol.
  • If you need JSON schemas in production, the SDK should bundle them or reference a published schema package.

Python SDK (reference)

This repository now includes a minimal reference Python SDK that you can install with pip.

Install (local dev)

From the repo root:

python -m pip install -e .

Install (from PyPI)

After you publish it:

python -m pip install ccp-sdk

Usage

See a runnable example in examples/python_client.py.

If your ESP32 sends data to a Python gateway API, see: examples/esp32_gateway_api/.

ESP32 note

ESP32 (Arduino/ESP-IDF) does not run pip packages directly.

Typical architecture:

  • ESP32 handles hardware (mic/speaker/LED/display) and sends events/audio to a gateway over Wi-Fi/serial.
  • The gateway (Raspberry Pi / PC) runs the Python CCP SDK and talks to the CCP server over HTTP.

Practical mapping:

  • Mic (I2S) -> capture audio -> upload to /v1/media/audio -> send turn with audio_ref
  • Speaker (I2S) <- receive turn_result.payload.reply.audio_ref -> download audio -> play
  • LED strip / display <- drive UI based on turn_result.payload.state, safety, or actions

SDKs (planned)

  • ccp-python — reference SDK for capsules/gateways
  • ccp-esp32 — thin device SDK for microcontrollers

Version

CCP v0.1 (Draft)

Roadmap

See docs/roadmap.md.

Community

Discord: invite link TBD.

Contributing

See CONTRIBUTING.md for how to propose changes and submit PRs.

Code of Conduct

See CODE_OF_CONDUCT.md.

Security

See SECURITY.md.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccp_sdk-0.1.0.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccp_sdk-0.1.0-py3-none-any.whl (13.9 kB view details)

Uploaded Python 3

File details

Details for the file ccp_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: ccp_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for ccp_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 96e27acb35360ca2857035179c9ff722d0ef121069934dd2122097fdc356fb8b
MD5 57b3a560624073f6398994c8ecd8ca90
BLAKE2b-256 2f8ae333911747b295b1ba940a60f7bbb61a64b26f43bc754b2c5560ef7d0c7e

See more details on using hashes here.

File details

Details for the file ccp_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: ccp_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.13

File hashes

Hashes for ccp_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 273b9262ff715d467d08f7fd3544a08ef067196779443611e2225f18de3e1993
MD5 aa2f4716fbab163d92519b7ebbee2b90
BLAKE2b-256 64d000a6995d2e1633110ae4bfdaef5afcd7ccdb3b4f295384129a30b1aecfda

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page