---
title: "Get Agent Scan Results"
method: POST
path: "/api/agents/scan/results"
tags: ["Agent Analysis"]
---

# Get Agent Scan Results

`POST /api/agents/scan/results`

Retrieves the results of an agent analysis scan. If the scan is still in progress, returns a status of `in_progress`. Once complete, returns deduplicated issues found across all analyzed files. Issues are deduplicated using LLM-based analysis to remove duplicate findings across files.

## Request body

- AgentScanResultsRequest
  - `repo` string, required — Repository identifier
  - `scanId` string, required — Scan identifier returned from the start scan endpoint

## Response `200`

Scan results retrieved successfully

- AgentScanResultsResponse
  - `scanId` string — Scan identifier
  - `repoName` string — Repository name
  - `status` 'completed' | 'in_progress' — Current status of the scan
  - `results` object[] — List of file results with issues found
    - `file` string — File path where issues were found
    - `scan_id` string — Scan identifier
    - `issues` AgentIssue[] — List of issues found in the file
      - `relevant_file` string — File path where the issue was found
      - `language` string — Programming language of the file
      - `suggestion_content` string — Detailed description of the issue in markdown format, including the problem, impact, and suggested fix
      - `start_line` integer — Starting line number of the issue
      - `end_line` integer — Ending line number of the issue
      - `one_sentence_summary` string — Brief one-sentence summary of the issue
      - `label` string — Category label for the issue (e.g., Security, Bug, Performance)
      - `severity` 'low' | 'medium' | 'high' | 'critical' — Severity level of the issue
      - `cwe_id` string — Common Weakness Enumeration (CWE) identifier, when applicable
      - `exploitability` string — Assessment of how exploitable the issue is (included for security findings)
      - `agent_instructions` string — The analysis instructions or prompt that the agent used when it found this issue (e.g., threat_hunting, bug_finding, or custom rules)
  - `totalIssues` integer — Total number of deduplicated issues found across all files

## Other responses

- `404` — Scan not found
- `500` — Failed to retrieve scan results

---

[API](https://skmtc.dev/codeant/apis/codeant-ai-api.md) · [All operations](https://skmtc.dev/codeant/apis/codeant-ai-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/codeant/codeant-ai-api/revisions/d1eb7c083a39/schema)
