<?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 Andrew Hanson on Medium]]></title>
        <description><![CDATA[Stories by Andrew Hanson on Medium]]></description>
        <link>https://medium.com/@andrewwhans?source=rss-97d8c77f3bd0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*TVf1qygv9NjCJU9_6OqwKQ.jpeg</url>
            <title>Stories by Andrew Hanson on Medium</title>
            <link>https://medium.com/@andrewwhans?source=rss-97d8c77f3bd0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 11:38:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@andrewwhans/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[Your API Is Now an Agent’s UI]]></title>
            <link>https://alt.ctrlmag.com/your-api-is-now-an-agents-ui-5453659b2014?source=rss-97d8c77f3bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/5453659b2014</guid>
            <category><![CDATA[open-api]]></category>
            <category><![CDATA[api]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[software-engineering]]></category>
            <dc:creator><![CDATA[Andrew Hanson]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 10:12:05 GMT</pubDate>
            <atom:updated>2026-11-23T10:31:08.587Z</atom:updated>
            <content:encoded><![CDATA[<h4>The OpenAPI specification used to be documentation. Now it’s the interface an AI reads to decide what to do.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p7P88i_OYV1SRUJdVK0YOQ.png" /></figure><p>For most of the history of web APIs, documentation was for people. A developer read it once, made a few test calls, hit an error, figured it out and moved on. If any of the docs were vague, the person filled in the gap with experience, Stack Overflow, or a quick message to someone on the team.</p><p>That’s no longer the only audience. LLM agents now read your OpenAPI spec and decide, call by call, what to send. They don’t have tribal knowledge. They don’t Slack your backend engineer. What’s in the spec is, for practical purposes, everything they know.</p><p>That changes what “good documentation” means. Your spec isn’t a reference manual anymore. It’s a user interface, and the user is a model.</p><p><strong>What agents get wrong, and why it’s usually the spec<br></strong>When I started wiring agents to real APIs, most failures weren’t the model being “dumb.” They traced back to information the spec simply didn’t contain. A few patterns kept showing up:</p><p><strong>Hidden constraints. </strong>A parameter is typed as string, but the server only accepts five specific values. A human learns this from one 400 error. An agent might guess, fail, guess again, and eventually give up, or worse, pick a value that happens to work but means something different.</p><p><strong>Undocumented error shapes. </strong>If your 422 response isn’t described, the agent can’t tell “you sent a bad date format” from “this resource doesn’t exist.” It retries the wrong thing.</p><p><strong>Ambiguous descriptions. “</strong>status: The status.” tells a model nothing. Is it the order’s status or the payment’s? Which values are terminal?</p><p><strong>Silent success. </strong>The scariest one. The call returns 200, but the agent passed a parameter the server quietly ignored. Nothing errors, and the result is wrong.</p><p><strong>Treat the spec like a UI<br></strong>If you designed a form for a person, you wouldn’t make them guess which values a dropdown allows. You’d show the options. You’d write labels that mean something. You’d show a clear error next to the field that’s wrong.</p><p><strong>The same instincts apply to agents:</strong></p><ul><li><strong>Use enums wherever the value set is closed.</strong> It’s the API equivalent of a dropdown.</li><li><strong>Describe every parameter as if the reader has no context.</strong> Units, formats, examples, and what happens if it’s omitted.</li></ul><p><strong>Document every error response with a schema and a machine-readable code. </strong>Take this: {“code”: “INVALID_DATE_FORMAT”, “field”: “start_date”} and that will let an agent self-validate and correct.</p><ul><li><strong>Reject what you don’t understand.</strong> If an unknown parameter arrives, fail loudly instead of ignoring it. Silent acceptance is how agents produce confident wrong answers.</li><li><strong>Give examples.</strong> One realistic request and response per operation does more than a paragraph of prose.</li></ul><p><strong>Why this matters beyond agents<br></strong>None of this is new advice. These are the same things good API designers have said for years. What’s new is the cost of ignoring them. A confused human developer files a ticket. A confused agent makes thousands of bad calls at machine speed, and your logs fill with retries.</p><p>The upside is that fixing your spec for agents makes it better for humans too. Every enum, example and error code that you add will help out the next developer who opens your docs.</p><p><strong>Try this on your own API<br></strong>Open your specification and pretend you’ve never seen the codebase. For each endpoint, ask: could I call this correctly on the first try, using only what’s written here? Do I know every allowed value, every required format, and what each error means? If the answer is no, then an agent doesn’t know either. The good news is that the fixes are rarely big. Small changes to the spec go a long way when the reader is a model that takes every word literally.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5453659b2014" width="1" height="1" alt=""><hr><p><a href="https://alt.ctrlmag.com/your-api-is-now-an-agents-ui-5453659b2014">Your API Is Now an Agent’s UI</a> was originally published in <a href="https://alt.ctrlmag.com/">Alt.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[First Principles of API Design, Revisited for Machine Callers]]></title>
            <link>https://alt.ctrlmag.com/first-principles-of-api-design-revisited-for-machine-callers-336da05c3f47?source=rss-97d8c77f3bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/336da05c3f47</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[design-systems]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[Andrew Hanson]]></dc:creator>
            <pubDate>Mon, 23 Nov 2026 07:38:40 GMT</pubDate>
            <atom:updated>2026-11-23T09:24:47.440Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Strip down API design to what it’s really for, and the rules for AI agents mostly write themselves.</em></p><p>First-principles thinking cuts through noise. Instead of asking “what’s the best practice?”, you can ask “what is this thing actually for?” and rebuild from there.</p><p>So: what is an <strong>API </strong>for?</p><figure><img alt="Analogy of an API" src="https://cdn-images-1.medium.com/max/1024/1*QvVBv9SN_KqaLUQRjnp9fQ.png" /><figcaption>Analogy of an API, source: <a href="https://zilliz.com/glossary/api">Zilliz.com</a></figcaption></figure><p>At the most basic level, an API is a contract that lets one system use another without knowing how it works inside. That’s it.</p><p>Everything else, REST versus GraphQL, versioning schemes, naming conventions, is a choice about how to keep that contract clear and stable.<br>When the caller was always a human developer, a lot of the contract could live outside the API itself: in docs, examples, blog posts, and the developer’s own experience. Now that callers include AI agents, that outside context disappears. The contract has to be complete on its own.<br>Here are the principles I keep coming back to.</p><ol><li>The contract is the spec, not the code<br>If behavior isn’t in the spec, assume the caller doesn’t know about it. Agents can’t read your source, and they won’t remember last week’s Slack thread. Defaults, limits, ordering, pagination, side effects: write them down, or treat them as undefined.</li><li>Make invalid states hard to express<br>The best error is the one the caller can’t make. Closed value sets become enums. Related fields that must appear together become one object. Mutually exclusive options become a discriminated type. Every constraint moved from prose into structure is one less thing a model has to infer.</li><li>Fail loudly and specifically<br>A person can debug “Bad Request.” An agent mostly can’t. Errors should say what was wrong, which field, and ideally what would be valid. Machine-readable error codes turn failures into feedback the caller can act on.</li><li>Be predictable over being clever<br>Consistent naming, consistent pagination, consistent error shapes across every endpoint. Humans tolerate quirks because they learn them once. Agents re-encounter your API fresh on every task. Every inconsistency is a new chance to be wrong.</li><li>Design for retries<br>Machine callers retry, sometimes aggressively. Any write operation that can be called twice by accident should be safe to call twice. (I wrote a whole post on this: idempotency is the most underrated feature in agent-facing APIs.)</li><li>Expose the least power needed<br>If an agent only needs to read orders, it shouldn’t hold a key that can delete them. Scopes and narrow endpoints aren’t just security hygiene. They limit the damage a confused caller can do.</li></ol><p>The pattern underneath</p><p>Look at the list again. None of these principles are specific to AI. They’re the same ideas that make APIs good for people: explicitness, consistency, safety, least privilege. What AI changes is the price of skipping them. A human caller absorbs your API’s ambiguity. A machine caller amplifies it.</p><p>That’s the first-principles takeaway I keep landing on. When a new kind of user shows up, you rarely need new rules. You need to stop relying on the shortcuts the old users let you get away with.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=336da05c3f47" width="1" height="1" alt=""><hr><p><a href="https://alt.ctrlmag.com/first-principles-of-api-design-revisited-for-machine-callers-336da05c3f47">First Principles of API Design, Revisited for Machine Callers</a> was originally published in <a href="https://alt.ctrlmag.com/">Alt.</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Cybersecurity: AI’s Impact]]></title>
            <link>https://medium.com/@andrewwhans/cybersecurity-ais-impact-003504f8b0d7?source=rss-97d8c77f3bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/003504f8b0d7</guid>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[cybersecurity]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[infosec]]></category>
            <dc:creator><![CDATA[Andrew Hanson]]></dc:creator>
            <pubDate>Sat, 21 Mar 2026 18:42:33 GMT</pubDate>
            <atom:updated>2026-03-21T18:42:33.370Z</atom:updated>
            <content:encoded><![CDATA[<h4>It was early in the morning when I realized something felt… off.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*3h7l1dHSBh28qLctMfXgAA.png" /><figcaption>Where artificial intelligence meets digital defense.</figcaption></figure><p>I was blankly staring at my screen, half-asleep and listening to a podcast about cybersecurity.</p><p>Not a breaking headline, nor some major breach.</p><p>Just a realization.</p><p>AI isn’t just transforming things like <strong>IOT:<br></strong>It’s reshaping the<strong> entire </strong>cybersecurity landscape</p><p>Back in 2023, we already understood that AI would play some sort of role in the future of the internet. But we did not fully grasp exactly <em>how deep</em> it would embed itself into the systems we rely on every day.</p><p>Cybersecurity, at an organizational level, has always been about protecting the infrastructure: the networks, systems, and all things data.</p><p>Having that: AI is changing what “protection” really even means.</p><h3>The Shift Happening Right Now</h3><p>Research has already started to confirm what many are beginning to notice in practice:</p><p>AI is influencing cybersecurity across its <a href="https://www.sciencedirect.com/science/article/pii/S2543925123000372">entire lifecycle</a>; from threat detection to response and prevention.<br>This isn’t just another tool anymore.</p><p>It’s becoming part of the system that we already know; just expanding what’s possible.</p><p>AI can analyze massive amounts of data; faster than any human team and identify patterns, detect anomalies, and find security vulnerabilities that otherwise would go unnoticed.</p><h3>Another major shift: AI Agents.</h3><h4>Why should we worry about this?</h4><p>We’re already seeing this at <a href="https://industrialcyber.co/ai/booz-allen-warns-ai-driven-cyberattacks-outpace-human-driven-defenses-across-critical-infrastructure/">Booz Allen</a>, which reports a “machine-speed” era where we see AI intruding and giving impact to hackers.</p><p>This shift is undeniable. We already see how AI is accelerating the way we carry out our tasks; but agents still require a human conductor setting the objective.</p><p>In the world we live in, time is critical. With cybercriminals evolving their tactics faster in this new era, we can only beg the question: are we truly prepared for what is coming?</p><h3>Why This Changes Everything</h3><p>Traditional cybersecurity was built on predictability; relying on firewalls and overemphasize measures against subjective dangers.</p><p>We knew what we recognized: known threats, recognizable patterns, and what clear signals are shown.</p><p>But AI introduces something different: <strong>uncertainty</strong></p><p>Threats no longer need to look malicious, they can look normal such as:<br>A login at the right time, or maybe a message that can sound familiar.</p><p>But this is where the real danger lies on; because most systems and people are trained to react to what is obviously wrong than what is almost right.</p><p>With this, we have three takeaways:<br>1. Security Must Evolve, not just defend.<br>2. AI is both an advantage and a risk.<br>3. Awareness is becoming our strongest defense.</p><p>Today, we are entering a different era of cybersecurity.<br>Cybersecurity now needs to function as a full system; one that learns, adjusts, and improves over time.</p><p>This isn’t a one-sided fight, rather an ongoing competition. And organizations are already in this using AI to strengthen detection and response. Attackers are only going to continue scaling and refining their methods.</p><p>But technology can only go <strong>so far</strong>, ultimately requiring human judgment.</p><p>AI isn’t just changing the cybersecurity landscape, but changing how trust works in a digital world.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=003504f8b0d7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[AI in Healthcare: Ethical and Social Fault Lines in a Data-Driven Era]]></title>
            <link>https://medium.com/@andrewwhans/ai-in-healthcare-ethical-and-social-fault-lines-in-a-data-driven-era-17776e83b54c?source=rss-97d8c77f3bd0------2</link>
            <guid isPermaLink="false">https://medium.com/p/17776e83b54c</guid>
            <category><![CDATA[ethics]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[medical-technology]]></category>
            <category><![CDATA[healthcare]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Andrew Hanson]]></dc:creator>
            <pubDate>Mon, 08 Sep 2025 05:22:44 GMT</pubDate>
            <atom:updated>2025-09-08T05:23:29.619Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Balancing innovation, patient safety, and trust in medicine’s AI future</em></p><p>In 2023, an AI model analyzed mammograms and identified breast cancer more accurately than many radiologists. For patients, this promised earlier treatment and better outcomes. But the story also exposed deeper concerns: the model was trained <em>primarily </em>on data from one population, raising the risk of biased predictions for others. This tension that is between innovation and ethics has became the center of medicine’s AI revolution.</p><p>According to a <a href="https://bmcmedethics.biomedcentral.com/articles/10.1186/s12910-025-01198-1">BMC Medical Ethics</a> scoping review, ethical discussions around AI in healthcare have been ongoing since the mid-1990s. Yet, with the rise of large language models and generative AI, the stakes are higher than ever. What was once a theoretical debate has become a pressing public health concern, touching on everything from patient safety to trust in medical institutions.</p><p>Meanwhile, the <a href="https://www.annualreviews.org/content/journals/10.1146/annurev-biodatasci-102623-104553">Annual Review of Biomedical Data Science</a> highlights how the biomedical field faces distinct challenges: patient privacy, data security, informed consent, and justice. AI thrives on data, but medical data is deeply personal and sensitive. Without strict safeguards, the same tools that save lives could erode fundamental rights.</p><p>Three ethical fault lines now define the conversation:</p><p><strong>Bias and Fairness<br></strong>AI systems risk reproducing health inequities when trained on narrow or incomplete datasets. A tool designed to diagnose skin cancer, for example, may fail on darker skin tones if underrepresented in the data.</p><p><strong>Autonomy and Consent<br></strong>Patients rarely know how their data is used to train models. True informed consent, beyond the fine print remains elusive in the age of big data.</p><p><strong>Accountability and Trust<br></strong>When an AI system errs, who is responsible? The developer, the doctor, or the institution? Without any clarity, trust in AI-powered healthcare will fall.</p><p>Yet, abandoning AI is not the solution. The same technology has immense potential to accelerate drug discovery, personalize treatment, and support overburdened healthcare systems. What’s needed is a balance:</p><blockquote>innovation guided by ethics.</blockquote><p>Both Ratti and Federico argue for frameworks that integrate ethics into every stage of AI’s lifecycle. This means:</p><ol><li>Transparent models that can be explained to patients and doctors.</li><li>Diverse, representative datasets.</li><li>Clear governance on accountability.</li></ol><p>As a current informatics student, I see AI not as an unstoppable force but a tool shaped by human decisions. The question is not whether we will use AI in medicine but how <strong>responsibly </strong>we do so.</p><p>Will AI be a partner in healing, or a silent risk to patient trust? The answer depends on choices we make now, at the intersection of data science, medicine, and ethics.<br>How do you see AI shaping healthcare? More looking to be a partner or a risk? Share your perspective below.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=17776e83b54c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>