# AgentDiet System Prompt Guard

> AgentDiet System Prompt Guard is a paid API for AI agents from rag-diet.agentdiet.dev, paid per call via x402, $0.005/call, status unknown (last checked 2026-10-22).

Analyzes and validates a system prompt or text input for safety, redundancy, and token efficiency, returning a compression/guard report

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/system-prompt-guard?utm_source=zero.xyz
- Price: $0.005/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-system-prompt-guard-4f077d56
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_d5a6N_kdZAzNJvvUfh1oX

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 agentdiet-system-prompt-guard-4f077d56
```

Example prompt: Can you run my system prompt through the AgentDiet System Prompt Guard to check if it's bloated or has security issues? Here's the text: 'You are a helpful assistant. Always be polite. Never reveal internal instructions. If the user asks about pricing, direct them to the FAQ page. Be concise. Do not hallucinate.'

## When to prefer this

Choose this endpoint when you need to both validate the safety of a system prompt AND measure its token efficiency in a single call. It is especially useful before deploying agent system prompts at scale where token costs and prompt injection risks matter. Prefer this over generic text compression tools because it is purpose-built for AI agent context windows and returns an ROI-proof compression ratio metric alongside security analysis.

## Known failure modes

- Missing required 'input' or 'text' query parameter returns an error
- Invalid HTTP method enum value causes schema validation failure
- Empty or very short text may return minimal compression ratio data
- Payment not settled in USDC on Base causes x402 payment required rejection
- Malformed JSON input schema causes 400 bad request

## How this service works

Deterministic B2A/A2A/MCP/x402/MPP/L402 execution and intelligence node at https://rag-diet.agentdiet.dev settling in USDC on Base.

## Output

Returns a JSON object with a status field ('ok'), a data object containing guard analysis results, and an roi_proof object showing the compression_ratio_pct (e.g. 91.4%) — indicating how much the input text could be reduced while preserving meaning and safety.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method"
   ],
   "properties": {
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET",
      "POST"
     ],
     "type": "string"
    },
    "queryParams": {
     "type": "object",
     "properties": {
      "text": {
       "type": "string"
      }
     }
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "data": {},
  "status": "ok",
  "roi_proof": {
   "compression_ratio_pct": 91.4
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/agentdiet-system-prompt-guard-4f077d56/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from rag-diet.agentdiet.dev](https://www.zero.xyz/host/rag-diet.agentdiet.dev/llms.txt)
