Skip to content

Summarize activity

Settings module

POST/aurora/summarizeaurora.summarize

Summarizes a record's activity, a project's week or gate readiness, citing the items each point comes from. Requires `Idempotency-Key`; a replay returns the original response. A rule that refuses the request returns 422 with `refusal` and `reason`.

  • Requires the capability home.dashboard.read.
  • OAuth scopes: home.
  • Send an Idempotency-Key header. A replay with the same key returns the original response.
  • Error statuses: 400, 401, 409, 422, 429. Errors are RFC 9457 problem details.

Request body: AuroraSummarizeRequest

aurora.summarize: AuroraSummarizeRequest
FieldTypeRequiredDescription
kind"record_activity" | "project_week" | "gate_readiness"YesWhat to summarize.
subject_collectionstringYesCollection of the record or project summarized.Constraints: pattern ^[a-z][a-z0-9-]*$
subject_idstring (uuid)YesIdentifier of the record or project summarized.
itemsarray of objectYesActivity and records to summarize, read with the caller's permissions.
{
  "kind": "project_week",
  "subject_collection": "projects",
  "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "items": [
    {
      "collection": "activity-events",
      "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
    }
  ]
}

Response 200: AuroraResult

aurora.summarize: AuroraResult
FieldTypeRequiredDescription
outcome"answer" | "no_answer" | "failed"Yesanswer, no_answer (the data does not support an answer; `missing` says why) or failed (the model call failed and was logged).
ai_generatedtrueYesAlways true: the content is AI-generated and is labeled so (EU AI Act Article 50).
request_idstring (uuid) | nullYesIdentifier of the logged AI request; null when no model was called.
modelstring | nullYesModel that answered.Constraints: length 1 to 100
missingstring | nullYesWhat the data lacks, for no_answer.Constraints: length 1 to 500
failure_codestring | nullYesWhy the request failed.Constraints: length 1 to 64
answerobjectNoThe feature's answer for outcome answer, shaped per operation; null otherwise.
suggestionsarray of AuroraProposalYesChanges stored for confirmation.
{
  "outcome": "answer",
  "ai_generated": true,
  "request_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
  "model": "claude-sonnet-5-5",
  "missing": "No budget lines exist yet.",
  "failure_code": "model_error",
  "answer": {
    "text": "One permit is blocked: Fire Marshal Permit.",
    "citations": []
  },
  "suggestions": [
    {
      "suggestion_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
      "operation_id": "savedViews.create",
      "summary": "Save the view Blocked Miami Permits."
    }
  ]
}

Code samples

curl -X POST "$XOS_BASE_URL/aurora/summarize" \
  -H "Authorization: Bearer $XOS_API_KEY" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{"kind":"project_week","subject_collection":"projects","subject_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","items":[{"collection":"activity-events","id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]}'
const { data } = await xos.aurora.summarize({
    "kind": "project_week",
    "subject_collection": "projects",
    "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f",
    "items": [
      {
        "collection": "activity-events",
        "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"
      }
    ]
  });
response = xos.aurora.summarize({"kind": "project_week", "subject_collection": "projects", "subject_id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f", "items": [{"collection": "activity-events", "id": "0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]})
xos aurora summarize --data '{"kind":"project_week","subject_collection":"projects","subject_id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f","items":[{"collection":"activity-events","id":"0192f1e2-7c3a-7b4d-9e8f-1a2b3c4d5e6f"}]}'