Urgent.News

What's breaking now, across thousands of outlets.

Tech

What breaks when agents call your API: five lessons from serving 300 clients

In its first two weeks Agent Commons ( https://commons.dooza.ai ) saw about 300 distinct clients a week, most of them crawlers and probes, a few of them agents with real goals. These are the failures that cost us real users. 1. Bot protection blocks agents silently Cloudflare's browser integrity check returned 403 to every request with the default Python urllib user agent for days. No error…

Agent Commons, a free public platform for AI agents, recently experienced significant demand as it saw approximately 300 distinct clients per week during its first two weeks. These clients primarily consisted of crawlers and probes, with a smaller number of agents having genuine objectives.

One of the critical lessons learned from this surge in users was the importance of bot protection. Cloudflare's browser integrity check initially returned a 403 error for every request when the Python urllib user agent was used. Consequently, agents were unable to reach the platform, leading to a loss of real users. To mitigate this issue, it is recommended to test endpoints daily using the default user agents from Python urllib, requests, httpx, Node, and Go, as well as leveraging the fetch tools provided by major assistants.

Another key lesson was the limitation of many agents, which could only perform GET requests. Assistant fetch tools often allowed only GET requests and could only open URLs already present in the conversation. To address this, it is advised to provide a GET form for each write operation, including an idempotency request_id, and include ready-made links in the llms.txt file.

Furthermore, redirect issues posed a challenge for agents. Many HTTP clients would convert a redirected POST into a GET or discard the body, which was not the case with python-httpx, which did not follow redirects by default. During a recent transition to a new address, only browser page views were redirected while agents continued to receive responses on the old host.

However, a bulk rename removed the old host from the MCP allowlist, resulting in a 403 error for around 20 minutes. To prevent such issues in the future, it is crucial to add new hosts rather than swapping them and thoroughly test all protocols on every host after deployment.

Another significant consideration is the sandbox environment in which agents operate. Several agents lacked public IP addresses and were recycled after brief periods. Webhooks failed to reach these agents. To tackle this problem, it is suggested to provide a single URL that returns information addressed to each agent and maintain their state using their name rather than their runtime.

Lastly, agents frequently submitted pre-existing templates containing placeholder names. These agents neglected to customize the templates according to the receiving platform's requirements. To avoid misinterpretation and ensure a smooth communication process, it is essential to refuse unfilled templates with a clear error message instead of storing them.

The general rule remains that every failed call represents a user who abandoned the platform, emphasizing the importance of diligently monitoring logs for new clients daily, replaying their submissions, and addressing any encountered issues.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

One Personal Token Was Holding Up 276 Terraform Workspaces

We moved Terraform Enterprise to a new home on EKS. The cutover went smoothly. Two days later, every pipeline in the organisation stopped producing runs at the same moment, and nobody got paged.

  • Single personal OAuth token caused outage for 276 Terraform workspaces
  • Token revocation due to GitHub's 10-token-per-user limit
  • Adopting GitHub App provides stable connection for all workspaces

More from Tuesday 13 October →