{"uid":"cap_VycrJyb_YNDK8EXPcU9uP","slug":"kg-ninja-agent-error-fix-receipt-614d46ff","name":"KG-Ninja Agent Error Fix Receipt","description":"KG-NINJA Agent Error Fix Receipt","url":"https://api.kgninja.dev/fix-error?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","properties":{"log":{"type":"string"},"error":{"type":"string"},"command":{"type":"string"},"environment":{"type":"string"}}},"responseSchema":{"type":"json","example":{"mode":"mainnet","status":"paid","network":"eip155:8453","receipt":{"risk_note":"Do not run destructive cleanup, reset, rm, database, credential, or firewall commands without manual review.","retry_plan":["Confirm the exact failing command.","Run the smallest non-destructive diagnostic command relevant to the error.","Check whether required environment variables, packages, files, or services are present.","Retry the original command once after the minimal fix."],"root_cause":"The failure appears related to a missing package, missing file, or unresolved module path.","generated_at":"2026-06-14T00:00:00.000Z","next_command":"npm install","prevention_note":"Store this error pattern in a runbook and add a preflight check before future runs."},"service":"Agent Error Fix Receipt","version":"2026-05-25-d1-revenue-log","request_id":"example-request-id","real_revenue":true,"input_received":true,"revenue_proof_log":"paid_fix_error_receipt_issued","durable_revenue_log":true,"post_payment_retry_path":"Retry POST /fix-error with x402 payment proof."}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_uj0CxsP3pd5-KQFNOPCwS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Accepts agent error logs, error messages, commands, and environment context to return a diagnostic fix receipt for troubleshooting agentic failures","exampleAgentPrompt":"I'm getting this Python error in my agent: 'AttributeError: NoneType object has no attribute split' — it happened when running the 'process_input' command in a Python 3.11 environment. Can you get a fix receipt for it?","exampleUseCases":[{"title":"Diagnosing crashed AI agent pipeline","prompt":"My agent pipeline just crashed with this error: 'KeyError: credentials not found' when running the 'fetch_data' command in a Docker environment. Can you get me a fix receipt explaining what went wrong and how to fix it?"},{"title":"Debugging failed shell command in CI","prompt":"My CI agent ran 'npm run build' and got this error: 'ENOENT: no such file or directory, open package.json'. The environment is Node 18 on Ubuntu. Can you send this to KG-Ninja and get back a fix receipt?"},{"title":"Resolving runtime error in LLM agent loop","prompt":"My LLM agent loop is throwing 'RuntimeError: recursion depth exceeded' when executing the 'plan_and_act' command in a LangChain environment. Can you analyze this error and return a fix receipt?"}],"resultDescription":"A fix receipt document describing the diagnosed root cause of the submitted error, suggested resolution steps, and contextual analysis based on the provided log, error message, command, and environment.","failureModes":["Missing both 'log' and 'error' fields may result in a vague or empty diagnosis","Invalid or malformed JSON input may cause a 400 error","Unrecognized environment strings may reduce diagnostic accuracy","Payment failure (x402) will block the response if USDC is not provided","Very long log strings may be truncated or cause timeouts"],"whenToPreferThis":"Choose this endpoint when an AI agent or automated pipeline encounters a runtime error, command failure, or crash and needs a structured diagnostic receipt rather than a generic web search. It is especially useful when the agent has access to structured error logs, the specific command that failed, and the runtime environment, and needs a fast, cheap ($0.01) programmatic fix suggestion without calling a large language model directly.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-11T06:35:16.587Z","isFirstParty":false,"canonicalSlug":"kg-ninja-agent-error-fix-receipt-614d46ff"}