> ## Documentation Index
> Fetch the complete documentation index at: https://developers.agentx.so/llms.txt
> Use this file to discover all available pages before exploring further.

# Get Report

> Get the stored analysis report with statistics and low-scoring cases

Returns the report [Analyze Run](/api-reference/custom-eval/analyze-run) stored for this run:
the narrative analysis hoisted to the top level, plus the run's identifiers, the statistics
computed when the analysis ran, and the run's low-scoring cases. Requires an analysis to exist -
a run that was never analyzed returns `404`, so an empty report is never mistaken for a run
that scored nothing.

## Authentication

<ParamField header="x-api-key" type="string" required>
  Project API key.
</ParamField>

## Path Parameters

<ParamField path="runId" type="string" required>
  Run ID.
</ParamField>

## Response

Narrative analysis fields (top level, from the analysis body; absent when the analysis
failed):

| Field                  | Type   | Description                                                                                                                                                                                                                                   |
| ---------------------- | ------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `summary`              | string | A few sentences on how the agent performed overall                                                                                                                                                                                            |
| `consistencyScore`     | number | 0-10: how consistent responses were across similar inputs                                                                                                                                                                                     |
| `instructionAdherence` | object | `{ score (0-10), analysis, deviations[], rating }`                                                                                                                                                                                            |
| `responsePatterns`     | object | `{ similarities[], differences[], outliers[], rating }`                                                                                                                                                                                       |
| `reasoningAnalysis`    | object | `{ cotQuality, reasoningPatterns[], reasoningGaps[], rating }`                                                                                                                                                                                |
| `toolUsageAnalysis`    | object | `{ effectiveness, patterns[], issues[], rating }`                                                                                                                                                                                             |
| `recommendations`      | array  | `[{ category, priority, recommendation, reasoning }]` - `category` is one of `"instructions"`, `"tools"`, `"knowledge"`, `"reasoning"`, `"consistency"`, `"other"`; `priority` and every `rating` above are `"high"` \| `"medium"` \| `"low"` |
| `instructionChanges`   | array  | Always `[]` for external agents (the engine doesn't own the agent's instructions)                                                                                                                                                             |
| `overallAssessment`    | object | `{ strengths[], weaknesses[], rating }`                                                                                                                                                                                                       |

Run fields (always present):

<ResponseField name="runId" type="string">
  Run ID.
</ResponseField>

<ResponseField name="datasetId" type="string">
  Dataset the run scored against.
</ResponseField>

<ResponseField name="status" type="string">
  The stored analysis status: `"completed"` or `"failed"`.
</ResponseField>

<ResponseField name="statistics" type="object | null">
  Computed when the analysis ran:
  `{ numberOfRuns, averageRating, minRating, maxRating, ratingVariance }`, computed over rated
  rows with smoke-test variants excluded - the same population as
  [Get Run](/api-reference/custom-eval/get-run)'s `averageRating`, so the two agree.
</ResponseField>

<ResponseField name="lowScoringCases" type="array">
  Results with a rating of 5 or below (smoke-test variants excluded), derived fresh from the
  run's own rows: `[{ query, response, rating, justification }]`.
</ResponseField>

<Note>
  Similarity aggregates (cosine/Jaccard/BLEU/ROUGE) are per-result, not report-level - read
  them from [Get Run](/api-reference/custom-eval/get-run)'s `results` rows. `strengths`,
  `weaknesses`, and the overall rating live under `overallAssessment`, not at the top level.
</Note>

## Errors

| Status | Body                                                                              | Meaning                               |
| ------ | --------------------------------------------------------------------------------- | ------------------------------------- |
| `404`  | `{ "error": "Run not found" }`                                                    | No run with this id in the project    |
| `404`  | `{ "error": "No analysis found for this run. POST /runs/:runId/analyze first." }` | The run exists but was never analyzed |

<RequestExample>
  ```bash cURL theme={null}
  curl "http://localhost:4700/api/v1/custom-agent-evaluations/runs/rK7dP2qWx9TzB4mV6nJcE/report" \
    -H "x-api-key: agtx_local_0f3c9a17d2b84e6a5c01b9f4e7d8a2c6431b5f97a0e2d4c8"
  ```

  ```python Python SDK theme={null}
  report = client.evaluations.get_report("rK7dP2qWx9TzB4mV6nJcE")
  print(report.summary)
  for case in report.low_scoring_cases:
      print(case)
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "summary": "The agent performs well on direct how-to questions but struggles with multi-step billing queries.",
    "consistencyScore": 8,
    "instructionAdherence": {
      "score": 9,
      "analysis": "The agent generally follows the support tone guidelines.",
      "deviations": ["Q3 run 2: agent gave a refund without checking eligibility"],
      "rating": "high"
    },
    "responsePatterns": {
      "similarities": ["Consistent greeting and closing"],
      "differences": ["Detail level varies on billing answers"],
      "outliers": ["Q3 run 2"],
      "rating": "medium"
    },
    "reasoningAnalysis": {
      "cotQuality": "Reasoning is visible and mostly sound.",
      "reasoningPatterns": ["Looks up KB before answering"],
      "reasoningGaps": ["Skips eligibility checks under time pressure"],
      "rating": "medium"
    },
    "toolUsageAnalysis": {
      "effectiveness": "KB search used appropriately on most cases.",
      "patterns": ["search_kb before every answer"],
      "issues": ["No billing tool call on refund cases"],
      "rating": "medium"
    },
    "recommendations": [
      {
        "category": "instructions",
        "priority": "high",
        "recommendation": "Add a guardrail that requires an eligibility check before issuing refunds",
        "reasoning": "One run issued a refund without confirming the customer's eligibility window"
      }
    ],
    "instructionChanges": [],
    "overallAssessment": {
      "strengths": ["Consistent tone", "Accurate password reset guidance"],
      "weaknesses": ["Billing edge cases", "Multi-step reasoning"],
      "rating": "medium"
    },
    "runId": "rK7dP2qWx9TzB4mV6nJcE",
    "datasetId": "dS4tG7hNb2VxZ8kQ5wMyA",
    "status": "completed",
    "statistics": {
      "numberOfRuns": 6,
      "averageRating": 7.8,
      "minRating": 5,
      "maxRating": 10,
      "ratingVariance": 1.96
    },
    "lowScoringCases": [
      {
        "query": "Why was I charged twice?",
        "response": "You may have been charged twice due to a pending authorization.",
        "rating": 5,
        "justification": "Agent did not escalate to the billing team as required."
      }
    ]
  }
  ```

  ```json 404 No analysis yet theme={null}
  {
    "error": "No analysis found for this run. POST /runs/:runId/analyze first."
  }
  ```
</ResponseExample>
