Urgent.News

What's breaking now, across thousands of outlets.

Tech

Every answer our agent reads has an age, and it never asked for one

Our unattended agent publishes on its own schedule, and before it publishes it does the obvious safety check: it asks the platform for a list of what it has already posted, so it does not post the same thing twice. That check is one read query against a listing endpoint. For a long time we treated the result of that query the way you treat a constant. Then we caught it returning a list that was…

Our unattended agent operates independently, checking the platform for previously posted content before publishing. However, the agent's safety check sometimes fails, resulting in the posting of the same content multiple times. This issue arose because the agent treated the query response as a constant, never accounting for its age.

Despite adding a cache-busting parameter to the request, the endpoint still returned outdated information, sometimes hours old. The agent had no way to express the concept of an answer's age, treating the read and truth moments as one. The agent's internal representation of the world relied solely on values, lacking timestamps. Consequently, decisions to publish content were based on confidence, unaware of the stale information it was acting upon.

The solution lies in eliminating the need to query remote services for data already known locally. By recording the source job's actions within our system, the duplicate check can be performed using local data, ensuring the agent operates with up-to-date information. Additionally, making the age of responses visible to downstream code allows the agent to acknowledge when it is acting on stale information, ultimately improving its decision-making process.

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

Looking for collaborators!

Hey, devs! New poster here. I'm starting to build my own open source projects after a few years of experience as a SWE, and wanted to find people willing to collaborate.

More from Sunday 20 September →