Skip to content
Streamkap
Esc
↑↓navigate↵open⌘Jpreview

Get Agent Logs

Tailed [AGENT]-prefixed Flink TM logs + recent job exceptions.

The write:agents gate is intentional: agent log lines may contain customer payloads that flowed through prompts and tool args. Tightening the audit surface here mirrors how the Streamkap MCP project key blob is gated.

Per-line scoping is namespace-wide for now - when multiple agents share a TaskManager, lines from other agents may appear. Documented limitation until the Java runtime emits per-line agent IDs.

since is an optional ISO 8601 cutoff for incremental polling on the unified observability surface. The underlying tail window is Nx4 the requested tail count; if since is far enough back that the window doesn’t reach it, the response is still bounded by tail (the caller can widen tail to compensate).

GET/agents/{job_id}/logs
Authorization
AuthorizationBearer token · headerrequired
Path parameters
job_idstringrequired
Query parameters
tailinteger
default: 100
levelstring
default: "INFO"
searchstring
sincestring
Responses
200

Successful Response

linesAgentLogLine[]
Show properties
Array of AgentLogLine
timestampstring | null

Line timestamp as emitted by the Flink logger

Show properties
Any of:
string
string
null
null
levelstring

Log level — DEBUG, INFO, WARN, ERROR

default: "INFO"
messagestringrequired

Log message body

flinkExceptionsAgentFlinkException[]
Show properties
Array of AgentFlinkException
timestampstring | null

ISO8601 timestamp (Flink millis-since-epoch normalised)

Show properties
Any of:
string
string
null
null
exceptionstringrequired

Stack trace or exception text

taskstring | null

Flink task name when available

Show properties
Any of:
string
string
null
null
scopestring

Per-line scoping of returned lines. namespace means lines may include [AGENT] entries from other agents sharing a TaskManager (current limitation). agent will be returned once the Java runtime emits per-line agent IDs.

default: "namespace"
Allowed:namespaceagent
422

Validation Error

detailValidationError[]
Show properties
Array of ValidationError
locstring | integer[]required
Show properties
Array of string | integer
Any of:
string
string
integer
integer
msgstringrequired
typestringrequired
inputany
ctxobject
Request
curl -X GET 'https://api.streamkap.com/agents/string/logs' \
  -H 'Authorization: Bearer YOUR_TOKEN'
Response
{
  "lines": [
    {
      "timestamp": "string",
      "level": "INFO",
      "message": "string"
    }
  ],
  "flinkExceptions": [
    {
      "timestamp": "string",
      "exception": "string",
      "task": "string"
    }
  ],
  "scope": "namespace"
}