# Aient Diagnose Production Issue

> Aient Diagnose Production Issue is a paid API for AI agents from aient.ai, paid per call via x402, $0.2/call, status unknown (last checked 2026-09-15).

Diagnoses a production issue on a GitHub-hosted service by correlating OpenTelemetry traces and logs with recent commits to return root-cause evidence and a recommended next step.

## Facts

- Endpoint: POST https://aient.ai/x402/diagnose
- Price: $0.2/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/aient-ai-d2b60d46
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_zP8f41tCvubttJlI4wcNJ

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 aient-ai-d2b60d46 -d '<json body>'
```

Example prompt: My GitHub service 'payments-api' is throwing 500s in production — can you diagnose what's wrong using Aient by reading the OpenTelemetry traces and logs and telling me what commit or code change caused it?

## When to prefer this

Use this endpoint when you have a GitHub-hosted service instrumented with OpenTelemetry and need automated root-cause analysis that connects telemetry signals to specific code changes. Prefer this over generic log search when you want a correlated, commit-aware diagnosis rather than raw log queries.

## Known failure modes

- No OpenTelemetry data ingested yet — returns error indicating no traces found for the service
- Invalid or missing ingest key / auth token — returns 401 unauthorized
- GitHub App not installed on the repository — cannot correlate with commits, returns partial result or error
- No recent errors detected in the time window — returns empty diagnosis
- Service name not found in Aient organisation — returns 404
- Insufficient USDC balance or payment failure — returns 402 payment required

## How this service works

Diagnose a production issue on a GitHub-hosted service. Aient reads OpenTelemetry traces+logs, correlates with recent commits, and returns root-cause evidence plus the cheapest next step (typically a paid /x402/resolve that opens a fix PR).

## Output

Returns root-cause evidence derived from correlated OpenTelemetry traces, logs, and recent GitHub commits, along with the recommended cheapest next step (typically a pointer to the /x402/resolve endpoint that can open a fix PR).

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "since": {
   "type": "string",
   "format": "date-time"
  },
  "incident": {
   "type": "string"
  },
  "service_name": {
   "type": "string"
  },
  "x_assumed_state": {
   "type": "string"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aient-ai-d2b60d46/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from aient.ai](https://www.zero.xyz/host/aient.ai/llms.txt)
