Skip to content

Add helper for large application payloads over data packets and byte streams #6906

Description

@SarthakShrivastav-a

Problem

Agent applications often need to send application payloads that are larger than the practical size for a data packet. LiveKit already provides the underlying primitives: data packets for small control messages and byte streams for larger ordered byte payloads. In practice, developers need to manually combine those primitives and add their own descriptor, size checks, and checksum validation.

Proposed scope

Add a small helper in the Python Agents utilities that:

  • publishes small payloads inline as a compact descriptor on a data topic
  • falls back to stream_bytes for larger payloads
  • includes generic descriptor metadata such as payload id, content type, size, checksum, stream topic, and stream name
  • provides receiver-side helpers to parse descriptors and validate streamed bytes
  • includes unit tests and a generic example

Why this belongs in Agents

This is not a server/protocol change. The server already transports data packets and byte streams. The missing piece is SDK ergonomics for agent authors who want a safe default pattern without rewriting this glue in each application.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions