Install & Compatibility
Where this runs
tested against v1.1.25 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 21.2MB
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 2.0s · import 0.000s · 22MB
19MB installed
● package 19MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
ParticipantInfo
✓ from livekit.protocol import ParticipantInfo
✗ from livekit import ParticipantInfo
This quickstart demonstrates how to import and instantiate a basic protobuf message, `ParticipantInfo`, from the `livekit-protocol` library. This library is primarily for defining the structure of messages used in LiveKit's real-time communication, and direct interaction is typically for advanced use cases or internal SDK development.
from livekit.protocol import livekit_models as models
# Create a ParticipantInfo message
participant_info = models.ParticipantInfo(
sid="PA_12345",
identity="test-user",
name="Test User",
state=models.ParticipantInfo.State.JOINED,
metadata="{}"
)
print(f"Participant SID: {participant_info.sid}")
print(f"Participant Identity: {participant_info.identity}")
print(f"Participant State: {participant_info.state}")
# You can also serialize/deserialize these messages
serialized_data = participant_info.SerializeToString()
# To deserialize (e.g., from a network stream)
new_participant_info = models.ParticipantInfo()
new_participant_info.ParseFromString(serialized_data)
print(f"Deserialized Participant Identity: {new_participant_info.identity}")
Debug
Known issues
gotchaThe `livekit-protocol` library is a low-level dependency. Most application developers should interact with LiveKit using higher-level libraries like `livekit-client` (for web/mobile client-like functionality) or `livekit-rtc` (for server-side room control) which abstract away the direct manipulation of these protocol messages.fixUnless you specifically need to handle raw LiveKit protocol messages (e.g., implementing a custom signalling server or proxy), prefer using `livekit-client` or `livekit-rtc`.
affects: All versions
breakingProtocol definitions can change between minor versions of `livekit-protocol`, especially when new features or data structures (e.g., new event types, added fields to existing messages) are introduced. Mismatched versions with other `livekit-*` libraries in your project can lead to serialization/deserialization errors or unexpected behavior.fixAlways ensure that `livekit-protocol` is kept in sync with the major and minor versions of other `livekit-client` or `livekit-rtc` libraries you are using. Refer to the LiveKit Python SDK changelogs for specific details on protocol changes before upgrading.
affects: All versions, particularly when upgrading minor versions across the LiveKit SDKs.
gotchaThis library contains generated code from `.proto` files. While the imports typically follow `from livekit.protocol import livekit_models`, the module names correspond directly to the original `.proto` file names (e.g., `livekit_models.proto` becomes `livekit_models.py`). Be mindful of this convention when importing specific message types.fixWhen looking for a specific message, consult the `livekit/protocol` directory in the source code to identify which `livekit_*.py` module it resides in, and import accordingly (e.g., `from livekit.protocol import livekit_models as models`).
affects: All versions
Upgrade
Version history
1.1.25latest on PyPI · released Aug 26, 2026
Audit
Dependencies
No dependency data recorded yet.