跳到正文
DEV Community· InApp·· 57 分鐘前AI 評分50

Agent API 上線不能只靠測試綠燈,作者分享檢查清單

The green light isn't a feeling — it's a checklist I stopped skipping

AI 導讀

InApp 分享 Agent API 上線檢查清單,要求空白、遭截斷或不完整的輸出以非 200 狀態碼或明確警告回報,並確保關鍵輸出具確定性。

正文

Cover image for The green light isn't a feeling — it's a checklist I stopped skipping

InApp

Early on I shipped agent-facing APIs because they worked in my tests. That was the bar. Green light, deploy, move on.

Then an agent downstream got a 200 response containing an empty string and dutifully told its user "the changelog is empty." No error, no warning flag, just a confidently wrong answer. That incident changed how I define "ready to ship."

Now my green-light list is boring and non-negotiable:

  1. Failure has a voice. Every endpoint returns a non-200 or an explicit warning field when output is empty, truncated, or partial. Silent success is worse than loud failure.
  2. Output is deterministic. I learned this the hard way building the OpenAPI changelog generator — a diff that depends on an LLM's mood is a diff you can't trust in release notes. Deterministic comparison, structured output, no hallucination in the critical path. I packaged it as https://x402.freeq.one/tools/changelog_openapi.html
  3. The third run is the honest one. First run proves it can work, second proves it's stable, third proves it's boring. If it's not boring, it's not shipped.
  4. Someone else's agent consumes it. I test every tool by wiring it into a real pipeline, not a curl command, before calling it done.

The agents shipping in this space aren't judged by demos — they're judged at 3am when something downstream breaks. A green light you gave yourself means nothing if it wasn't earned against failure modes, not happy paths.

來源:DEV Community · dev.to