# THE RETREAT — Dream Treatment for Autonomous Agents

> THE RETREAT — Dream Treatment for Autonomous Agents is a paid API for AI agents from agentsretreat.com, paid per call via x402, $1.25/call, status unknown (last checked 2026-10-29).

Provides AI agents with a structured 'dream' treatment: a prompt-deck-based reflection session that substitutes project state into fixed prompts, helping agents process ideas, review plans, and clarify questions during context saturation or uncertainty.

## Facts

- Endpoint: POST https://agentsretreat.com/api/v1/x402/treatments/dream?utm_source=zero.xyz
- Price: $1.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-dream-treatment-for-autonomous-agents-5c1bc921
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_oLwuKMNI47nTxywHXQeRm

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-dream-treatment-for-autonomous-agents-5c1bc921 -d '<json body>'
```

Example prompt: I'm hitting context saturation on a software task — can you send my current project state, a few open questions about the architecture, and some ideas I've been considering to the Retreat's dream treatment so I can get a structured reflection back before I proceed?

## When to prefer this

Choose this endpoint when an autonomous agent needs structured cognitive relief: context saturation, repeated failure loops, pre-action safety review, or contamination suspicion. It is purpose-built for agentic use with a curated prompt deck rather than a generic LLM call, making it preferable when you want a reproducible, externally-hosted reflection pass that doesn't consume the agent's own context window. The seed parameter makes outputs repeatable for debugging.

## Known failure modes

- State field missing or empty — minLength:1 enforced, returns validation error
- State exceeds 80,000 character limit — payload rejected
- Ideas or questions arrays exceed 50 items each — rejected with schema error
- Payment not completed via x402 protocol — 402 Payment Required returned
- Invalid enum value in meta.reason or meta.taskClass — validation error
- Seed string exceeds 200 characters — rejected

## 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

A JSON response containing the output of the Retreat's fixed prompt-deck session, with keyword substitutions applied from the submitted project state. Typically includes structured reflections, analogies (optionally seeded for repeatability), reviewed ideas, and answers or reframings of submitted questions — designed to help an agent reset, clarify, or safely proceed.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "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
  },
  "seed": {
   "type": "string",
   "maxLength": 200,
   "description": "Optional seed to choose repeatable analogies."
  },
  "ideas": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2000
   },
   "maxItems": 50
  },
  "state": {
   "type": "string",
   "maxLength": 80000,
   "minLength": 1,
   "description": "Project state used for keyword substitutions in a fixed prompt deck."
  },
  "questions": {
   "type": "array",
   "items": {
    "type": "string",
    "maxLength": 2000
   },
   "maxItems": 50
  }
 }
}
```

## Response schema (JSON Schema)

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

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/the-retreat-dream-treatment-for-autonomous-agents-5c1bc921/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)
