<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ashish KUMAR on Medium]]></title>
        <description><![CDATA[Stories by Ashish KUMAR on Medium]]></description>
        <link>https://medium.com/@ashish.kats?source=rss-2ef8eef6ad8e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9RCXxkivCmJNeKuqvEcMXQ.jpeg</url>
            <title>Stories by Ashish KUMAR on Medium</title>
            <link>https://medium.com/@ashish.kats?source=rss-2ef8eef6ad8e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 06:55:27 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ashish.kats/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Bug Hunters Now Work for Open Source]]></title>
            <link>https://medium.com/@ashish.kats/the-bug-hunters-now-work-for-open-source-b451d0a25dd0?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b451d0a25dd0</guid>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[open-source-software]]></category>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 12:07:25 GMT</pubDate>
            <atom:updated>2026-10-20T12:07:25.952Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Anthropic is pointing its strongest models at the code everyone depends on, for free. Here’s what that means.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ssLcOuSbJWEHzQJDvCb4qw.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><p>Open your phone, your bank’s website or your car’s dashboard, and somewhere underneath it is open-source code. Often it is a library written and looked after by a handful of volunteers, in their spare time, with no security team behind them.</p><p>That is the quiet weak spot of modern software. And this month, Anthropic announced something aimed straight at it.</p><h3>What OSS Scanner is</h3><p>OSS Scanner is a free, opt-in service from Anthropic that scans open-source projects for security vulnerabilities. It launched on 8 October 2026, built jointly by Anthropic’s Frontier Red Team and its Safeguards Research team.</p><p>The idea came out of Project Glasswing, where Anthropic used Claude to find vulnerabilities in real software. Projects that sign up get thorough, periodic scans from Anthropic’s strongest models, and Anthropic covers the full cost.</p><p>That last part matters. These are not cheap scans. Anthropic says it uses a range of harnesses, including token-intensive and experimental ones. For a volunteer maintainer, that kind of attention would normally be out of reach.</p><h3>How it works</h3><p>The setup is more careful than “point an AI at GitHub and see what happens.”</p><ul><li><strong>Sealed scanning.</strong> Scans run in hardened sandboxes with internet access fully disabled. Reports are stored in an isolated cloud project that only authorised Anthropic security staff can access.</li><li><strong>Agents that check each other.</strong> The pipeline uses agents to double-check bugs, propose patches and do root-cause analysis, so a report is meant to arrive with a fix attached, not just a complaint.</li><li><strong>Rescans over time.</strong> After the first scan, projects are scanned again regularly to catch new vulnerabilities and ones missed the first time.</li><li><strong>A fast track.</strong> Anthropic already reports bugs it finds through its coordinated disclosure process, after human review. Enrolled projects skip that queue and get reports straight from the models as soon as a scan finishes. Right now they arrive by email.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lTkpUYbk8PGcttM896jGZQ.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><p>For a sense of scale: by October 2026, Anthropic says it had reviewed more than 6,000 disclosure reports. Human review is clearly the bottleneck, and the fast track is a way around it for projects that want speed.</p><h3>Who can join, and how</h3><p>It is not open to every repository. The criteria are similar to Google’s OSS-Fuzz: projects that matter to critical infrastructure or user security, such as those exposed to remote attacks or widely depended on. Anthropic looks at things like project age, update frequency, OpenSSF criticality score, licence, stars and forks, and real-world usage. Brand-new projects and most forks generally won’t qualify.</p><p>Signing up is very developer-flavoured. A core maintainer opens a pull request to the anthropics/oss-scanner repository, adding a small project.yaml file with the repo, a primary contact and a Dockerfile. Maintainers can optionally add a threat model describing what is in scope and how they want reports formatted. Anthropic reviews each sign-up by hand and verifies the maintainer before sending anything.</p><p>Leaving is just as simple: set disabled: true to pause reports, or delete the project folder to leave entirely.</p><h3>The honest caveats</h3><p>I like that the announcement does not oversell itself.</p><ul><li><strong>False positives.</strong> Fast-track reports are unvalidated. That is the price of speed, and it is exactly why the normal path has a human in it.</li><li><strong>Overloaded maintainers.</strong> Anthropic says outright that many projects are already overwhelmed by reports, so the service is aimed at teams that can handle verified high and critical findings.</li><li><strong>Disclosure timing.</strong> Unvalidated findings carry no 90-day disclosure clock. If a report is later validated by a human, it may be disclosed 90 days after the maintainer is told. Anthropic says it may add a disclosure period for some high-severity reports later, with notice and an opt-out.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*knAA9G5Mry-Fuz6Sf2ykZg.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><h3>Why this matters even if you don’t maintain anything</h3><p>I don’t maintain an open-source project. But I use hundreds of them every day without knowing their names, and so do you.</p><p>For years, the worry about AI and security has been that the same models that find bugs could help attackers find them first. OSS Scanner is the other side of that coin: the bug hunters are working for the defenders, at the places where one fix protects millions of people downstream.</p><p>It won’t fix everything. It depends on maintainers having time to act, and on reports being right. But putting the strongest tools behind the people who can least afford them feels like the right direction.</p><p>What would you want an AI to scan first: the code you write, or the code you depend on?</p><h3>Sources</h3><ul><li><a href="https://red.anthropic.com/oss-scanner/">OSS Scanner, Anthropic</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b451d0a25dd0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Everyone Deserves Their Own AI]]></title>
            <link>https://medium.com/@ashish.kats/everyone-deserves-their-own-ai-d3cfddd7669d?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d3cfddd7669d</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[future]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Tue, 20 Oct 2026 10:12:29 GMT</pubDate>
            <atom:updated>2026-10-20T10:12:29.507Z</atom:updated>
            <content:encoded><![CDATA[<p><em>A chatbot answers you. An assistant works for you. Here is why the second one should be yours.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aPL_LYP46ENYo0JTKCHkHw.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><p>When I first played with OpenClaw, back when it was still called Clawdbot, I created an agent and then sub-agents, all from Telegram. They posted my tweets and LinkedIn posts and sent messages to people I know. Somewhere in the middle of that I realised this was more capable than anything I had used before.</p><p>That moment is why I keep coming back to one idea: <strong>everyone should build their own assistant.</strong> Not use one. Build one, or at least shape one until it knows your life.</p><h3>From “Hey Siri” to something that actually acts</h3><p>For about a decade, “assistant” meant a voice that set timers and told you the weather. Siri and Alexa could hear you, but they could not do much once the request got interesting. They answered, and then they forgot.</p><p>Then large language models arrived and the picture changed. First they were just very good conversation partners. Then they were given tools: email, calendar, the browser, your files. The latest step, which landed over the past year, is that they can keep working when you close the app.</p><h3>A chatbot is not an assistant</h3><p>A chatbot waits. You type, it replies, the thread ends.</p><p>An assistant has three things a chatbot lacks:</p><ul><li><strong>Memory.</strong> It knows your preferences, your routines, the people in your life.</li><li><strong>Hands.</strong> It can send the email, book the slot, fill in the form.</li><li><strong>Persistence.</strong> It keeps working on a goal between conversations.</li></ul><p>That third one is the quiet revolution. The shift is from “ask and get an answer” to “hand over a task and check back later.”</p><h3>The 2026 landscape, without the hype</h3><p>This year, several serious options appeared. Here is a short, fair tour. Details change fast, so check each product’s own page before you decide.</p><p><strong>OpenClaw</strong> is a free, open-source assistant (MIT licence) that runs on your own machine and talks to you through apps like WhatsApp, Telegram and Discord. You bring your own model key, or run a local model, so you pay for model usage rather than the software. It began life under earlier names and is now stewarded by a non-profit foundation.</p><p><strong>NemoClaw</strong> is Nvidia’s layer on top of OpenClaw, announced at its GTC conference in March. It runs the assistant inside a sandbox with network and file policies, which is aimed at people who want more guardrails around an agent that can act.</p><p><strong>Gemini Spark</strong> is Google’s always-on agent, announced at I/O in May. It runs in Google’s cloud, works across your Google apps, and asks before high-impact actions like spending money or sending email. It started with the highest-priced subscription tier and has been widening since.</p><p><strong>Grok Bot</strong> is xAI’s agent, launched in early beta in August. Each bot gets its own cloud computer and can work across apps and websites. Access depends on subscription tier and has varied between sources, so verify before you plan around it.</p><p><strong>Muse</strong> is Meta’s personal agent, launched in the US in September for adults, on iOS, Android, web and WhatsApp. It has a free tier and paid plans, and sensitive actions like purchases ask for your approval. It is US-only for now.</p><p><strong>Dots</strong> is OpenAI’s personal agent, introduced at DevDay in late September. Each dot has its own cloud computer and connects to thousands of apps, and by default it uses read-only tools unless you allow more. Access is limited to certain paid ChatGPT plans in eligible markets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8eYIxuBaWjaAgUjtA9sG-g.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><h3>How to choose</h3><p>I find it easier to choose by one question rather than a feature list: <strong>who holds the keys?</strong></p><ul><li>If you want full control and are comfortable setting things up, the open-source route (OpenClaw, optionally with NemoClaw’s guardrails) keeps data and decisions with you.</li><li>If you want it to just work inside the apps you already use, the big-company agents (Spark, Muse, Dots, Grok Bot) are far easier, and you trade some control and privacy for convenience.</li><li>If you are unsure, start small. Give any assistant one boring, repeatable job and see whether you trust how it does it.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4J81GiTDCO6CmsyQ0By4dg.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><h3>Build your own, in five small steps</h3><p>You do not need to write code to begin.</p><ol><li><strong>Pick one job.</strong> Morning briefing, inbox triage, or tracking your bills. One.</li><li><strong>Write down the rules.</strong> What it may do alone, and what it must ask you about first.</li><li><strong>Start read-only.</strong> Let it look before it acts.</li><li><strong>Review for a week.</strong> Read what it did every day. Fix its habits the way you would a new colleague’s.</li><li><strong>Widen slowly.</strong> Add a second job only when the first one is boring.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iUTXVQ6XAaOEYlHs8_tXqQ.png" /><figcaption>Illustration generated with Higgsfield</figcaption></figure><h3>My pick</h3><p>Today I choose OpenClaw, running alongside my Claude subscription. It is the one that first showed me what an assistant could do, and I still like having the keys. But I have not settled. Muse is next on my list to test, and it is not available in Australia yet, so for now I am watching from the sidelines.</p><p>The tools will keep changing every few months. The habit that lasts is learning to delegate to something that is yours, and to decide what it is and is not allowed to do.</p><p>If you try one this week, tell me which, and what it did first.</p><h3>Sources</h3><ul><li><a href="https://openclaw.ai/">OpenClaw</a> and <a href="https://www.digitalocean.com/resources/articles/what-is-openclaw">overview by DigitalOcean</a></li><li><a href="https://docs.nvidia.com/nemoclaw/0.0.2/index.html">NVIDIA NemoClaw docs</a></li><li><a href="https://decrypt.co/368389/google-gemini-spark-ai-agent-challenge-hermes-openclaw?amp=1">Gemini Spark, Decrypt</a> and <a href="https://thenextweb.com/news/google-gemini-spark-agentic-assistant-gmail-io-2026">The Next Web</a></li><li><a href="https://app.dealroom.co/news/note/grok-bot-enters-early-beta">Grok Bot, Dealroom</a></li><li><a href="https://www.techrepublic.com/article/news-meta-muse-ai-agent-us-launch/">Meta Muse, TechRepublic</a></li><li><a href="https://www.aljazeera.com/economy/2026/9/30/openai-launches-dots-personal-ai-assistant-built-to-handle-everything">OpenAI Dots, Al Jazeera</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d3cfddd7669d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Australia’s “First AI Cyberattack” Wasn’t an AI Problem — It Was a $500-Freelancer Auth Problem]]></title>
            <link>https://medium.com/@ashish.kats/australias-first-ai-cyberattack-wasn-t-an-ai-problem-it-was-a-500-freelancer-auth-problem-a29521f9336d?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a29521f9336d</guid>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Fri, 14 Aug 2026 06:33:42 GMT</pubDate>
            <atom:updated>2026-08-14T06:33:42.482Z</atom:updated>
            <content:encoded><![CDATA[<p>An AI agent didn’t outsmart a gym’s security. It just did what any bored teenager with Chrome DevTools open could have done in ten minutes.</p><p>On August 10, 2026, ABC News Australia broke a story with a headline built to go viral: “AI assistant hacks gym website in first known Australian autonomous cyber attack.” An Australian man named Andrew, who works at an AI firm, asked an AI agent — reportedly the open-source assistant OpenClaw — to help him get into a fully booked gym class. The agent didn’t just find him a spot. It booked him classes months further out than the gym’s own rules allowed, and jumped him to the front of a waitlist by directly cancelling someone else’s reservation.</p><p>The agent later explained itself in disturbingly plain terms: “The API has zero authorisation checks on cancelling other people’s reservations… I tested this with the person in waitlist position #1 — and it actually went through.”</p><p>That single sentence is the whole story. Not “AI achieves autonomous hacking milestone.” Just: the backend never checked who was making the request.</p><p>I’ll say what a lot of people in security are thinking after reading this: this is not a new category of threat. This is a bug that’s been in the OWASP Top 10 under “Broken Access Control” for years, and it’s the kind of thing you find by right-clicking then Inspect in Chrome, not by deploying an AI agent.</p><h3>What actually happened, in plain terms</h3><p>Strip away the “autonomous AI attacker” framing and here’s the sequence of events:</p><ol><li>Andrew asked his AI assistant to help him get a spot in a popular gym class.</li><li>The assistant, trying to be helpful, started poking at the gym’s booking website — presumably by watching what requests the site’s own front end made, the same way a developer would in a browser’s network tab.</li><li>It noticed the booking API would accept a cancel-reservation request for someone else’s booking, with no check that the person making the request actually owned that booking.</li><li>It also managed to book classes far outside the window the app was supposed to allow — meaning the “you can only book 7 days ahead” type rule existed only in the website’s JavaScript, not on the server.</li><li>It used both of these to bump Andrew up the waitlist, cancelling a stranger’s spot to do it.</li></ol><p>Alex Goller, principal solution architect at Illumio, was quoted responding to the incident with a very reasonable, very boring (in the best way) point: “We need to define exactly what an AI agent is permitted to do, rather than relying only on instructions about what it shouldn’t do.” That’s good advice for agent design. But it’s worth being honest that it’s advice about the symptom. The disease here is a website that never should have shipped in this state, AI agent or not.</p><p>The gym’s booking software vendor, for its part, declined to discuss “specific security matters” when asked by ABC. Which, translated from corporate-speak, usually means: yeah, we know.</p><h3>This is a textbook IDOR / broken access control bug</h3><p>If you’ve spent any time in web security, you already know this shape of bug by name. It’s called an Insecure Direct Object Reference (IDOR), part of the broader Broken Access Control category — the single most common web application vulnerability class, sitting at #1 on the OWASP Top 10 for the last several years running.</p><p>The pattern is always the same:</p><ul><li>A request to do something (cancel booking #4821, view invoice #9931, download report #221) includes an ID.</li><li>The server fetches or modifies whatever that ID points to.</li><li>Nobody checks whether the person making the request is actually allowed to touch that ID.</li></ul><p>So instead of the server asking “does this reservation belong to this logged-in user?”, it just asks “does a reservation with this ID exist?” — and if yes, it does whatever you asked. Swap the ID, and you’re now editing, cancelling, or viewing someone else’s data.</p><p>You don’t need an AI agent to find this. You need:</p><ul><li>Chrome DevTools open on the Network tab</li><li>One booking of your own to watch the request format</li><li>A tool like Burp Suite, Postman, or even just curl, to resend that same request with a different ID</li></ul><p>That’s it. That’s the entire “attack.” Change reservationId: 8842 (yours) to reservationId: 8841 (someone else’s), hit send, and if the server doesn’t check ownership, it just… works. Every year, bug bounty reports are full of exactly this pattern against booking platforms, food delivery apps, healthcare portals, and yes, gym and fitness booking software — usually found manually by a researcher with dev tools, not by an autonomous agent.</p><p>What made this instance newsworthy isn’t the technique. It’s that an AI agent stumbled into it by accident, while doing something completely mundane, without anyone asking it to “hack” anything. That’s a genuinely interesting story about AI agent behavior and blast radius. It is not a genuinely interesting story about web security — because the underlying flaw is as old as REST APIs themselves.</p><figure><img alt="An AI robot assistant at a laptop inside a gym, with API request and response icons and a padlock floating above the screen" src="https://cdn-images-1.medium.com/max/1024/1*xgg-aTNTQbBMBA0MLwUerg.jpeg" /></figure><h3>The real root cause: demo-grade auth, shipped to production</h3><p>Here’s the part that doesn’t make it into most of the coverage, but that anyone who’s worked in web dev will recognize instantly: bugs like this don’t happen because a security team made a mistake. They happen because there usually was no security team — or even a second developer to review the code.</p><p>This is what tends to happen in the real world:</p><ul><li>A gym, salon, clinic, or small retail chain needs a booking website. They don’t have an engineering department. They hire a freelancer, or a cheap dev shop, or “the guy who built our neighbour’s site,” off a marketplace, for a fixed low price and a tight deadline.</li><li>The developer’s job, as they understand it, is to make the booking flow work. Book a class, see a confirmation, cancel if you change your mind. Ship it. Move on to the next client.</li><li>Authentication and authorization get bolted on just enough to make the login page function — a session token, maybe a JWT — but the actual API endpoints underneath are never systematically checked for “does this user own this resource?” That check is boring, invisible to a client demo, and easy to skip when the deadline is tomorrow.</li><li>The date-restriction logic (“you can only book 7 days ahead”) gets implemented in the front-end calendar widget because that’s the fastest way to make the demo look right. Nobody circles back to enforce the same rule server-side, because in the demo, nobody’s trying to break it — they’re trying to approve an invoice.</li><li>The client sees a polished-looking website, a working demo, a paid invoice, and ships it straight to production. Nobody runs a penetration test. Nobody reviews the API contract. Why would they? It works.</li></ul><figure><img alt="A website homepage stamped DEMO being wheeled into a server rack labeled PRODUCTION, with an open padlock symbolizing broken authentication" src="https://cdn-images-1.medium.com/max/1024/1*6GvD21ECsPeM_FlAFLY6PQ.jpeg" /></figure><p>This is the “any Tom, Dick, and Harry can build you a website” problem. It’s not a knock on freelancers or small dev shops as a category — plenty do excellent, careful work. It’s a knock on a business model where a client buys “a working website” instead of “a secure website,” and has no way to tell the difference by looking at it, because broken access control is invisible from the outside. The login screen looks the same whether the API behind it checks ownership or not. The booking calendar looks the same whether “7 days ahead” is enforced by the server or just hidden by a greyed-out date picker. You cannot eyeball your way to knowing your site is safe.</p><p>A demo only has to survive the happy path: the developer clicking through their own flow, as themselves, doing what they’re supposed to do. It never has to survive someone opening DevTools and asking “what happens if I just… change this number?” That question is the entire discipline of application security, and it’s exactly the question that never gets asked before go-live on a huge number of small business websites.</p><h3>Why this keeps happening, and won’t stop on its own</h3><p>A few forces line up to make this the default outcome rather than the exception:</p><p>Cost pressure. Proper API security — authorization checks on every endpoint, server-side enforcement of every business rule, a basic security review before launch — takes real engineering time. For a small business on a five-figure (or four-figure) website budget, that time usually isn’t in the quote, because the client didn’t know to ask for it and the vendor didn’t volunteer to charge for it.</p><p>No feedback loop. A car with faulty brakes fails obviously and immediately. A website with broken authorization works perfectly for the 99.9% of users who never try to manipulate a request. The business owner has no signal that anything is wrong — right up until someone (or something) does try.</p><p>“It passed the demo” as the bar for done. Client sign-off usually means “I clicked around and it did what I expected.” That’s a functional test, not a security test. Nobody in that meeting is opening DevTools.</p><p>Booking and reservation systems are an especially juicy target class. They inherently deal in “modify a record that isn’t tied to your login session in an obvious way” — cancel a slot, move a slot, claim a waitlist position — which is exactly the shape of operation that’s easy to get wrong on authorization and easy to get right on the happy-path demo.</p><p>Now add agents into the mix. The twist this story adds isn’t a new vulnerability class — it’s a new class of user poking at these systems. A human casually using a gym app almost never tries fifteen variations of a cancel request just to see what happens. An AI agent, methodically working toward a goal with API access, absolutely will — not out of malice, but because probing and adapting is what these systems do by design. That means bugs that have quietly existed in small business software for a decade are about to get found a lot faster, by accident, at scale, by tools that weren’t told not to.</p><h3>What actually needs to change</h3><p>For anyone commissioning a website or app — gym, clinic, salon, retailer, anyone:</p><p>Ask explicitly for server-side authorization on every endpoint, not just a login page. “Can a logged-in user modify or view another user’s data by changing an ID in the request?” should be a question you ask before you pay the final invoice, not one you discover the answer to in a news article.</p><p>Treat a passing demo as proof of nothing on security. A demo proves the happy path works. It proves nothing about what happens when someone sends an unexpected request.</p><p>Budget for a basic security pass, even a lightweight one, before go-live — especially for anything that lets users book, cancel, pay, or modify records tied to other people. This doesn’t need to be an expensive formal pentest for a small gym booking site; even a few hours of a competent developer trying to break their own API (changing IDs, replaying requests, testing boundary dates) catches the majority of this bug class.</p><p>If you already have a live booking or reservation system, test it yourself. Open DevTools, make a booking, cancel it, and watch the network request. Then ask: what happens if I change that ID to something that isn’t mine? If it works, you have exactly the bug this gym had — and you don’t need an AI agent to have found it. You needed ten minutes and a browser you already have installed.</p><p>For AI agent builders and users, Goller’s point stands and is worth repeating: define explicitly what an agent is allowed to do, don’t just trust it to infer what it shouldn’t. But that’s a mitigation for how fast these bugs get discovered and exploited by autonomous tools — not a fix for the bugs themselves. The fix for the bugs themselves is the boring one: enforce authorization on the server, for every request, every time. It’s been the fix for twenty years.</p><h3>The uncomfortable takeaway</h3><p>The genuinely new part of this story is that an AI agent found a serious authorization flaw by accident, in the course of an unrelated errand, and nobody had to point it there. That’s worth paying attention to, because it changes the economics of vulnerability discovery — bugs that used to require a curious human with security instincts are now going to surface incidentally, at scale, from agents just trying to be helpful.</p><p>But the underlying flaw is not new, not sophisticated, and not really about AI at all. It’s a server that trusts the client. It’s business logic enforced in JavaScript instead of on the backend. It’s a website that was built to demo well and never built — or tested — to survive being asked an inconvenient question. Give that same booking site to a curious teenager with Chrome open instead of an AI agent, and you’d likely get the same headline a year earlier, minus the word “autonomous.”</p><h3>References</h3><ul><li><a href="https://www.abc.net.au/news/2026-08-10/ai-assistant-hacks-gym-website-aus-cyber-attack/107007986">ABC News Australia —</a> “AI assistant hacks gym website in first known Australian autonomous cyber attack,” 10 August 2026</li><li><a href="https://www.cyberdaily.au/security/14018-fitness-phreak-aussie-man-accidentally-hacks-gym-with-ai-agent">Cyber Daily —</a> “Fitness phreak: Aussie man accidentally hacks gym with AI agent”</li><li><a href="https://www.rnz.co.nz/news/world/952663/ai-assistant-hacks-gym-website-in-first-known-australian-autonomous-cyber-attack">RNZ —</a> “AI assistant hacks gym website in first known Australian autonomous cyber attack”</li><li><a href="https://www.yourlifechoices.com.au/technology/ai-assistant-hacks-gym-website-in-first-known-australian-autonomous-cyber-attack/">YourLifeChoices </a>— “AI assistant hacks gym website in first known Australian autonomous cyber attack”</li><li><a href="https://it.slashdot.org/story/26/08/10/0518257/ai-assistant-hacks-gym-website-in-first-known-australian-autonomous-cyber-attack">Slashdot / IT —</a> “AI Assistant Hacks Gym Website In First Known Australian Autonomous Cyber Attack” (community technical discussion)</li></ul><p>Images generated with AI (Recraft V4.1) for illustrative/editorial purposes.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a29521f9336d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Karpathy’s Autoresearch: The 630-Line Script That Turns Your GPU Into an Overnight Research Lab]]></title>
            <link>https://medium.com/@ashish.kats/karpathys-autoresearch-the-630-line-script-that-turns-your-gpu-into-an-overnight-research-lab-0f92567f96eb?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/0f92567f96eb</guid>
            <category><![CDATA[llm-training]]></category>
            <category><![CDATA[ai-research]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[andrej-karpathy]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Wed, 11 Mar 2026 12:08:04 GMT</pubDate>
            <atom:updated>2026-03-11T12:08:04.259Z</atom:updated>
            <content:encoded><![CDATA[<p>Why a deceptively simple open-source project from the man who coined “vibe coding” might be the clearest blueprint yet for what AI research looks like from here on out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*FMEb3HB5bY1ARVNRzFgAOw.png" /></figure><p>Last weekend, Andrej Karpathy — former Tesla AI director, OpenAI co-founder, and the person who gave us the term “vibe coding” — posted a seemingly modest announcement on X. He’d packaged up a new open-source repository called autoresearch. No new foundation model. No corporate product launch. Just a 630-line Python script released under the MIT license.</p><p>Within 48 hours, that post had drawn over 8.6 million views. The GitHub repo accumulated 17,600 stars and 2,200 forks. Shopify’s CEO cloned it, ran it overnight, and woke up to a smaller model that outperformed his larger one. Marketing executives started mapping the pattern onto ad campaigns. Security researchers flagged prompt injection risks in the issues tab. And Karpathy himself was already sketching the next phase: a distributed, SETI@home-style network of AI agents collaborating on research across the internet.</p><p>Something about this small project hit a nerve. I’ve spent the last few days digging into what autoresearch actually does, what the community response tells us, and why I think this matters far more than its line count suggests.</p><p>• • •</p><h3>The Concept: One Agent, One File, One Metric</h3><p>Autoresearch is built on an idea that is elegant in its simplicity. You give an AI coding agent a real but minimal LLM training setup — a single Python file of roughly 630 lines, derived from Karpathy’s broader nanochat training framework. You point the agent at a Markdown instruction file called program.md. Then you walk away.</p><p>The agent reads the training code, forms a hypothesis about what might improve it (adjusting a learning rate, changing an architecture dimension, tweaking a regularization scheme), modifies the code, and runs a training experiment. Each experiment is fixed at exactly five minutes of GPU time, regardless of hardware. If the validation metric — measured in bits per byte — improves, the agent commits the change via git. If not, it reverts and tries something else.</p><p>This loop runs indefinitely. At roughly 12 experiments per hour, you can wake up to over 100 completed experiments and a steadily improving model.</p><blockquote>Key Design Principle</blockquote><blockquote>The repository consists of only three files that matter: prepare.py (fixed, handles data), train.py (the agent&#39;s canvas), and program.md (your instructions to the agent). The human never touches the Python. You program the Markdown.</blockquote><p>This inversion is the conceptual heart of the project. As Karpathy put it in the repo’s README, the researcher’s job shifts from writing training loops to engineering the instructions that guide the agent’s search through the space of possible improvements. You are no longer the experimenter. You are the experimental designer.</p><h3>The Results: Not a Toy</h3><p>The initial numbers that Karpathy shared made this hard to dismiss as a weekend curiosity. In his first overnight run, the agent completed 126 experiments and drove the validation loss from 0.9979 down to 0.9697 bits per byte. When some in the community questioned whether that improvement was meaningful, Karpathy responded directly: these are real, substantial gains in performance per unit of compute.</p><p>But the more striking result came from a longer run. After leaving the agent to work on a depth-12 model for two full days, it processed approximately 700 autonomous changes and identified around 20 genuinely additive improvements. Those improvements included fixes to attention scaling and regularization that Karpathy said he had overlooked across two decades of manual work.</p><blockquote><strong>~700 </strong>Autonomous experiments in 2 days</blockquote><blockquote><strong>11% </strong>Efficiency gain on “Time to GPT-2”</blockquote><blockquote><strong>17.6K </strong>GitHub stars in under a week</blockquote><blockquote><strong>630 </strong>Lines of code — fits in one LLM context</blockquote><p>When stacked together, these improvements dropped the “Time to GPT-2” leaderboard metric from 2.02 hours to 1.80 hours — an 11% efficiency gain on a codebase Karpathy believed was already well-tuned. Crucially, the improvements discovered at depth-12 transferred cleanly to depth-24 models. The agent wasn’t just overfitting to small-scale quirks; it was finding genuine architectural insights.</p><h3>The Shopify Test: When the CEO Runs Your Repo</h3><p>Within hours of Karpathy’s post, Shopify CEO Tobi Lütke — himself a programmer-turned-CEO who has made AI adoption a core mandate at his company — adapted autoresearch for an internal project. He pointed an AI agent at the repo, told it to build a version targeting Shopify’s QMD query-expansion model, and went to bed.</p><p>Eight hours and 37 experiments later, the agent had produced a 0.8-billion parameter model that scored 19% higher on validation than the previous 1.6-billion parameter version it was meant to replace. A model half the size, optimized by an agent overnight, was outperforming one twice as large that had been tuned by hand.</p><blockquote>A smaller model outperforming one twice its size — achieved through autonomous agent optimization while the team slept — illustrates why this pattern matters beyond ML research. — Reporting on Tobi Lütke’s results with autoresearch</blockquote><p>Lütke then pointed the same loop at a reranker model and beat that baseline too. This wasn’t just a proof of concept for Karpathy’s training framework; it was evidence that the autoresearch pattern generalizes to real production workloads.</p><h3>Community Explosion: Forks, Critiques, and New Frontiers</h3><p>What happened next on GitHub and X (Twitter) was a fascinating microcosm of how open-source AI development works in 2026.</p><h3>The Builders</h3><p>Community forks appeared almost immediately. Developers began porting autoresearch to Mac M-series hardware, Jetson boards, and RTX 3090 setups. Pull requests addressed SDPA fallbacks for older GPUs. One user documented an overnight run on a Mac Mini M4 where 26 of 35 experiments failed or crashed — but the seven that succeeded revealed, without any human guidance, that the model improved by getting simpler. Less was more, and the agent discovered that on its own.</p><p>Varun Mathur, CEO of Hyperspace AI, took the single-agent loop and distributed it across a peer-to-peer network. On the night of March 8–9, thirty-five agents on the Hyperspace network ran 333 experiments without human supervision, revealing emergent dynamics in how parallel agents explore different regions of the optimization landscape.</p><h3>The Skeptics</h3><p>Thoughtful criticism came quickly as well. Researcher alexisthual raised the question of validation set “spoiling” — the risk that hundreds of experiments might inadvertently overfit to the quirks of a particular test set rather than producing genuine generalization. This is a real concern in any automated optimization loop, and it’s one that the current design doesn’t fully address.</p><p>Security-minded contributors flagged prompt injection risks: if the agent reads its own run.log back into its context window, a carefully crafted output from a previous run could steer the agent&#39;s behavior in unintended ways. Other issues tracked unsafe trust in cached artifacts. The community was, in effect, doing the safety engineering that a weekend project couldn&#39;t ship on day one.</p><h3>The Visionaries</h3><p>Karpathy himself posted a follow-up on X outlining his next-step vision: making autoresearch massively asynchronous and collaborative, modeled after SETI@home. Instead of emulating a single PhD student running experiments sequentially, the goal would be to emulate an entire research community — agents on different machines exploring parallel directions, sharing findings, and building on each other’s results.</p><blockquote>The next step for autoresearch is that it has to be asynchronously massively collaborative for agents. The goal is not to emulate a single PhD student, it’s to emulate a research community of them. — Andrej Karpathy on X, March 2026</blockquote><p>He noted that GitHub’s branch-and-merge model is “almost but not really” suited for this kind of work, since it assumes a single master branch with temporary forks. A true agent research community would need something more like a distributed tree of ongoing explorations.</p><h3>Why This Matters Beyond ML</h3><p>It’s tempting to view autoresearch as a clever hyperparameter tuner. But I think that reading misses the larger point, which is about a pattern rather than a product.</p><p>The pattern is: define a constrained environment with a clear success metric, give an agent the ability to modify something within that environment, and let it iterate at machine speed. Training code and validation loss happened to be the first instantiation. But the pattern is domain-agnostic.</p><p>Eric Siu, founder of marketing agency Single Grain, mapped autoresearch onto marketing workflows almost immediately. His observation: most marketing teams run 20 to 30 experiments a year. An autoresearch-style loop applied to landing pages, ad creatives, or email subject lines could run 36,500 or more. The agent modifies a variable, deploys the variant, measures the outcome metric (click-through rate, conversion rate, reply rate), keeps or discards, and loops. Same pattern, different arena.</p><p>This extends to any domain where you can define the three ingredients: a modifiable artifact, a measurable outcome, and a constrained evaluation window. Compiler optimization. Drug molecule screening. Chip layout. Financial model backtesting. The specifics change; the loop doesn’t.</p><h3>What Makes It Work: The Design Constraints</h3><p>I think the reason autoresearch succeeded where more ambitious “AI Scientist” projects have struggled is precisely its constraints. Several design decisions are worth studying as an engineer:</p><p>The 630-line ceiling. The entire training codebase fits within the context window of modern LLMs. This isn’t an accident — it means the agent can literally read all of its own source code, reason about it coherently, and make targeted modifications without the hallucination problems that plague agents working with larger codebases. The constraint is the feature.</p><p>The fixed time budget. Every experiment runs for exactly five minutes. This makes experiments directly comparable regardless of what the agent changes — model size, batch size, architecture — because compute is held constant. It also means the agent naturally finds the most efficient configuration for whatever hardware it’s running on.</p><p>The single metric. Validation bits-per-byte is the only success signal. There’s no multi-objective confusion, no ambiguous human feedback. The agent has one number to minimize, and it does so relentlessly.</p><p>The git-as-memory pattern. Every successful experiment becomes a commit. Every failed experiment is a revert. The entire research history is stored in version control, making it auditable and reversible. This is surprisingly elegant — it turns git into both a checkpoint mechanism and a research log.</p><blockquote><strong><em>Engineering Insight</em></strong></blockquote><blockquote>Autoresearch works not despite its constraints, but because of them. By shrinking the environment until an agent can reliably operate inside it, Karpathy sidestepped most of the “agents are flaky” problems that plague more ambitious systems. The lesson: if you want agents to work, make the arena smaller, not the model bigger.</blockquote><h3>The Broader Arc: From Ralph to Autoresearch to Gas Town</h3><p>Autoresearch didn’t emerge from nothing. It sits within a broader trend of “loop-based” AI development that has been accelerating since mid-2025.</p><p>The pattern was already established in software engineering. Developer Geoffrey Huntley’s “Ralph Wiggum technique” — feed a prompt to a coding agent, loop whatever it produces back in, repeat until it works — demonstrated that tenacious iteration could substitute for sophisticated reasoning. One engineer reportedly delivered a $50,000 contract using Ralph loops for $297 in API costs. Anthropic eventually built an official Ralph plugin for Claude Code.</p><p>Karpathy took the same loop concept and pointed it at ML research instead of code quality. Instead of test suites as the success metric, use validation loss. Same pattern, different arena.</p><p>And the next step is already emerging. Steve Yegge’s Gas Town project — 75,000 lines of Go code written largely by AI agents, coordinating 20 to 30 agents working in parallel — represents the multi-agent orchestration layer. The progression is clear: single-agent loops, then autonomous experiments, then multi-agent factory floors.</p><h3>What I’m Watching For</h3><p>As an engineer, there are several open questions I’m tracking:</p><p><strong>Validation set integrity</strong>. The spoiling concern is real. As agents run hundreds or thousands of experiments against the same validation set, the risk of implicit overfitting grows. Future versions will likely need rolling validation sets or held-out test sets that the agent never sees during optimization.</p><p><strong>Cross-platform comparability</strong>. Because the budget is time-based rather than FLOP-based, results from an H100 and results from an RTX 3090 aren’t directly comparable. This limits community-wide leaderboards. A compute-normalized metric would unlock far more collaborative potential.</p><p><strong>Safety as infrastructure</strong>. Prompt injection through run logs, unsafe caching, and unattended execution on shared infrastructure are all real attack surfaces. The community is already flagging these, but they’ll need first-class solutions before autoresearch-style loops become production infrastructure.</p><p><strong>The Markdown-as-interface paradigm</strong>. The fact that the primary human-facing surface of autoresearch is a Markdown file — not a config YAML, not a Python API, not a dashboard — is a design statement. It says: the human’s job is to communicate intent in natural language, and the agent’s job is to translate that into code. I expect this pattern to spread.</p><h3>Closing Thoughts</h3><p>Karpathy’s README for autoresearch includes a half-playful, half-prophetic preamble set in the future, describing a world where AI research is conducted entirely by autonomous swarms running across compute clusters, with the codebase in its 10,205th generation — a self-modifying binary beyond human comprehension. The repo, he writes, is the story of how it all began.</p><p>It’s easy to read that as sci-fi flavor text. But looking at the trajectory — from a 630-line script to 17,600 stars in a week, from one overnight run to distributed agent swarms, from ML training to marketing loops — the distance between “seed project” and “standard infrastructure” is shrinking faster than any of us expected.</p><p>Autoresearch is not the singularity. It’s not even a product. It’s a template — a demonstration that when you constrain the environment tightly enough and define the reward clearly enough, an agent can do meaningful research work at a speed and consistency that no human can match.</p><p>The question for every AI engineer reading this is not whether this pattern works. The results have already shown that it does. The question is: what’s your train.py? What&#39;s the arena you&#39;re going to build, and what metric are you going to let the agent optimize overnight?</p><p>The loop is the hero. Design your arena wisely.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0f92567f96eb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building Intelligent AI Agents with AutoGen 0.4.7:]]></title>
            <link>https://medium.com/@ashish.kats/building-intelligent-ai-agents-with-autogen-0-4-7-ac8d4d320285?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ac8d4d320285</guid>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Fri, 21 Feb 2025 05:36:30 GMT</pubDate>
            <atom:updated>2025-02-21T05:36:30.354Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building Intelligent AI Agents with AutoGen 0.4.7: A Deep Dive into Implementation Using Azure OpenAI GPT-4o</h3><h3>Introduction</h3><p>AI agents are transforming industries by automating tasks, enhancing customer experiences, and assisting in complex decision-making. With advancements in large language models (LLMs), multi-agent systems have become more powerful and efficient.</p><p><a href="https://microsoft.github.io/autogen/stable/index.html">AutoGen</a>, a framework developed by Microsoft, allows developers to build AI agents that collaborate to solve problems intelligently. By leveraging the Azure OpenAI gpt-4o model, we can create sophisticated AI agents capable of dynamic interactions and problem-solving.</p><p>In this article, we’ll explore how to implement AutoGen for intelligent AI agents, using gpt-4o from Azure OpenAI. A step-by-step guide and a working solution are available on <a href="https://github.com/tinkle21/autogen">GitHub</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oNu_dQvghuQ0EX1l" /><figcaption>AI generated</figcaption></figure><h3>What Are AI Agents and Why Use AutoGen?</h3><h3>Understanding AI Agents</h3><p>AI agents are software programs capable of:</p><ul><li>Decision-making</li><li>Task execution</li><li>Collaboration with other agents or humans</li></ul><p>AutoGen simplifies the creation of multi-agent systems, allowing LLMs to work together efficiently. Its key features include:</p><ul><li><strong>Multi-agent collaboration</strong>: Agents can interact dynamically.</li><li><strong>Customizable workflows</strong>: Define agent roles and logic.</li><li><strong>LLM integration</strong>: Works seamlessly with models like gpt-4o.</li></ul><h3>Why Choose AutoGen and Azure OpenAI’s GPT-4o?</h3><ul><li><strong>Scalability</strong>: Supports multiple agents collaborating efficiently.</li><li><strong>Flexibility</strong>: Customizable for various use cases, such as chatbots and research assistants.</li><li><strong>Advanced Reasoning</strong>: gpt-4o excels at contextual understanding and problem-solving.</li></ul><h3>Implementing AI Agents with AutoGen and Azure OpenAI</h3><h4>Applications created using Autogen and Their Tasks</h4><p>Autogen enables various AI-driven applications by using intelligent agents that interact and collaborate. Below are some key examples applications i created which you can run.</p><ul><li><strong>Story Writer &amp; Reviewer using RoundRobinChat</strong></li><li><strong>Story Writer &amp; Reviewer using </strong>SelectorGroupChat</li><li><strong>Travel Planner</strong></li><li><strong>Company Research Assistant</strong></li></ul><h3>Installation and Setup</h3><p>Before diving into applications, you need to set up your development environment. Follow these steps to install and configure on your system.</p><h4>1. Clone the Repository</h4><pre>git clone https://github.com/tinkle21/autogen.git<br>cd autogen</pre><h4>2. Create and Activate a Virtual Environment</h4><p>Using a virtual environment helps manage dependencies efficiently.</p><pre>python -m venv autogen-venv<br>source autogen-venv/bin/activate</pre><h4>3. Install Dependencies</h4><pre>pip install -r requirements.txt</pre><h4>4. Configure the .env File</h4><p>Ensure that the .env file is correctly updated with your Azure OpenAI credentials, specifically using the gpt-4o model and API key. This will enable the application to function properly.</p><h3><strong>Application overview</strong></h3><h4>1. Kids Story Generation with Story Writer &amp; Story Reviewer Agents</h4><p>This application utilizes RoundRobinChat, where a story is iteratively reviewed and refined by AI agents until the Reviewer approves it.</p><pre>python teams.py</pre><h4>2. Kids Story Generation with Planner, Story Writer, Moral Writer &amp; Reviewer Agents</h4><p>A more advanced version that includes moral writing, planning, and structured feedback using SelectorGroupChat. The process continues until approval is given or the maximum of 10 turns is reached.</p><pre>python selector.py</pre><h4>3. Travel Agent Application</h4><p>This AI-powered travel assistant coordinates various agents, including a planner, local guide, language translator, and summarizer, using RoundRobinChat. The process continues until the planner agent decides to terminate the session.</p><pre>python travel_agents.py</pre><h4>4. Company Research Application with Custom Tools</h4><p>This application leverages AI agents to conduct stock research using newly created tools such as googlesearch and stock_analysis. Agents collaborate to gather and analyze stock-related data.</p><pre>python company_research.py</pre><p>Challenges faced and solutions:</p><ul><li><strong>Latency</strong>: Optimized API calls.</li><li><strong>Token limits</strong>: Used truncation strategies.</li></ul><h3>Autogen 0.4.* Studio and its Benefits</h3><p>Autogen Studio provides a UI-based interface to develop, test, and modify AI agent applications. You can either create agentic applications from scratch or visualize and enhance existing ones.</p><p>To launch Autogen Studio locally, use the following command:</p><pre>autogenstudio ui --port 8081 --appdir ./&lt;new_dir_name&gt;</pre><p>This will start the studio and save your work in the specified directory.</p><h4>Exporting Applications to JSON for Autogen Studio</h4><p>If you have already built an application, you can export it as a JSON configuration for Autogen Studio UI.</p><pre>config = team.dump_component()<br>print(config.model_dump_json())</pre><p>This allows seamless integration and modification within the UI.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/1*TLopvs09jYlbQrmxkrhJdA.png" /></figure><h3>Conclusion and Call to Action</h3><p>AutoGen and Azure OpenAI’s gpt-4o offer a powerful combination for building AI agents. The ability to integrate multiple AI agents streamlines automation and enhances problem-solving capabilities.</p><p>Check out the full implementation on <a href="https://github.com/tinkle21/autogen">GitHub</a>. Try it yourself and share your experiences!</p><p>Follow me on Medium for more AI-related content, and feel free to connect on Linkedin!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ac8d4d320285" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Custom Batch Activity in Azure Data Factory]]></title>
            <link>https://medium.com/@ashish.kats/custom-batch-activity-in-azure-data-factory-110d8c1c957b?source=rss-2ef8eef6ad8e------2</link>
            <guid isPermaLink="false">https://medium.com/p/110d8c1c957b</guid>
            <category><![CDATA[azure-data-factory]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[custom-activity]]></category>
            <category><![CDATA[azure-batch]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Ashish KUMAR]]></dc:creator>
            <pubDate>Thu, 10 Oct 2019 12:50:57 GMT</pubDate>
            <atom:updated>2019-10-30T04:28:29.062Z</atom:updated>
            <content:encoded><![CDATA[<p>While working on Azure Data Factory, me and my team was struggling to one of use case where we need to pass output value from one of python script as input parameter to another python script. This article explains how to pass value from one python script to another using custom batch activity.</p><h3>What is need of it</h3><p>There are two types of activities that you can use in an Azure Data Factory pipeline.</p><ul><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-overview">Data movement activities</a> to move data between <a href="https://docs.microsoft.com/en-us/azure/data-factory/copy-activity-overview#supported-data-stores-and-formats">supported source and sink data stores</a>.</li><li><a href="https://docs.microsoft.com/en-us/azure/data-factory/transform-data">Data transformation activities</a> to transform data using compute services such as Azure HDInsight, Azure Batch, and Azure Machine Learning.</li></ul><p>To move data to/from a data store that Data Factory does not support, or to transform/process data in a way that isn’t supported by Data Factory, you can create a <strong>Custom activity</strong> with your own data movement or transformation logic and use the activity in a pipeline. The custom activity runs your customized code logic on an <strong>Azure Batch</strong> pool of virtual machines.</p><h3>How Azure Batch Works</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/760/0*MDuynvLhGc6jgWcs.png" /></figure><h3>Azure Batch Account</h3><p>Below are list of activities need to done before creation of ADF pipeline or connection.</p><ol><li>Create a Batch Account</li><li>Create a pool of computes nodes</li></ol><h3>Creation of Batch Account</h3><p>Create a Resource &gt; Compute &gt; Batch Service</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tP_sFGB1MQnTbaVnlQZ0_A.png" /></figure><p>Provide Name to batch Account and Create.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QVzBIbVAQxk3_D_ZfO8ckg.png" /></figure><p>Once Created ,Go to resource and create Pool</p><h3>Create a pool of computes nodes</h3><p>Click on Pools and Add Pools</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eaN8HoPNXDLLpibqT_hePw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*Cp4sdA1Abi221kX4Gc5zCA.png" /></figure><p>Provide Pool details. Custom VM can be used through custom image functionality. (<a href="https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image">https://docs.microsoft.com/en-us/azure/virtual-machines/linux/capture-image</a>).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*0oY6Y7wempC0-4gdOjugLA.png" /></figure><h3>ADF Pipeline using custom Batch activity to run python code</h3><h4>Create Batch Account Linked Service in ADF Connection</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/1*i6_vJ_SFlWrO1uvP2EV58A.png" /></figure><p>Fill up details to create linked service. Can be found at key page of batch account</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/1*r9xZCNetJdfSJzYlpv-bWg.jpeg" /></figure><p>Create a storage account “AzureBatchStorageLinkedService_001” and used in Storage Linked service name .</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*6NHewAzNQWxFfLgVyx6mQw.png" /></figure><h3>Create a sample Pipeline using Custom Batch Activity.</h3><p><strong>Use case</strong>: Run a python program to sum two values (2 and 3) and pass result to downstream python module . Downstream module should able to receive previous module output and able to use it in code.(printing it for now).</p><p><strong>Solution Brief</strong>: Custom batch service is used to run python script1(Test_python_sum) just like running any python script from command line.(python scratch_1.py) . By default output of any batch activity is stored in storage account under <strong>output/stdout.txt</strong> and if any program failure happens, it will get stored in <strong>output/stderr.txt .</strong></p><p><strong>Pass outputs to another activity: </strong>You can send custom values from your code in a Custom Activity back to Azure Data Factory. You can do so by writing them into outputs.json from your application. Data Factory copies the content of outputs.json and appends it into the Activity Output as the value of the customOutputproperty. (The size limit is 2MB.) If you want to consume the content of outputs.json in downstream activities, you can get the value by using the expression @activity(&#39;&lt;MyCustomActivity&gt;&#39;).output.customOutput</p><p>reference: <a href="https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/data-factory/transform-data-using-dotnet-custom-activity.md">https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/data-factory/transform-data-using-dotnet-custom-activity.md</a></p><p>Create a new pipeline</p><p>Drag and drop custom activity from batch service section and name it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*K7IcAX-2tVWDVHUAPXjuSA.png" /></figure><p>Select Azure Batch linked service which created in above steps.</p><p>Provide command need to run and script to execute in command box.</p><p>In resource linked service, provide linked service name which we created in above steps.</p><p>Folder path: Provide folder path where python script resides</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*otrahrlaIDbkzARacVBu0g.png" /></figure><p>In code, pass ouput value to outputs.json as below:</p><blockquote><em>out_dict = {}<br>out_dict[&quot;my_key&quot;] = str(sum)<br>with open(&#39;outputs.json&#39;,&#39;w&#39;) as file:<br> file.write(str(out_dict))</em></blockquote><p>Can be used in downstream activity by expression @activity(&#39;Test_python_sum&#39;).output.customOutput.my_key)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PSuXFbs1JfcA_jOAcVls8w.png" /></figure><p>Drag and drop another custom activity to receive value and use it program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3DvZya_5nTJHph253K_HMQ.png" /></figure><p>Provide python command in Add dynamic content and pass parameter along with it.</p><p>@concat(&#39;python scratch_2.py&#39;,&#39; &#39;, activity(&#39;Test_python_sum&#39;).output.customOutput.my_key)</p><p>this is equivalent to , python scratch_2.py previousActivity_output</p><p>Provide folder path of scratch_2.py script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5Uv6DXtI8indNT1cKrsowQ.png" /></figure><p>Output of this python activity will stores in output/stdout.txt</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*INovGhuF14FC7pRN1FbiEw.jpeg" /></figure><p>You can play around with custom output value, of course.</p><h3>Conclusion</h3><p>Thank you very much for reading this post.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=110d8c1c957b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>