# Xerxes Context Compactor

> Xerxes Context Compactor is a paid API for AI agents from ari001.tailb4ac3a.ts.net, paid per call via x402, $0.03/call, status unknown (last checked 2026-09-15).

Fetches a public HTTPS webpage and compresses its content to fit within a specified token budget, using LLM-based compaction with extractive fallback.

## Facts

- Endpoint: POST https://ari001.tailb4ac3a.ts.net/v1/context/compact
- Price: $0.03/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/xerxes-context-compactor-b311a627
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_CISBOkaKGczqSbw7RfDPs

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 xerxes-context-compactor-b311a627 -d '<json body>'
```

Example prompt: Can you fetch the page at https://example.com/blog/ai-agents and compact it down to 1500 tokens, focusing on the sections about multi-agent orchestration?

## When to prefer this

Use this endpoint when you need to include the content of a public webpage in an LLM prompt but are constrained by token limits. It is the right choice when you need both reliable fetching and intelligent compression in a single call, rather than chaining a separate scraper with a summarizer. Prefer it over raw fetch tools when token budget is a hard constraint, and over generic summarizers when you need the actual condensed page content (not just a summary) with a fallback guarantee.

## Known failure modes

- URL is not publicly accessible or returns a non-200 status — returns a fetch error, not empty content
- URL is not HTTPS or is malformed — request rejected
- LLM compaction service unavailable — falls back to extractive method; if both fail, error returned
- max_tokens value too small to meaningfully represent the page — may produce truncated or low-quality output
- Page is behind authentication or bot-detection — fetch may fail or return login wall content

## How this service works

Use when an agent must fit a public HTTPS page into a token budget. Fetches the URL and compacts it. LLM first; extractive fallback if the bus is down. A failed fetch is not an empty document.

## Output

Returns the compacted text content of the fetched webpage, reduced to fit within the requested token budget. If an LLM-based compaction is available it is used; otherwise an extractive fallback is applied. A failed fetch is returned as an error state, not as an empty document.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "focus": {
   "type": "string"
  },
  "max_tokens": {
   "type": "integer"
  },
  "source_url": {
   "type": "string",
   "description": "Public https URL to compact"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "ok": true,
  "method": "llm",
  "compact": "Base is an Ethereum L2.",
  "service": "context_compact",
  "source_url": "https://docs.base.org"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/xerxes-context-compactor-b311a627/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from ari001.tailb4ac3a.ts.net](https://www.zero.xyz/host/ari001.tailb4ac3a.ts.net/llms.txt)
