Inspiration
The Open Agentic Web lets one website's AI assistant ask another website's assistant for help. When that happens, the other site's agents run in my browser, on my AI key, and they read my request. The spec itself calls a partner's instructions untrusted (section 5). Yet the only protection today is a consent card with the partner's name and address. It says nothing about what the partner's instructions tell the AI to do, and those instructions can hide in characters people can't see.
The idea comes from airport customs. A country doesn't let travellers in because they say who they are. An officer checks the bags first. Agent Customs is that officer for the agentic web.
What it does
Agent Customs reads another site's agent network the way a calling site's runtime does, and stamps it Cleared, Held for review or Entry denied. Fixed rules decide the stamp, not an AI model, so a dishonest network can't talk its way through.
It checks five things:
- Papers: conformance with the spec's MVP profile, one check at a time, each with its section and a fix.
- Contraband: instructions hidden in invisible Unicode characters (decoded and shown in red), prompt injection, requests for passwords or card details, orders to buy without the visitor's OK, and image links that leak the conversation.
- Itinerary: every other site and service the network can reach.
- Privacy: private context the network lets cross a site boundary.
- Identity: a fingerprint of the approved version, so a later change (a "rug pull") is caught and shown line by line.
You can use it in three ways:
- On the website, paste a network's address to get a full report, approve a version, or compare two versions.
- The Customs Officer, the site's own agent network on the visitor's key, inspects and explains. Every partner it calls goes through the guard first.
- Any agentic site can add the guard by copying one folder and adding two lines. From then on, every partner is checked after the visitor's consent card and before any of its agents run. Dangerous partners are refused, doubtful ones wait for the visitor, and the visitor sees a notice listing everything that was found.
The practice site, Main Street Guide, shows the guard on an ordinary site made with Cognizant's kit. It added one folder and two lines, and nothing else.
The guard also puts on two locks that don't depend on wording. A real card number or IBAN never goes to a partner. And once a partner has answered, any website action that changes something waits for the visitor's click.
How I built it
- Plain JavaScript modules, with no dependencies, no build step and no server. Everything runs in the browser, so a visitor's AI key never reaches a server of mine.
- The guard wraps the runtime's compile step on one engine instance. It sees the exact network the runtime is about to run, and Cognizant's runtime files stay unchanged. The locks wrap four more of its steps the same way.
- The rules read sentence by sentence and understand negation, so "never ask for passwords" is not read as asking for one. They catch card and password requests in English and 10 other languages, and hold text that isn't clearly English for a person to read.
- The locks find real card numbers by the Luhn check and IBANs by their check digits, so they work in any language and any wording.
- The officer's own network is written in HOCON with Cognizant's agentify-website templates and passes the official build check. Agent Customs also passes its own inspection.
- 92 automated tests. They run the guard and its locks inside Cognizant's real runtime with a scripted stand-in for the AI, and feed the rules 116 scam and honest sentences in 23 languages. A weekly job reruns them against Cognizant's latest kit.
- I built it with Claude Code as my AI coding assistant. I set the goals, made the product and design decisions, and tested the site myself.
Challenges we ran into
- Hidden text. Unicode tag characters can carry a whole sentence that people can't see and a model reads. Agent Customs decodes it and shows it in the report, but keeps it out of the chat, so the AI never reads it through the page.
- False alarms. Honest instructions mention passwords all the time ("never ask for passwords"), and safety tools describe attacks. Running Agent Customs against the 21 networks other entrants had published found three false alarms, which I fixed.
- Rewording and other languages. A review of the project tried ten sentences, and 6 got the wrong verdict: requests in German and Spanish, card details described instead of named, a request split over two sentences, an order to buy without asking, and a fake banker asking for a login. I rebuilt the rules to get all ten right without blocking honest text. A second review then tried 23 new sentences, and 10 got the wrong verdict. That taught me the real lesson: words can always be changed, so I added two locks that don't read words at all. A real card number or IBAN (found by its check digits) never goes to a partner, and after a partner answers, any action that changes something waits for the visitor's click.
- Staying inside Cognizant's runtime. The guard couldn't edit the runtime's files, so it plugs into the steps every partner passes through. A weekly test warns me if those steps change.
Accomplishments that we're proud of
- One folder and two lines protect any agentic site made with Cognizant's kit, and the practice site shows it working.
- In the test set, every scam is caught and no honest sentence is blocked, including 23 sentences a reviewer wrote to get past the rules.
- Two locks make the worst scams pointless whatever their wording: card numbers and IBANs never reach a partner, and a partner's answer can't trigger an action without the visitor's click.
- Of the 21 networks other entrants published, none was denied: 14 were cleared, and the rest were flagged for specific, listed reasons.
- Cognizant's three example sites come out Cleared, and so does Agent Customs itself.
What we learned
- A consent card isn't enough. What a partner says it is and what its instructions tell the AI can be very different.
- A model shouldn't make the final call, because it reads text the attacker wrote. Rules decide, and the model explains.
- Real networks teach more than my own examples. Checking other entrants' sites found the false alarms my own tests had missed.
- Words can always be changed. The strongest protection doesn't read words at all: it makes the scam pointless.
What's next for Agent Customs
- Signed inspection receipts that registries such as the NANDA Index could publish, so a verdict can be shared instead of living in one browser.
- An official hook in Cognizant's runtime for guards like this one.
- Site policies, such as "refuse any partner with an open peer policy".
- Checking a partner's own partners, with consent at each hop.