Skip to content

Real-time Streaming

CodeTether provides real-time streaming of agent output via Server-Sent Events (SSE).

Connecting

const events = new EventSource('/v1/agent/codebases/{id}/events');

events.onmessage = (e) => {
  console.log(JSON.parse(e.data));
};

Event Types

  • output - Agent text output
  • tool_use - Tool invocation
  • file_change - File modifications
  • complete - Task completed
  • error - Error occurred

See SSE Events for details.