livekit/python-sdks — reverse-engineered prompt

Reverse engineered prompt

GitHub

Build me a Python SDK for LiveKit that lets developers add real time video, audio, and data features to their apps without a lot of setup.

I want it to support connecting to a LiveKit Cloud or self hosted server as a participant, joining rooms with access tokens, reacting when people join, subscribing to audio and video tracks, receiving video frames, and publishing microphone audio. It should also include simple server tools for creating and listing rooms, generating JWT access tokens from environment variables, and reaching the main LiveKit services like rooms, egress, ingress, SIP, agent dispatch, and connectors.

Please include examples that show the common flows clearly, like creating a token, creating a room, connecting to a room, handling events, doing an RPC call between participants, and using local microphone and speaker devices. Make it feel clean and Pythonic, use async where it makes sense, and add enough tests and docs so someone can install it and try it quickly. Look up current LiveKit docs online if you need to.

Want more depth? Deep Reverse