frames

Frames carrying OpenClaw Gateway traffic through a pipeline.

The command frames mirror the Gateway’s three methods, and the run frames mirror what its chat event stream reports. OpenClawGatewayService is what translates between them and the socket.

class pipecat.services.openclaw.frames.OpenClawSendFrame(message: str, session_key: str | None = None)[source]

Bases: DataFrame

Frame that starts a run.

Parameters:
  • message – What to send the agent, verbatim.

  • session_key – Which OpenClaw session to run in. None uses the client’s.

session_key: str | None = None
class pipecat.services.openclaw.frames.OpenClawSteerFrame(message: str)[source]

Bases: DataFrame

Frame that redirects the run in flight onto a follow-up.

The Gateway aborts the running turn and starts a replacement carrying the follow-up. Output keeps arriving on the run that is already streaming.

Parameters:

message – The follow-up, verbatim.

class pipecat.services.openclaw.frames.OpenClawAbortFrame(reason: str | None = None)[source]

Bases: SystemFrame

Frame that stops the run in flight.

A system frame, so it reaches the Gateway rather than queueing behind the output it is meant to stop.

Parameters:

reason – Logged, for working out later why something was aborted.

reason: str | None = None
class pipecat.services.openclaw.frames.OpenClawStartedFrame(run_id: str)[source]

Bases: ControlFrame

Frame indicating the Gateway accepted a run.

Followed by zero or more OpenClawTextFrame and exactly one OpenClawEndFrame.

Parameters:

run_id – The id the run is addressed by.

class pipecat.services.openclaw.frames.OpenClawTextFrame(text: str, run_id: str)[source]

Bases: DataFrame

Frame containing a chunk of a run’s answer.

Parameters:
  • text – The chunk, as the agent produced it.

  • run_id – The run that produced it.

class pipecat.services.openclaw.frames.OpenClawEndFrame(run_id: str, status: Literal['completed', 'cancelled', 'failed'] = 'completed', text: str = '')[source]

Bases: ControlFrame

Frame indicating a run ended, and how.

Carries the whole answer, so a consumer that wants only that can ignore every OpenClawTextFrame and stay stateless. A run that ends without one leaves the text empty, and the frames that came before it are what the agent managed to say.

Parameters:
  • run_id – The run that ended.

  • status – Whether it answered, was stopped, or failed.

  • text – The agent’s answer, or why there isn’t one.

status: Literal['completed', 'cancelled', 'failed'] = 'completed'
text: str = ''