Output formats

Commands that return structured API data support four output formats.

FormatFor
jsonagents, scripts, and piping into jq (default)
tablereading
yamlpiping into anything that reads YAML
textshell loops — tab-separated, no header, no colour

Select one per command, save it to the profile, or set it in the environment:

agentserve tables get tbl_9f3c1a05d4b7426e8c2f0917ab35de64 --output table
agentserve configure --set-output table
AGENT_SERVE_OUTPUT=yaml agentserve logs list > logs.yaml

--output works before or after the command.

What each format emits

json and yaml emit the API's raw values, not the table's formatting — a duration stays 1500, not "1.5s".

Paginated lists include the rows under data and the continuation cursor under nextCursor. A null cursor means no pages remain:

{ "data": [{ "runId": "9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543" }], "nextCursor": null }

Read list rows with jq '.data[]' and check for more pages with jq '.nextCursor'.

table formats for reading: timestamps without milliseconds, sizes as 4.2 MB, booleans as yes/no, costs as $0.0142. Long cells are clipped to keep rows on one line; switch to json for the full value.

text uses the rendered cells, tab-separated, with no header or colour:

AGENT_SERVE_OUTPUT=text agentserve files list | while IFS=$'\t' read -r id name folder size type uploader uploaded; do
  echo "$id $name"
done

An absent value is an em-dash in table and an empty field in text.

Reading a run in detail

agentserve logs get prints a concise summary. Add --trace for the recursive trace with span inputs, outputs, errors, timing, and cost:

agentserve logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --trace

json and yaml always carry the complete response, so --trace is a no-op there:

agentserve logs get 9c4f0b7e-2d81-4a35-b6e9-70f1c8a2d543 --output json | jq '.traceSpans'

Exceptions

agentserve profiles and agentserve configure print local configuration for humans. agentserve files get writes the file’s raw content to stdout or --output-file.

agentserve chat streams reply text in table and text modes. In json or yaml mode it waits for the finished result and includes the conversation ID.

agentserve workflows export always emits raw JSON, or YAML when the profile says so, so that it round-trips through import:

agentserve workflows export 3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8 > wf.json
agentserve workflows import --workflow @wf.json