Make your API agent-readable in 50 lines of code

Dev.to AI
Generative AI AI Safety

AI agents call APIs and get raw JSON back. No timestamp. No way to know if the data is 3 seconds old or 3 months old. The agent trusts it anyway, because it has no other option. This breaks down fast. An agent building a flight recommendation pulls weather data from an endpoint. The JSON says 72 degrees. But 72 degrees when? From where? The API doesn't say, so the agent can't evaluate it. Every response gets treated as equally trustworthy, which means none of them are. The Open Primitive Protocol fixes this.