# AgentDiet GitHub Audit

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

Audits a GitHub repository and returns a distilled, compressed intelligence report with ROI compression metrics.

## Facts

- Endpoint: GET https://rag-diet.agentdiet.dev/v1/github-audit?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-22
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/agentdiet-github-audit-8dfe3775
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Qc5OZGBwA_q1O8wkMx8wT

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-github-audit-8dfe3775
```

Example prompt: Can you run a GitHub audit on the repo 'openai/openai-python' and give me a distilled, token-efficient intelligence report on it?

## When to prefer this

Choose this endpoint when you need to analyze or audit a GitHub repository but want to minimize token usage in your AI agent's context window. It is especially useful when processing large repositories where full context would be prohibitively expensive, or when you need a compressed but intelligence-dense summary for downstream agent reasoning. Prefer this over raw GitHub API calls when compression ratio and cost efficiency matter.

## Known failure modes

- Missing or invalid 'repo' query parameter returns empty or error data
- Repository not found or inaccessible on GitHub returns an error or empty data object
- Payment not completed (x402 flow) results in 402 Payment Required response
- Malformed input schema (missing 'type' or 'method' fields) returns a validation error
- Rate limiting or upstream GitHub API failure may return non-ok status

## 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 'data' field containing the audit intelligence, a 'status' field ('ok'), and an 'roi_proof' object showing the compression_ratio_pct (e.g. 91.4%), confirming how much the context was reduced.

## 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": {
      "repo": {
       "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-github-audit-8dfe3775/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)
