---
title: "Save agent-generated analysis result"
method: PUT
path: "/analysis/{workspace_id}/agentAnalysis/save"
tags: ["Analysis"]
---

# Save agent-generated analysis result

`PUT /analysis/{workspace_id}/agentAnalysis/save`

Saves structured analysis output (title, summary, evidence, failure category) to the target entity (test run, plan run, or deployment). Used by the auto-analysis agent system.

## Path parameters

- `workspace_id` string, required

## Request body

- SaveAgentAnalysisRequest
  - `entity_id` string, required — ID of the entity to save analysis on (test run, plan run, or deployment event)
  - `entity_type` 'test_run' | 'plan_run' | 'deployment', required — The type of entity
  - `title` string, required — Agent-generated analysis title
  - `summary` string, required — Agent-generated analysis summary (root cause + next steps)
  - `failure_category` string — Agent-suggested failure category ID
  - `evidence_details` string — Agent-generated evidence details
  - `content_blocks_json` string — Pre-computed structured content blocks for evidence_details, serialized as a JSON array string. Stored as-is on the FailureAnalysis entity and deserialized by consumers.
  - `agent_session_id` string — ID of the agent session that generated this analysis
  - `reused_from_run_id` string — When the failure analysis was reused from a prior run, the ID of the original run that produced the analysis.

## Response `204`

Analysis result saved successfully

## Other responses

- `400` — Invalid or missing parameter
- `401` — User not authenticated
- `403` — User not authorized
- `404` — Entity not found
- `default` — Unknown error

---

[API](https://skmtc.net/mabl/apis/mabl-api.md) · [All operations](https://skmtc.net/mabl/apis/mabl-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/mabl/mabl-api/revisions/d0fc0114da66/schema)
