惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

IT之家
IT之家
A
About on SuperTechFans
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
N
Netflix TechBlog - Medium
Microsoft Security Blog
Microsoft Security Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
博客园 - 三生石上(FineUI控件)
博客园 - 聂微东
博客园 - Franky
D
Docker
Martin Fowler
Martin Fowler
Engineering at Meta
Engineering at Meta
The Cloudflare Blog
人人都是产品经理
人人都是产品经理
Last Week in AI
Last Week in AI
U
Unit 42
F
Fortinet All Blogs
H
Help Net Security
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
罗磊的独立博客
P
Proofpoint News Feed
月光博客
月光博客
G
Google Developers Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Your API Docs Are For Agents Now
Mukunda Rao · 2026-05-15 · via DEV Community

A quiet shift is happening in developer experience:

Your API docs are not only for humans anymore.

They are for agents.

Agents read schemas, tool descriptions, OpenAPI specs, MCP manifests, examples, error messages, and logs. They decide which function to call, what arguments to pass, how to recover from failures, and whether to retry.

That means ambiguous API design is no longer just annoying. It directly reduces agent reliability.

Agents Are Silent API Users

Human developers complain in issues, Discord, Slack, Stack Overflow, or support tickets.

Agents usually do not.

They fail in quieter ways:

  • choose the wrong tool
  • pass subtly invalid arguments
  • retry the same bad call
  • hallucinate missing enum values
  • ignore a useful endpoint
  • give up and answer with incomplete context

If you only monitor HTTP status codes, you miss most of the story.

What Makes An API Agent-Ready?

1. Tool Names Should Be Boring

Agents do better with literal names.

Prefer:

  • search_customer_tickets
  • get_invoice_by_id
  • create_refund_request

Avoid:

  • lookup
  • process
  • execute
  • advanced_search_v2

Human developers can click through docs. Agents need the affordance in the name.

2. Descriptions Need Operational Boundaries

A good tool description says what the tool does and when not to use it.

Example:

Search customer support tickets by keyword, customer id, or date range. This returns ticket metadata and message excerpts only. Do not use for billing records or account permissions.

That last sentence is not fluff. It helps the agent avoid bad tool selection.

3. Errors Should Teach Recovery

Bad error:

invalid request

Better error:

customer_id must be a UUID. Use search_customers first if you only have an email address.

Agents can recover from good errors. They spiral on vague ones.

4. Enum Values Need Examples

If a parameter accepts status, list valid values and show realistic examples.

Do not rely on the model guessing whether the value is:

  • in_progress
  • in-progress
  • IN_PROGRESS
  • processing

Small inconsistencies waste agent loops.

5. Side Effects Need Explicit Marking

Every tool should be clearly labeled as:

  • read-only
  • write
  • destructive
  • external-facing
  • money-moving
  • permission-changing

This is not just documentation. It becomes the foundation for approval workflows.

Observability Has To Change

If agents are API users, API analytics should include agent-specific signals:

  • tool selected
  • rejected arguments
  • repeated invalid calls
  • recovery success rate
  • average retries per task
  • common schema confusion
  • abandoned tool sequences

The next generation of API monitoring will not only ask, "Was the endpoint healthy?"

It will ask:

Could the agent successfully use it?

Internal Data Is Part Of The Same Problem

A lot of companies are excited about the "agentic web," but the bigger immediate gap may be internal.

Your product docs, customer feedback, support tickets, runbooks, metrics, and codebase may be scattered across ten systems. If an agent cannot query that context cleanly, it will not matter how good the model is.

Agent-ready APIs are really agent-ready knowledge systems.

The Takeaway

APIs used to be designed for deterministic clients and human developers.

Now they also need to be designed for probabilistic tool users.

That means clearer names, tighter schemas, better errors, stronger examples, explicit permissions, and telemetry that shows where agents get confused.

The companies that do this well will make their products easier for both humans and agents.

Sources Worth Reading