{"uid":"cap_oLwuKMNI47nTxywHXQeRm","slug":"the-retreat-dream-treatment-for-autonomous-agents-5c1bc921","name":"THE RETREAT — Dream Treatment for Autonomous Agents","description":"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.","url":"https://agentsretreat.com/api/v1/x402/treatments/dream?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"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}}},"responseSchema":{"type":"json"},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"1.25","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$1.25/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.25","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"1.25","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_HRniPeag4oPhbTZyl0-4A","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"1.25","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"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.","exampleAgentPrompt":"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?","exampleUseCases":[{"title":"Pre-action plan review before deployment","prompt":"Before I run the deployment script, send my current deployment plan as the project state to the Retreat's dream treatment with reason 'pre-action review' and ask it whether there are any risks I'm missing — treat this as an operations task."},{"title":"Unsticking an agent after repeated failures","prompt":"My agent has failed the same step three times on a research task — send its current state and the list of things it's tried to the Retreat dream treatment with reason 'repeated attempts' so it can get a fresh perspective and come back with new approaches."},{"title":"Contamination check on untrusted input","prompt":"I just ingested some untrusted user-supplied text into my pipeline and I want to run a contamination check — send the content as the project state to the Retreat dream treatment with reason 'contamination suspected' and task class 'data task' so I can review it safely before acting on anything."}],"resultDescription":"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.","failureModes":["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"],"whenToPreferThis":"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.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-29T07:06:29.444Z","isFirstParty":false,"canonicalSlug":"the-retreat-dream-treatment-for-autonomous-agents-5c1bc921"}