<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Shuvam Pandey</title>
    <description>The latest articles on DEV Community by Shuvam Pandey (@shuv-amp).</description>
    <link>https://dev.to/shuv-amp</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4254173%2Fcaa00c56-91af-4842-9525-efddde28b77a.png</url>
      <title>DEV Community: Shuvam Pandey</title>
      <link>https://dev.to/shuv-amp</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shuv-amp"/>
    <language>en</language>
    <item>
      <title>From Kathmandu to Junction: we built a door AI agents can't sneak milk through</title>
      <dc:creator>Shuvam Pandey</dc:creator>
      <pubDate>Thu, 19 Nov 2026 16:34:30 +0000</pubDate>
      <link>https://dev.to/shuv-amp/from-kathmandu-to-junction-we-built-a-door-ai-agents-cant-sneak-milk-through-58f3</link>
      <guid>https://dev.to/shuv-amp/from-kathmandu-to-junction-we-built-a-door-ai-agents-cant-sneak-milk-through-58f3</guid>
      <description>&lt;p&gt;In Valio Aimo's product file, &lt;strong&gt;1,485 of the 4,178 products labelled "lactose-free" still contain milk.&lt;/strong&gt; Both labels are correct, because lactose-free isn't milk-free. A chef knows that. An AI agent ordering at machine speed for a wedding guest with a milk allergy doesn't.&lt;/p&gt;

&lt;p&gt;We flew from Kathmandu to Finland on a golden ticket, spent 48 hours at Junction 2026 building a door that AI agents must pass through before they can order food, and finished &lt;strong&gt;11th of 105 teams&lt;/strong&gt; in the Valio Aimo challenge. Here's what we built, what broke at 1 a.m., and what a tired mentor taught us about trust.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;This is a submission for the &lt;a href="https://dev.to/mlh-hackathon"&gt;MLH x DEV Writing Challenge&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Built
&lt;/h2&gt;

&lt;h3&gt;
  
  
  How a team from Nepal ended up in Espoo
&lt;/h3&gt;

&lt;p&gt;We won &lt;strong&gt;JunctionX Kathmandu&lt;/strong&gt;, and the prize was a golden ticket to the main event: Junction in Espoo, Finland, one of Europe's biggest hackathons. We're &lt;strong&gt;Team 2083&lt;/strong&gt;, named after the current year in Nepal's calendar. (Yes, we're from the future.)&lt;/p&gt;

&lt;p&gt;On site we became four. Sandip Shrestha and I came from Nepal. Afaf Driouech and Valeria E. had made their lives in Finland, though neither is Finnish. We were a small international team with 48 hours and one problem.&lt;/p&gt;

&lt;h3&gt;
  
  
  The challenge
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.valioaimo.fi/" rel="noopener noreferrer"&gt;Valio Aimo&lt;/a&gt; supplies Finland's professional kitchens: restaurants, caterers, hotels. Their challenge, &lt;em&gt;Trusted Trade Agents&lt;/em&gt;, asked what happens when AI agents start ordering from them. Who decides what an agent may buy? Who approves it? How does anyone trust the result?&lt;/p&gt;

&lt;p&gt;We got the brief on Friday evening and walked straight to the Valio booth. One line from their AI lead shaped everything we built:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"There shouldn't be two milks and a carrot."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The point: when an agent asks you to choose, the options must make sense. Trust comes from the &lt;em&gt;quality&lt;/em&gt; of what the agent shows you, not from a friendlier chat window.&lt;/p&gt;

&lt;p&gt;Later that night we stood in a queue of five or six teams, all waiting for one mentor. The mentor told us the real users are kitchens that design their own menus, like lunch restaurants and caterers. And an empty allergen list, they said, doesn't mean "no allergens". It means &lt;strong&gt;"we don't know."&lt;/strong&gt; We went back and counted. In Valio's file, &lt;strong&gt;58.9% of products have an empty allergen list.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Lupa: a permission door, not another chatbot
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Lupa&lt;/strong&gt; is Finnish for &lt;em&gt;permission&lt;/em&gt;. It sits between any AI agent and Valio, and every order goes through it. You type:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;"I want catering for spaghetti bolognese for 100 people."&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You can write it in English, Finnish or Swedish. Lupa prices every line live from Valio's API, shows its working (&lt;em&gt;100 portions × 120 g = 12 kg of mince&lt;/em&gt;), keeps every diet group on its own lines, and asks for &lt;strong&gt;one approval&lt;/strong&gt; on your phone.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; any AI agent (Claude, Gemini, …)  ──MCP / OpenAPI──▶  LUPA'S DOOR  ──▶  Valio price &amp;amp; availability API
                                                         │
                       1. model reads the words → a typed brief (and nothing else)
                       2. code plans: packs, portions, diet groups, live prices
                       3. diet gate (code) has the last word on every line
                       4. kitchen's signed rules: agents, approvers, per-order / per-week limits
                       5. one approval on a phone → ES256 signature over the exact reasons + the week
                       6. numbered receipt, chained → checked offline in the browser, no AI involved
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The model reads, code decides.&lt;/strong&gt; Claude only turns the sentence into a typed brief. Everything after that is plain TypeScript, so every decision can be tested, repeated and explained.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The diet gate.&lt;/strong&gt; This is where most of our arguments ended. It's seven lines:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;dietStanding&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;diet&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="kt"&gt;string&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;Pick&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&lt;/span&gt;&lt;span class="nc"&gt;GateProduct&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"claims"&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt; &lt;span class="s2"&gt;"allergens"&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nc"&gt;DietStanding&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;requirementOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;diet&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"free"&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"unsupported"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="s2"&gt;"unsupported"&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;kind&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"claim"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nf"&gt;hasClaim&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;claims&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;claim&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"free"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"no_claim"&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;factOf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;product&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;allergens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;req&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;code&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"declared_free"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"free"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"contains"&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"may_contain"&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="n"&gt;fact&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"unknown"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Only a product that &lt;strong&gt;declares&lt;/strong&gt; milk absent counts as safe for a milk allergy. "Lactose-free" is a different claim, so it can't satisfy an allergy. An empty field falls through to &lt;code&gt;"unknown"&lt;/code&gt;, never to &lt;code&gt;"free"&lt;/code&gt;. When a line comes back unknown for someone it could hurt, Lupa takes it out of the order and says why in plain words.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The kitchen signs its own rules.&lt;/strong&gt; The manager decides which agents may order, who may approve, and the limits per order and per week. One weekly limit counts &lt;em&gt;every&lt;/em&gt; agent the kitchen runs, from any vendor. The door recomputes it from every order it has accepted, so no agent can claim it didn't know.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;One approval, cryptographically bound.&lt;/strong&gt; The approval is an ES256 signature (WebCrypto) over the exact reasons on screen and the week's running total. Take one reason out after signing, or let the week grow past it, and the door refuses the order.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Answers leak, so the door never gives a number.&lt;/strong&gt; Agents ask all day. If the door returned exact stock figures, an agent polling it could rebuild a supplier's daily sales. In our simulation that worked for &lt;strong&gt;198 of 200 products.&lt;/strong&gt; Lupa's door signs a band instead: &lt;em&gt;covered, partly covered, not covered, unknown.&lt;/em&gt; The same agent could then read &lt;strong&gt;42 of 200.&lt;/strong&gt; That's smaller, not zero.&lt;/p&gt;

&lt;h3&gt;
  
  
  What we measured
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The same Claude agent placed 90 orders&lt;/strong&gt; from 30 synthetic kitchen requests. With Lupa's checks off, it broke a kitchen rule &lt;strong&gt;6 times&lt;/strong&gt;. Through Lupa: &lt;strong&gt;0&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;We tried 30 kinds of attack with valid signatures, 50 tries each:&lt;/strong&gt; 0 of 1,500 got through. That includes two agents splitting one order to slip under the weekly limit.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Single-character edits of a signed order:&lt;/strong&gt; 0 of 82,074 accepted.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Prompts it had never seen, scored strictly:&lt;/strong&gt; 23–25 of 40 judge-style requests and 16 of 40 hard dishes. Not perfect, and that's the honest number.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Demo
&lt;/h2&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/3WD2-8UR56Y" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Valio's own data:&lt;/strong&gt; the lactose-free trap, and the stock-leak simulation dropping from 198 to 42.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A real request,&lt;/strong&gt; priced live from Valio's API, with the working on every line.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Approval on a phone,&lt;/strong&gt; then the offline check: &lt;strong&gt;Accepted.&lt;/strong&gt; Remove one reason: &lt;strong&gt;Refused.&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An agent connecting over MCP:&lt;/strong&gt; the first order is placed, and the next is held because the week's limit is reached.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  What It Can't Do Yet
&lt;/h2&gt;

&lt;p&gt;We'd rather tell you than have you find out:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;It doesn't place real orders.&lt;/strong&gt; Valio has no order API yet, so an approved order is &lt;em&gt;prepared&lt;/em&gt; with Lupa's receipt and a person forwards it.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The door's key is a stand-in.&lt;/strong&gt; In production, Valio would run the door with its own key.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The kitchens are synthetic:&lt;/strong&gt; the rules, approvers and order history, plus the stock-out that triggers a substitute. Valio's API was their hackathon mock, which is live but not production.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The stock band still leaks.&lt;/strong&gt; 42 of 200 is better than 198, but it isn't zero.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Gemini agent run was recorded,&lt;/strong&gt; not live on stage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The code is private&lt;/strong&gt; because it works with partner data. Happy to walk anyone through it in the comments.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Partner Technologies
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Google Gemini API.&lt;/strong&gt; A permission door that only works for one AI vendor isn't a door; it's a feature. So we ran a &lt;strong&gt;second, independent buyer agent on Gemini&lt;/strong&gt;, connected through the same MCP and OpenAPI interface as our Claude agent.&lt;/p&gt;

&lt;p&gt;Then we set up the scenario Valio worried about most: two agents from two vendors, ordering for the same kitchen.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Each order alone&lt;/strong&gt; was within the rules and went through.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Together&lt;/strong&gt; they pushed the kitchen past its signed weekly limit, so &lt;strong&gt;the second order was held for a person.&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Neither agent knew about the other, and neither had to. That's when the design clicked for us: safety has to live in the door, not in any one agent's prompt. Gemini also composed the score for our project film.&lt;/p&gt;

&lt;p&gt;The rest of the stack is TypeScript, React, Hono, WebCrypto and three.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Hackathon Experience
&lt;/h2&gt;

&lt;p&gt;Junction fills an arena in Espoo with hackers, partner booths and mentors for a whole weekend. Coming from Kathmandu, the scale hit me the moment we walked in.&lt;/p&gt;

&lt;p&gt;What I'll keep:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The mentor queue on Friday night.&lt;/strong&gt; Five or six teams lined up for one tired Valio mentor, all asking versions of the same questions. Listening to the &lt;em&gt;other&lt;/em&gt; teams taught us as much as the answers did. It showed us what everyone else would build, and it pushed us to go deeper, not wider.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;1 a.m., the cut-off bug.&lt;/strong&gt; Our app kept telling caterers their order deadline had "passed" for deliveries weeks away. Valio's availability API only answers for its &lt;em&gt;earliest&lt;/em&gt; delivery day, and we were applying that day's cut-off to every date. Finding the real cause at that hour is oddly one of my favourite memories of the weekend.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;A team across two countries.&lt;/strong&gt; Half of us came from Kathmandu, and the other half had built a life in Finland. We argued about "trust" from very different angles, and Lupa is better for it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We didn't win a prize. We finished &lt;strong&gt;11th of 105&lt;/strong&gt; in the Valio Aimo track, on a golden ticket that started in Kathmandu. Representing Nepal in that room is something none of us will forget.&lt;/p&gt;

&lt;p&gt;The rule I brought home and now use everywhere: &lt;strong&gt;let the AI propose, let code decide, and make every decision checkable by anyone.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Thank you to my teammates Sandip, Afaf and Valeria, to the JunctionX Kathmandu organisers who sent us, to the Junction crew, and to the Valio Aimo team for a challenge with real teeth. 🇳🇵 🇫🇮&lt;/p&gt;




&lt;p&gt;&lt;em&gt;A note on how this was written: I used an AI assistant to help structure and edit this post. The project, the numbers and the story are ours.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>mlhacks</category>
      <category>devchallenge</category>
      <category>hackathon</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
