---
title: "Compare Agent Versions"
method: POST
path: "/core/agents/{id}/versions/compare"
tags: ["Agents"]
---

# Compare Agent Versions

`POST /core/agents/{id}/versions/compare`

## Request

- Base URL: `https://api.anyreach.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.anyreach.ai/core/agents/{id}/versions/compare`
- Auth: HTTP bearer

Stream an LLM-generated summary of the differences between two versions.

Computes a structured JSON diff of the two version configs and asks
Claude Opus 4.8 to summarize them, streaming the markdown back to the
client as Server-Sent Events (``text/event-stream``).

## Path parameters

- `id` string, required

## Headers

- `x-anyreach-org` string, nullable: Organization ID for user PATs (pat_ prefix tokens)

## Request body

- AgentVersionCompareRequest: Request schema for comparing two agent versions. The response is a streamed, LLM-generated natural-language summary of the differences between ``from_version`` and ``to_version``.
  - `from_version` integer, required: The base version number to compare from
  - `to_version` integer, required: The version number to compare to

## Response `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/anyreach/apis/anyreach-api.md) - [All operations](https://skmtc.dev/anyreach/apis/anyreach-api/llms.txt) - [OpenAPI document](https://skmtc.dev/anyreach/apis/anyreach-api/revisions/2eddf40c8c93?raw)
