Agent Sessions
Stream console logs for a hosted agent session
Streams console logs (stdout / stderr) for a specific hosted agent session as a Server-Sent Events (SSE) stream.
Each SSE frame contains:
event: always"log"data: a plain-text log line (currently JSON-formatted, but the schema is not contractual and may include additional keys or change format over time — clients should treat it as an opaque string)
Example SSE frames:
event: log
data: {"timestamp":"2026-03-10T09:33:17.121Z","stream":"stdout","message":"Starting FoundryCBAgent server on port 8088"}
event: log
data: {"timestamp":"2026-03-10T09:33:17.130Z","stream":"stderr","message":"INFO: Application startup complete."}
event: log
data: {"timestamp":"2026-03-10T09:34:52.714Z","stream":"status","message":"Successfully connected to container"}
event: log
data: {"timestamp":"2026-03-10T09:35:52.714Z","stream":"status","message":"No logs since last 60 seconds"}
The stream remains open until the client disconnects or the server terminates the connection. Clients should handle reconnection as needed.
Parameter jalur
agent_name
string
diperlukan
The name of the hosted agent.
agent_version
string
diperlukan
The version of the agent.
session_id
string
diperlukan
The session ID (maps to an ADC sandbox).
Parameter kueri
api-version
string
diperlukan
The API version to use for this operation.
Respons
The request has succeeded.
Isi
event
string | enum
diperlukan
Known SSE event types emitted by the hosted agent session log stream. Additional event types may be introduced in future versions.
enum
data
string
diperlukan
The event payload as plain text. Currently JSON-formatted but the schema is not contractual and may change.
Minta
GET /agents/{agent_name}/versions/{agent_version}/sessions/{session_id}:logstream HTTP/1.1
Tanggapan
Status: 200
Content-Type: text/event-stream
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json