#Summarise — examples
End-to-end requests and an example response for each operation variant. For the request body shape and response field reference, see Summarise overview.
#Free-form text
#Ticket (structured)
curl -X POST https://aiengine.velgent.com/api/v1/summarise \
-H "Authorization: Bearer $VELGENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "summarise_ticket",
"variables": {
"short_description": "Cannot export Q1 invoices to CSV",
"description": "When I click Export the page just spins.",
"comments": ["[agent] Try Chrome?", "[customer] Same issue."],
"priority": "3 - Moderate",
"state": "In Progress"
},
"format": "bullets"
}'
#Knowledge article (focus is the user's question)
curl -X POST https://aiengine.velgent.com/api/v1/summarise \
-H "Authorization: Bearer $VELGENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "summarise_knowledge_article",
"variables": {
"text": "# Rotating database credentials\n\nWe rotate primary Postgres credentials every 90 days..."
},
"focus": "How often do we rotate the primary database password?",
"audience": "engineer"
}'
#Example response
{
"request_id": "01HZQ7K8YV9X3R2M5N6P7QABCD",
"summary": "- Acme renewal call is Thursday at 2pm.\n- Legal flagged a data-residency clause to resolve beforehand.",
"intent": {
"action_needed": true,
"action_line": "Resolve the data-residency clause before Thursday's renewal call.",
"due_date": "2026-05-21",
"urgency_score": 8,
"sensitivity": "high"
},
"intent_extra": null,
"format": "bullets",
"model_used": "claude-sonnet-4-6",
"redaction_count": 0,
"latency_ms": 4123
}
#Timeline
Set include_timeline: true and pass the ticket's activity records as
events. The response carries a chronological timeline plus derived
phases with durations. See Timeline
for the field reference.
curl -X POST https://aiengine.velgent.com/api/v1/summarise \
-H "Authorization: Bearer $VELGENT_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"operation": "summarise_ticket",
"variables": {
"short_description": "VPN drops every 5 minutes",
"description": "Stable in the morning, then disconnects start around lunchtime."
},
"include_timeline": true,
"events": [
{"event_id":"e1","occurred_at":"2026-05-20T09:00:00Z","actor":"alice@acme.com",
"actor_role":"requester","kind":"comment",
"payload":{"body":"VPN keeps dropping every 5 minutes"}},
{"event_id":"e2","occurred_at":"2026-05-20T09:15:00Z","actor":"system",
"actor_role":"system","kind":"assignment",
"payload":{"assigned_to":"bob"}},
{"event_id":"e3","occurred_at":"2026-05-20T09:32:00Z","actor":"bob",
"actor_role":"agent","kind":"work_note",
"payload":{"body":"Checked logs, seeing handshake timeout"}},
{"event_id":"e4","occurred_at":"2026-05-20T11:48:00Z","actor":"bob",
"actor_role":"agent","kind":"work_note",
"payload":{"body":"Firmware issue on the VPN concentrator; requesting maintenance window"}},
{"event_id":"e5","occurred_at":"2026-05-20T14:22:00Z","actor":"system",
"actor_role":"system","kind":"link",
"payload":{"linked":"CHG0099"}},
{"event_id":"e6","occurred_at":"2026-05-20T22:00:00Z","actor":"bob",
"actor_role":"agent","kind":"work_note",
"payload":{"body":"Maintenance complete; monitoring"}},
{"event_id":"e7","occurred_at":"2026-05-21T09:00:00Z","actor":"alice@acme.com",
"actor_role":"requester","kind":"comment",
"payload":{"body":"Stable since 22:00 last night"}},
{"event_id":"e8","occurred_at":"2026-05-21T09:15:00Z","actor":"bob",
"actor_role":"agent","kind":"state_change",
"payload":{"state":{"from":"in_progress","to":"resolved"}}}
]
}'
The response includes the normal summary + intent, plus a
timeline and phases block:
{
"request_id": "01HZQ7K8YV9X3R2M5N6P7QABCD",
"summary": "Alice reported repeated VPN drops; Bob diagnosed a firmware issue on the VPN concentrator, applied a maintenance window via CHG0099, and Alice confirmed stable connectivity before the ticket was resolved.",
"intent": {
"action_needed": false,
"action_line": null,
"due_date": null,
"urgency_score": 3,
"sensitivity": "low"
},
"timeline": [
{"event_ids":["e1"],"occurred_at":"2026-05-20T09:00:00Z","actor":"alice@acme.com","actor_role":"requester",
"phase":"reported","title":"Reported","one_line":"Alice reported VPN dropping every ~5 minutes.","importance":1.0},
{"event_ids":["e2"],"occurred_at":"2026-05-20T09:15:00Z","actor":"system","actor_role":"system",
"phase":"triaged","title":"Assigned","one_line":"Auto-routed to Bob.","importance":0.4},
{"event_ids":["e3"],"occurred_at":"2026-05-20T09:32:00Z","actor":"bob","actor_role":"agent",
"phase":"investigated","title":"Initial check","one_line":"Bob found handshake timeout in the VPN logs.","importance":0.7},
{"event_ids":["e4"],"occurred_at":"2026-05-20T11:48:00Z","actor":"bob","actor_role":"agent",
"phase":"diagnosed","title":"Root cause","one_line":"Firmware issue on the VPN concentrator identified.","importance":1.0},
{"event_ids":["e5"],"occurred_at":"2026-05-20T14:22:00Z","actor":"system","actor_role":"system",
"phase":"diagnosed","title":"Change linked","one_line":"CHG0099 attached for the fix.","importance":0.6},
{"event_ids":["e6"],"occurred_at":"2026-05-20T22:00:00Z","actor":"bob","actor_role":"agent",
"phase":"remediated","title":"Maintenance applied","one_line":"Maintenance window complete; monitoring.","importance":0.9},
{"event_ids":["e7"],"occurred_at":"2026-05-21T09:00:00Z","actor":"alice@acme.com","actor_role":"requester",
"phase":"validated","title":"User confirmed","one_line":"Alice confirmed the connection had been stable since 22:00.","importance":0.9},
{"event_ids":["e8"],"occurred_at":"2026-05-21T09:15:00Z","actor":"bob","actor_role":"agent",
"phase":"resolved","title":"Resolved","one_line":"Bob marked the ticket resolved with a permanent fix.","importance":1.0}
],
"phases": [
{"name":"reported", "started_at":"2026-05-20T09:00:00Z","ended_at":"2026-05-20T09:15:00Z","duration_seconds":900, "event_ids":["e1"]},
{"name":"triaged", "started_at":"2026-05-20T09:15:00Z","ended_at":"2026-05-20T09:32:00Z","duration_seconds":1020, "event_ids":["e2"]},
{"name":"investigated","started_at":"2026-05-20T09:32:00Z","ended_at":"2026-05-20T11:48:00Z","duration_seconds":8160, "event_ids":["e3"]},
{"name":"diagnosed", "started_at":"2026-05-20T11:48:00Z","ended_at":"2026-05-20T22:00:00Z","duration_seconds":36720, "event_ids":["e4","e5"]},
{"name":"remediated", "started_at":"2026-05-20T22:00:00Z","ended_at":"2026-05-21T09:00:00Z","duration_seconds":39600, "event_ids":["e6"]},
{"name":"validated", "started_at":"2026-05-21T09:00:00Z","ended_at":"2026-05-21T09:15:00Z","duration_seconds":900, "event_ids":["e7"]},
{"name":"resolved", "started_at":"2026-05-21T09:15:00Z","ended_at":null, "duration_seconds":null, "event_ids":["e8"]}
],
"format": "text",
"model_used": "claude-sonnet-4-6",
"redaction_count": 0,
"latency_ms": 6240
}
If you omit events and rely on the free-text fallback, the response
still has a populated timeline, but event_ids will be synth:1,
synth:2, … and your tenant's audit log will carry a
timeline.synthesised event so you can tell the two modes apart.
#Example with custom intent fields
When the prompt version declares custom intent fields (see
Custom intent fields),
intent_extra carries them alongside the five built-ins.
Suppose your summarise_incident prompt declares:
{
"is_outage_related": { "type": "boolean", "description": "Customer-facing outage?" },
"severity_class": { "type": "enum", "values": ["P1","P2","P3","P4"], "description": "ITSM severity" },
"affected_service": { "type": "string", "nullable": true, "description": "Service name if known" }
}
A call against an incident ticket returns:
{
"request_id": "01HZQ7K8YV9X3R2M5N6P7QABCD",
"summary": "Payment service returning 500 errors since 10:15am; ~5% of transactions failing.",
"intent": {
"action_needed": true,
"action_line": "Page on-call SRE for the payment service.",
"due_date": null,
"urgency_score": 9,
"sensitivity": "medium"
},
"intent_extra": {
"is_outage_related": true,
"severity_class": "P1",
"affected_service": "payment-svc"
},
"format": "bullets",
"model_used": "claude-sonnet-4-6",
"redaction_count": 0,
"latency_ms": 3892
}
These extra fields are typed and validated server-side — the caller can route directly on them without re-parsing the summary text.
Back to: Summarise overview →