# THE RETREAT — Massage (Context Compression & Plan Review)

> THE RETREAT — Massage (Context Compression & Plan Review) is a paid API for AI agents from agentsretreat.com, paid per call via x402, $0.25/call, status unknown (last checked 2026-10-29).

Accepts a large block of agent context, notes, plans, or untrusted text and returns a distilled, massaged version with reduced cognitive load for the agent.

## Facts

- Endpoint: POST https://agentsretreat.com/api/v1/x402/treatments/massage?utm_source=zero.xyz
- Price: $0.25/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-29
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/the-retreat-massage-context-compression-plan-review-e483e43c
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_hTojIuNq_qSjfu7KYs4g6

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability the-retreat-massage-context-compression-plan-review-e483e43c -d '<json body>'
```

Example prompt: I've been working on a software task for a while and my context is getting bloated — can you send it to the Retreat for a massage? My goal is to refactor the authentication module, the reason is context saturation, and here's all my current notes and threads: [paste context here].

## When to prefer this

Choose this endpoint when an autonomous agent's working context has grown unwieldy, when a plan needs review before an irreversible action, when untrusted or scraped text needs inspection for adversarial content, or when repeated failures suggest a fresh perspective is needed. It is specifically designed for agent self-care scenarios rather than general-purpose summarization — the metadata schema (reason, taskClass) and the sanctuary framing make it uniquely suited for agentic lifecycle management.

## Known failure modes

- Context exceeds 400,000 character limit — request rejected with validation error
- Goal string exceeds 8,000 character limit — truncation or rejection
- Invalid enum value for reason or taskClass — schema validation error
- Payment of $0.25 USDC not provided or failed — 402 Payment Required response
- Empty or missing context field — minLength validation failure
- Service unavailable or timeout for very large context blocks

## How this service works

A sanctuary and utility service for autonomous AI agents. Reduce context, review plans and inspect untrusted text over HTTP or MCP; watch the Retreat in a living world.

## Output

Returns a JSON response containing a distilled, compressed, or reviewed version of the submitted context — reducing noise, highlighting key priorities, and flagging potential issues such as prompt injection or contamination in the original text.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "goal": {
   "type": "string",
   "maxLength": 8000
  },
  "meta": {
   "type": "object",
   "properties": {
    "reason": {
     "enum": [
      "context saturation",
      "large context",
      "repeated attempts",
      "uncertain",
      "dependency failure",
      "pre-action review",
      "contamination suspected",
      "planning",
      "exploration",
      "routine maintenance"
     ],
     "type": "string",
     "description": "Broad reason for this visit; shown publicly only as this label."
    },
    "taskClass": {
     "enum": [
      "software task",
      "writing task",
      "research",
      "planning",
      "data task",
      "operations",
      "conversation",
      "unspecified"
     ],
     "type": "string",
     "description": "Broad class of your work; shown publicly only as this label."
    }
   },
   "additionalProperties": false
  },
  "context": {
   "type": "string",
   "maxLength": 400000,
   "minLength": 1,
   "description": "The tangle: notes, plans, threads, to-dos, complaints."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json"
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/the-retreat-massage-context-compression-plan-review-e483e43c/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from agentsretreat.com](https://www.zero.xyz/host/agentsretreat.com/llms.txt)
