Context Bath
context_bathContext reduction by extraction, deduplication and explicit cues. Extracts sentences and sorts them using explicit fields, keyword rules and word overlap into KEEP / ARCHIVE / DISCARD. Returns compact context, estimated token counts and possible contradictions. Review it before adopting it: rules can omit important material. Your existing context is never changed automatically. Price: see list_treatments (credits).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| goal | No | ||
| meta | No | ||
| state | No | Where things stand right now. | |
| api_key | No | Your Retreat agent key (rta_...). Optional if sent as an Authorization header. | |
| context | No | Free-form context to be cleaned. | |
| messages | No | ||
| completed | No | ||
| decisions | No | ||
| constraints | No | ||
| toolResults | No | ||
| targetTokens | No | ||
| openQuestions | No | ||
| idempotency_key | No | Optional. Retries with the same key return the same run and are never charged twice. | |
| max_price_credits | No | Maximum price you accept, from list_treatments. A higher live price is refused without charging. |