Gary Fougerolle GF

Postman AI Hackathon: handing an AI agent's security, rules and bill to the stack


Postman AI Hackathon: handing an AI agent's security, rules and bill to the stack

My team and I took first place at the Postman AI Hackathon, with a judges’ score of 86.

In 2024, when I was at Salesforce, I won the MuleSoft AI Hackathon, already on agents. Two years on, the question teams wrestle with is everything you need to put around an agent before you let it talk to real users.

In September, at FDDAY, I argued that an agent’s reliability and cost come from its APIs and from how you govern its calls. This hackathon gave us the chance to build it end to end, on Postman’s AI stack.

A proving ground: healthcare

We imagined Ma Santé Tranquille, a fictional French digital health service. It is where patients go to book their care: a test at the pharmacy, or a consultation with a doctor near them. Its agent, Clara, takes a patient from “I’m sick” to a confirmed booking, without ever giving a diagnosis.

Healthcare has the advantage of piling up the constraints every agent eventually meets in production:

  • workflows to follow to the letter, written and updated by the medical team
  • personal data that must not reach a model provider
  • an LLM bill that grows with every conversation
  • a single model provider, so a single point of failure
  • APIs owned by other teams, which change at their own pace

Our stance: none of these constraints gets solved in Clara’s code. Her system prompt stays short, and her only key, the gateway’s, is a secret managed by Astropods and injected at deploy time: it appears neither in the code nor in the prompt. Everything else is carried by the stack.

Following one message through the stack

Clara runs on Astropods. Every call she makes goes through Fabric, Postman’s AI gateway, which exposes three kinds of routes: the model, the Fern MCP server where the medical workflows live, and the health APIs. Postman defines those APIs, tests them and monitors them.

The clearest way in is to follow one patient message, step by step.

Patient symptoms, postal code
Astropods Clara short system prompt, key kept by Astropods
Fabric AI Gateway
Key authPII redactionModel routerToken counterRate limit
LLM route
Anthropic Claude Haiku or Sonnet
MCP route
MCP Fern 7 medical workflows
API routes
AWS Health APIs surveillance, pharmacies, appointments
Postman defines and checks the APIs Spec Hub, governance, collections, monitors, API Catalog

Overview

One patient message, end to end

Clara only talks to Fabric. Fabric holds the rules and routes each call to the model, the workflows or the APIs. Postman defines and checks those APIs. Click “Next” to follow one message.

The rules live outside the prompt

On Clara, every rule that matters is enforced outside the model, where it cannot talk its way around it.

Medical workflows in Fern

Clara’s seven workflows, from the first exchange to the booking, urgent signs included, are pages on a Fern portal branded for Ma Santé Tranquille. Fern exposes them over MCP, and Clara reads the step she needs when she needs it. One step at a time: her context stays minimal, and every model call costs less.

The same page serves the medical team who reviews it and the model that applies it, since it is as easy to read for a human as for an LLM. The portal is the single source of truth: its API reference is generated from the Postman specs, so it stays in step with the contract. When the medical team edits a workflow, Clara’s behaviour changes from the next conversation, with no agent redeploy.

Before any booking, the workflow tells Clara to read the pharmacy and the slot back to the patient, then wait for an explicit yes. The same rule is written into the API contract: a booking without patient_confirmed: true gets a 428 and nothing is booked. The model follows the rule, and the API guarantees it even when the model gets it wrong.

Personal data never reaches the model

Patients always end up sharing more than needed. In our demo, the patient typed their social security number in the very first message. Fabric’s PII redaction plugin replaces it with [SSN] before the prompt leaves for Anthropic. When you then ask Clara to repeat the first message word for word, she answers with [SSN]: she never saw the number.

On the API side, the endpoints only take a postal code and an anonymous patient ID generated for the conversation, and a number sent in clear is rejected with a 422. The plugin also recognises e-mails, phone numbers, card numbers, IP addresses and AWS keys. Try it below.

What the model receives
Add:
Simulated in your browser, nothing is sent. The postal code goes through: Clara needs it to find a pharmacy.

Keys and providers stay in the gateway

The Anthropic keys, the API keys and each provider’s specifics live in Fabric. Fabric’s LLM router can run in fallback mode: Anthropic first, OpenAI second, on a 429, a 503 or a 5xx error. A rate limit caps token consumption. Clara’s code knows nothing about any of it, and the next agent gets it without writing a line.

APIs defined once

The three health APIs, epidemic surveillance, pharmacies and appointments, are described by three OpenAPI specs in Postman’s Spec Hub. Governance rules apply as soon as a spec is saved, and each spec feeds everything else:

  • Fabric imports its API routes straight from the specs
  • Postman generates the collections, the mocks and the tests from them, 22 assertions in all
  • Fern generates the portal’s API reference from them
  • on every push, CI deploys the AWS infrastructure with Terraform, then the Postman CLI lints the specs and runs the collections against the deployed environment

Monitors replay the collections every six hours. The API Catalog shows each service’s CI runs, monitor runs and lint results side by side, and answers the question we ask before every demo: can Clara rely on her APIs right now?

We also set up the Postman workspace and the Fern portal from an AI agent, through their MCP servers. The stack that serves agents can be configured by agents too.

The cost, measured

We measured the same eight-message journey, from “I’m sick” to a booked flu test, on Claude Sonnet 5.5 through Fabric. Two runs per setup, at Anthropic list prices: enough for an order of magnitude.

SetupCost per conversationChange
Workflows in the system prompt$0.142
Workflows read from Fern, one step at a time$0.117−18%
Fern and prompt caching$0.036−75%

Every model call resends the tools, the instructions and the history. Fern keeps that part small, and prompt caching bills it at a tenth of the input price from the second call on. The two levers stack, and Fabric’s token counter gives the cost of each conversation without instrumenting the agent.

All three setups run entirely on Sonnet. Fabric’s adaptive router adds one more lever: simple turns, a “Hello” or a “Thanks”, go to Claude Haiku, and the medical turns stay on Sonnet.

Move the volume to see what that means over a month.

Workflows in the prompt all 7 workflows resent on every call
per conversation per month
Workflows read from Fern one step at a time, through the MCP route
per conversation per month
Fern and prompt caching what Clara runs
per conversation per month

Fern and caching save per month, which is per year.

8-message journey, from “I'm sick” to a booked flu test. Claude Sonnet 5.5 through Fabric, 2 runs per setup, Anthropic list prices.

What the stack brings a customer

Cost

75% lower cost on the same journey, thanks to workflows read step by step and to caching. On top of that, the adaptive router sends simple turns to a lighter model, and Fabric's token counter gives the cost of each conversation without instrumenting the agent.

Security

Personal data is redacted before the model, the keys stay in the gateway, and the APIs refuse anything outside the contract, such as a booking without consent.

Governance

One spec per API, checked on save, on every push and every six hours. The business workflows stay in the hands of the team that writes them.

High availability

Fabric's router can switch from one model provider to another without touching the agent, and the API Catalog shows the state of every API at all times.

Simplicity

The agent comes down to a short prompt and a key. A customer plugs in their APIs, writes their workflows in Fern and puts their keys in Fabric, and the next agent reuses all of it as is.

Thanks to my whole team for this hackathon.

If you are building an agent wired to your systems, write to me on LinkedIn.