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.
Parametry cesty
agent_name
string
vyžadováno
The name of the hosted agent.
agent_version
string
vyžadováno
The version of the agent.
session_id
string
vyžadováno
The session ID (maps to an ADC sandbox).
Parametry dotazů
api-version
string
vyžadováno
The API version to use for this operation.
Odpovědi
The request has succeeded.
Text
event
string | enum
vyžadováno
Known SSE event types emitted by the hosted agent session log stream. Additional event types may be introduced in future versions.
enum
data
string
vyžadováno
The event payload as plain text. Currently JSON-formatted but the schema is not contractual and may change.
Žádost
GET /agents/{agent_name}/versions/{agent_version}/sessions/{session_id}:logstream HTTP/1.1
Response
Status: 200
Content-Type: text/event-stream
Status: 4XX
Content-Type: application/json
Status: 5XX
Content-Type: application/json