CYCLS_API_KEY set.
Find one failed request
When an agent run fails with an unhandled exception, the user sees a short reference and the full detail goes to structured logs.
Errors the loop handles itself, such as a rate limit retry, a compaction failure
or a tool timeout, appear to the user as callouts and are not logged as errors.
They are handled behavior, not failures.
Tail and filter
-q passes a structured filter to the log backend and is reapplied on every
poll, so it composes with -f.
Aggregate model spend
Each model turn emits alevel=usage record. cycls cost aggregates it.
Costs are zero unless the agent sets token prices:
GET /chats,
so a sidebar can show spend without rereading turns.
SQL over logs and billing
--format table|json|csv to force one. An empty result prints (0 rows) to
stderr and exits 0.
Two tables are available, scoped automatically to the deployments your API key
owns.
logs
json_payload records by level:
billing
Example queries
cycls sql call after a deployment is created can take
5 to 10 seconds while the backend sets up. A per-query scanned-bytes cap applies,
so add LIMIT or narrower predicates on wide scans. SQL engine errors are
surfaced verbatim.
Emit your own records
user and chat_id attach attribution, and any
other keyword becomes a field in json_payload, queryable with -q and sql.
Next
CLI reference
Every command and flag.