Collapse a log into error signatures with counts and first/last occurrence
Groups the records of a log or CI output by signature: timestamps, UUIDs, IPs, hex ids, quoted values and numbers are replaced by placeholders, stack-trace continuation lines are attached to their record and contribute their first frames, and each signature reports its count, severity, first and last line, first and last timestamp (as written, when the line starts with an ISO 8601 timestamp) and an example. Lets an agent read 5,000 lines as 20 signatures. Does not diagnose causes, parse non-ISO timestamps or understand structured (JSON) logs beyond treating each line as text.
What you get
Cuts a log to its distinct failures before it goes into context. 8,000 lines per $0.005 call.
Call it
Send the JSON body below to https://agents.writerslogic.com/api/v1/log-collapse. An unpaid request answers 402 with the price and how to pay; a request that fails with a 5xx status is not charged.
curl -i -X POST https://agents.writerslogic.com/api/v1/log-collapse \
-H 'content-type: application/json' \
-d '{"text":"2026-11-04T10:00:01Z ERROR db timeout after 3000 ms for user 17\n2026-11-04T10:00:02Z INFO ok\n2026-11-04T10:00:09Z ERROR db timeout after 3001 ms for user 92\n at Pool.query (db.js:41:9)\n2026-11-04T10:00:10Z ERROR db timeout after 2999 ms for user 5\n","topN":5}'
Input
| Field | Type | Required | Description |
|---|---|---|---|
text | string; length 1..300000 | yes | Log text, at most 8000 lines. |
topN | integer; 1..100 | no | Signatures returned, by count. Default 20. |
signatureFrames | integer; 0..10 | no | Continuation lines (stack frames) that are part of the signature. Default 3. |
minSeverity | string; one of "fatal", "error", "warn", "info", "debug", "trace", "unknown" | no | Ignore records below this severity. Default: keep all. |
Example request body
{
"text": "2026-11-04T10:00:01Z ERROR db timeout after 3000 ms for user 17\n2026-11-04T10:00:02Z INFO ok\n2026-11-04T10:00:09Z ERROR db timeout after 3001 ms for user 92\n at Pool.query (db.js:41:9)\n2026-11-04T10:00:10Z ERROR db timeout after 2999 ms for user 5\n",
"topN": 5
}
Result
The response is { "data": ..., "_provenance": ... }. data carries these fields; _provenance is a signed W3C Verifiable Credential with a C2PA-style manifest, checked free at POST /api/v1/verify-provenance.
| Field | Type | Required | Description |
|---|---|---|---|
status | string; one of "pass", "fail", "unknown", "unsupported" | no | pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass. |
signatures | array<object>; max 100 items | no | |
totals | object | no | |
witnesses | array<object> | no | |
versions | object | no | Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile). |
limits | array<string> | no | |
deterministic | boolean | no | Always true: pure code, no model. |
Pay and connect
Available through: x402 (USDC on Base), MCP. MCP clients reach it through the context-evidence-kit package.
Machine-readable
- This agent as JSON (schemas, example, OpenAPI operation)
- Free signed sample response
- OpenAPI 3.1 · Catalog · Index of every agent