<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Kat Laszlo</title>
    <description>The latest articles on DEV Community by Kat Laszlo (@kat_laszlo).</description>
    <link>https://dev.to/kat_laszlo</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3832776%2F9683a03f-431d-4e26-abef-c8145cbbf89a.png</url>
      <title>DEV Community: Kat Laszlo</title>
      <link>https://dev.to/kat_laszlo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kat_laszlo"/>
    <language>en</language>
    <item>
      <title>A single HTML file for architecture docs</title>
      <dc:creator>Kat Laszlo</dc:creator>
      <pubDate>Mon, 27 Apr 2026 17:42:56 +0000</pubDate>
      <link>https://dev.to/kat_laszlo/a-single-html-file-for-architecture-docs-3jkp</link>
      <guid>https://dev.to/kat_laszlo/a-single-html-file-for-architecture-docs-3jkp</guid>
      <description>&lt;p&gt;I maintain a single HTML file as an architecture board for the product I'm building. Definitions, data models, API surface, routes, changelogs, postmortems. One file, opens in a browser, shows the state of things at a glance.&lt;/p&gt;

&lt;p&gt;I've been using it to stay oriented while developing Tanso, and it's been useful enough that I wanted to share it in case anyone else has been thinking along the same lines.&lt;/p&gt;

&lt;p&gt;The origin was simple: I kept asking AI tools to generate structured documents (ERDs, changelog tables, postmortem writeups) and discarding them after a single look. But the output was already organized. The data was already there. The only waste was starting from zero every time.&lt;/p&gt;

&lt;p&gt;So I stopped starting from zero and made a template: &lt;a href="https://github.com/katrinalaszlo/human-docs" rel="noopener noreferrer"&gt;human-docs&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the repo
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;template.html   Empty scaffold with section markers. Fork and fill.
PROMPT.md       Instructions for any AI tool to generate or update the doc.
example.html    Cal.com's architecture, fully filled in.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Point any AI tool (Claude Code, Cursor, Codex) at your codebase with &lt;code&gt;PROMPT.md&lt;/code&gt; as the prompt. It fills in the template. Open the result in a browser.&lt;/p&gt;

&lt;p&gt;When something changes, you don't rebuild the whole file. The template uses &lt;code&gt;&amp;lt;!-- SECTION:name --&amp;gt;&lt;/code&gt; markers so updates are surgical. The AI edits only the sections that are stale, leaves everything else intact. Similar to how you'd review a git diff: only what actually changed.&lt;/p&gt;

&lt;p&gt;Over time the file compounds. Each deploy adds a changelog entry. Each bug adds a postmortem. Each migration updates the ERD. The document gets more useful the longer you maintain it.&lt;/p&gt;

&lt;h2&gt;
  
  
  The sections
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Section&lt;/th&gt;
&lt;th&gt;Purpose&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Definitions&lt;/td&gt;
&lt;td&gt;Clarify overloaded or ambiguous terms in the codebase&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Data Model&lt;/td&gt;
&lt;td&gt;Tables, relationships, ERDs grouped by domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Pages &amp;amp; Routes&lt;/td&gt;
&lt;td&gt;Every user-facing route and what it does&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;API Surface&lt;/td&gt;
&lt;td&gt;Endpoints grouped by domain&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Changelog&lt;/td&gt;
&lt;td&gt;What shipped, filterable by type&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Postmortems&lt;/td&gt;
&lt;td&gt;What broke, root cause, fix, prevention rule&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Postmortems are the most valuable section. Changelogs record what happened. Postmortems record what not to do again.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why HTML
&lt;/h2&gt;

&lt;p&gt;HTML is self-rendering. Open it in any browser, no preprocessing needed. And because it's structured markup, an AI agent can parse it and update individual sections without regenerating the whole document. It serves both audiences (human readers, AI agents) without needing two versions of the same information.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I'm actually thinking about
&lt;/h2&gt;

&lt;p&gt;The template is the lightweight part. The more interesting part is the questions behind it.&lt;/p&gt;

&lt;p&gt;As AI accelerates execution and one person takes on more, I think the constraint increasingly becomes the human context window. Not writing the code, but keeping track of everything across workstreams. Having a single page where I can see the architecture of a project without reconstructing it from memory has been more valuable than I expected.&lt;/p&gt;

&lt;p&gt;And that opens up some directions I keep coming back to:&lt;/p&gt;

&lt;p&gt;What if this auto-updated on every commit? A git hook diffs the changes, maps them to sections, and the doc stays current without anyone prompting it.&lt;/p&gt;

&lt;p&gt;What if it replaced tools like Swagger or TypeDoc instead of sitting alongside them? The AI is already reading your codebase to fill sections. It can generate API references in the same file, next to the architectural context those tools never capture.&lt;/p&gt;

&lt;p&gt;Is HTML even the right format long-term, or just the right format for now? It's self-rendering and structured enough for agents to parse. But if other tools need to consume the data downstream, maybe the source should be structured data with HTML as one view.&lt;/p&gt;

&lt;p&gt;I don't have answers to these yet. But I think the questions are worth thinking about, and I wanted to put this out there in case anyone else has been working through the same stuff.&lt;/p&gt;

&lt;p&gt;Repo: &lt;a href="https://github.com/katrinalaszlo/human-docs" rel="noopener noreferrer"&gt;github.com/katrinalaszlo/human-docs&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Open &lt;code&gt;example.html&lt;/code&gt; to see what a filled-in doc looks like.&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>documentation</category>
      <category>webdev</category>
    </item>
    <item>
      <title>I repurposed Karpathy's LLM Wiki for product discovery. It worked surprisingly well.</title>
      <dc:creator>Kat Laszlo</dc:creator>
      <pubDate>Mon, 27 Apr 2026 17:33:02 +0000</pubDate>
      <link>https://dev.to/kat_laszlo/i-repurposed-karpathys-llm-wiki-for-product-discovery-it-worked-surprisingly-well-2ngn</link>
      <guid>https://dev.to/kat_laszlo/i-repurposed-karpathys-llm-wiki-for-product-discovery-it-worked-surprisingly-well-2ngn</guid>
      <description>&lt;p&gt;I was playing with &lt;a href="https://gist.github.com/karpathy/442a6bf555914893e9891c11519de94f" rel="noopener noreferrer"&gt;Karpathy's LLM Wiki&lt;/a&gt; and realized it could be re-applied to my manual workflow as a PM.&lt;/p&gt;

&lt;p&gt;Normally I identify quotes from transcripts, create user stories, group them into features, and prioritize based on effort, impact, dependencies. It's tedious and error-prone, especially across 10+ interviews.&lt;/p&gt;

&lt;p&gt;I tried using a wiki instead of my manual process for customer interviews and it worked surprisingly well.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it works
&lt;/h2&gt;

&lt;p&gt;Before running it, you can edit the prompt to decide what's worth tagging and how user stories should be written. When you re-run it, it does not blindly overwrite your edits or duplicate prior work.&lt;/p&gt;

&lt;p&gt;One piece I especially like is the ability to view the connections as a graph and drill down from a user story to the actual customer quotes behind it. And if you're using AI to code, you can feed that evidence in as context. It builds better when it understands &lt;em&gt;why&lt;/em&gt; you're building something.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyb42o8bn8mathx1x9xlm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyb42o8bn8mathx1x9xlm.png" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qx0hlhl7hc1hafnyd4b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7qx0hlhl7hc1hafnyd4b.png" alt=" " width="800" height="518"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it now
&lt;/h2&gt;

&lt;p&gt;The repo ships with 3 fictional transcripts and a pre-built wiki (3 customers, 2 stories, 2 features) so you can explore the output immediately. Open &lt;code&gt;wiki/&lt;/code&gt; in Obsidian to see the graph.&lt;/p&gt;

&lt;p&gt;When you're ready to use your own data, drop transcripts into &lt;code&gt;raw/&lt;/code&gt; and ingest. Your data lives alongside the examples. Delete the example files whenever you want. They won't affect your wiki.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who else this might be useful for
&lt;/h2&gt;

&lt;p&gt;I built this for product discovery, but I imagine it could work for customer success, customer research, or design, anywhere you're trying to surface themes across qualitative data.&lt;/p&gt;

&lt;p&gt;If you haven't used Claude Code or Codex before, happy to lend a hand. It's deceptively non-technical.&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://assets.dev.to/assets/github-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/katrinalaszlo" rel="noopener noreferrer"&gt;
        katrinalaszlo
      &lt;/a&gt; / &lt;a href="https://github.com/katrinalaszlo/buildnext-oss" rel="noopener noreferrer"&gt;
        buildnext-oss
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Karpathy-style evidence wiki for product development. Turn customer signal into grounded user stories. No database, no hosting — just markdown and an LLM.
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;BuildNext&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Turn raw customer signal into evidence-grounded user stories. No database, no hosting — just markdown and an LLM.&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/katrinalaszlo/buildnext-oss/docs/graph-view.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fkatrinalaszlo%2Fbuildnext-oss%2FHEAD%2Fdocs%2Fgraph-view.png" alt="Obsidian graph view" width="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a rel="noopener noreferrer" href="https://github.com/katrinalaszlo/buildnext-oss/docs/story-view.png"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fraw.githubusercontent.com%2Fkatrinalaszlo%2Fbuildnext-oss%2FHEAD%2Fdocs%2Fstory-view.png" alt="Story page with evidence" width="700"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;How it works&lt;/h2&gt;
&lt;/div&gt;

&lt;p&gt;BuildNext is a Karpathy-style LLM wiki for product development. You give it raw customer signal (call transcripts, support tickets, notes). An AI agent reads, extracts, and synthesizes it into a structured knowledge base you can browse in Obsidian or query from any agent.&lt;/p&gt;

&lt;div class="snippet-clipboard-content notranslate position-relative overflow-auto"&gt;&lt;pre class="notranslate"&gt;&lt;code&gt;raw/              # paste transcripts here (input)
wiki/             # agent-maintained output
  customers/      # one page per customer, extracted quotes
  stories/        # synthesized user stories
  features/       # story groupings
  index.md        # catalog of all pages
  log.md          # what changed and when
CLAUDE.md         # schema — rules for how the agent operates
config.md         # internal speakers to filter, evidence tags
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;Three layers: &lt;strong&gt;raw&lt;/strong&gt; (immutable input), &lt;strong&gt;wiki&lt;/strong&gt; (LLM-maintained output), &lt;strong&gt;schema&lt;/strong&gt; (rules).&lt;/p&gt;
&lt;div class="markdown-heading"&gt;
&lt;h2 class="heading-element"&gt;Prerequisites&lt;/h2&gt;
&lt;/div&gt;


&lt;ul&gt;

&lt;li&gt;Git&lt;/li&gt;

&lt;li&gt;An AI coding tool that reads &lt;code&gt;CLAUDE.md&lt;/code&gt; — &lt;a href="https://docs.anthropic.com/en/docs/claude-code" rel="nofollow noopener noreferrer"&gt;Claude Code&lt;/a&gt;, &lt;a href="https://cursor.sh" rel="nofollow noopener noreferrer"&gt;Cursor&lt;/a&gt;, &lt;a href="https://openai.com/index/codex/" rel="nofollow noopener noreferrer"&gt;Codex&lt;/a&gt;, or…&lt;/li&gt;

&lt;/ul&gt;
&lt;/div&gt;
&lt;br&gt;
  &lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/katrinalaszlo/buildnext-oss" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;
 

</description>
      <category>opensource</category>
      <category>ai</category>
      <category>productmanagement</category>
      <category>llm</category>
    </item>
    <item>
      <title>What Claude Code stores on your machine (and how to see it)</title>
      <dc:creator>Kat Laszlo</dc:creator>
      <pubDate>Tue, 31 Mar 2026 18:31:18 +0000</pubDate>
      <link>https://dev.to/kat_laszlo/what-claude-code-stores-on-your-machine-and-how-to-see-it-17bb</link>
      <guid>https://dev.to/kat_laszlo/what-claude-code-stores-on-your-machine-and-how-to-see-it-17bb</guid>
      <description>&lt;p&gt;Claude Code keeps a lot of data in &lt;code&gt;~/.claude/&lt;/code&gt; that most people never look at. I wanted to know what was there, so I built a scanner.&lt;/p&gt;

&lt;p&gt;On my machine it found:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;76 persistent memory files across 10 projects&lt;/li&gt;
&lt;li&gt;4,445 session transcripts totaling 1.8GB&lt;/li&gt;
&lt;li&gt;2.2GB total data footprint&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The memory files are markdown with frontmatter, organized by type: what Claude thinks your role is, feedback you've given, project context, reference links. It remembers more than you'd expect.&lt;/p&gt;

&lt;h2&gt;
  
  
  The tool
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx agentlens scan
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;No API keys, no accounts. Reads local files only.&lt;/p&gt;

&lt;h3&gt;
  
  
  Scan commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;agentlens memory&lt;/code&gt; — what Claude remembers about you&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens costs&lt;/code&gt; — token usage by model and project&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens features&lt;/code&gt; — active feature flags on your account&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens sessions&lt;/code&gt; — transcript stats and tool usage&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens privacy&lt;/code&gt; — total data footprint&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Action commands
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;agentlens clean --dry-run&lt;/code&gt; — preview which memories would be deleted&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens redact&lt;/code&gt; — find secrets that leaked into memory files&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens diff save&lt;/code&gt; — snapshot current state, then &lt;code&gt;diff show&lt;/code&gt; to compare later&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;agentlens export&lt;/code&gt; — dump everything to portable JSON&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What surprised me
&lt;/h2&gt;

&lt;p&gt;The sensitivity scanner flagged 13 potential secrets in my memory files. Most were false positives (the word "token" in pricing discussions), but some were file paths and references I wouldn't want in a shared context.&lt;/p&gt;

&lt;p&gt;Session transcripts contain everything: every file you read, every bash command you ran, every edit you made. If you've ever read a &lt;code&gt;.env&lt;/code&gt; file during a Claude Code session, it's in there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stack
&lt;/h2&gt;

&lt;p&gt;~900 lines of TypeScript. Node 18+. Dependencies: chalk, commander, glob, yaml. MIT licensed.&lt;/p&gt;

&lt;p&gt;GitHub: &lt;a href="https://github.com/katrinalaszlo/agentlens" rel="noopener noreferrer"&gt;https://github.com/katrinalaszlo/agentlens&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Would love to hear what you think!&lt;/p&gt;

</description>
      <category>ai</category>
      <category>typescript</category>
      <category>opensource</category>
      <category>devtools</category>
    </item>
    <item>
      <title>Track Your AI Costs Per Customer in One API Call</title>
      <dc:creator>Kat Laszlo</dc:creator>
      <pubDate>Wed, 25 Mar 2026 18:27:44 +0000</pubDate>
      <link>https://dev.to/tanso/track-your-ai-costs-per-customer-in-one-api-call-32c7</link>
      <guid>https://dev.to/tanso/track-your-ai-costs-per-customer-in-one-api-call-32c7</guid>
      <description>&lt;p&gt;If you're building on top of AI APIs, you're probably calling OpenAI, Anthropic, Cohere, and a few others depending on the task. Each one bills differently. Costs shift when model prices change. And at some point, someone asks: "Are we making money on this customer?"&lt;/p&gt;

&lt;p&gt;Without instrumentation, that question takes a day to answer. With it, it takes a query.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;You ship a feature. It works. Customers use it. Then pricing changes, or a customer's usage spikes, or you realize token costs for one feature are eating your margin on that plan tier.&lt;/p&gt;

&lt;p&gt;The issue isn't that you don't have cost data. Your AI provider invoices you every month. The issue is that data isn't broken down by your customers or your features. You see what you spent. You don't see what each customer cost you.&lt;/p&gt;

&lt;p&gt;To know your margin per customer, you need to capture cost at the moment the AI call happens, with context attached.&lt;/p&gt;

&lt;h2&gt;
  
  
  One event call
&lt;/h2&gt;

&lt;p&gt;After each AI API response, send one event to Tanso:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;http://localhost:8080/api/v1/client/events&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;method&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;POST&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;headers&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Content-Type&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;application/json&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Authorization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Bearer sk_test_67d9fb04f0344036ba92ecc973f1445a&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;body&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="na"&gt;eventIdempotencyKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;crypto&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;randomUUID&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt;
    &lt;span class="na"&gt;eventName&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;chat_completion&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;customerReferenceId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;cus_123&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;featureKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;ai_summarization&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;costInput&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="na"&gt;model&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;gpt-4o&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="na"&gt;modelProvider&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;openai&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="p"&gt;},&lt;/span&gt;
    &lt;span class="na"&gt;usageUnits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;response&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;total_tokens&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;costAmount&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;A few things worth noting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;eventIdempotencyKey&lt;/code&gt;&lt;/strong&gt; required. If the same event is sent twice (network retry, duplicate webhook), Tanso deduplicates silently. Use &lt;code&gt;crypto.randomUUID()&lt;/code&gt; per call, or derive it from your own request ID if you need stable deduplication.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;customerReferenceId&lt;/code&gt;&lt;/strong&gt; your customer's ID, whatever you already use. Tanso maps this to their account.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;featureKey&lt;/code&gt;&lt;/strong&gt; ties the event to a specific feature on the customer's plan. This is how Tanso separates cost for &lt;code&gt;ai_summarization&lt;/code&gt; from &lt;code&gt;document_export&lt;/code&gt; from &lt;code&gt;chat_completion&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;costAmount&lt;/code&gt;&lt;/strong&gt; dollars, not cents. Pass &lt;code&gt;0.05&lt;/code&gt;, not &lt;code&gt;5&lt;/code&gt; for 5 cents.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;code&gt;costInput&lt;/code&gt;&lt;/strong&gt; model and provider metadata. Used for cost attribution when you want Tanso to calculate costs from usage rather than passing them explicitly.&lt;/p&gt;

&lt;p&gt;That's it. No batch jobs. No ETL. No scraping provider invoices.&lt;/p&gt;
&lt;h2&gt;
  
  
  What you get
&lt;/h2&gt;

&lt;p&gt;Once events are flowing, Tanso aggregates them in real time by customer and feature.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Margin by customer.&lt;/strong&gt; You know what &lt;code&gt;cus_123&lt;/code&gt; costs you this billing period, broken down by feature. Compare that to what they're paying. That's your margin.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Margin by feature.&lt;/strong&gt; If &lt;code&gt;ai_summarization&lt;/code&gt; on your Starter plan is consistently underwater, you see it before it shows up as a bad quarter.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Usage against plan limits.&lt;/strong&gt; Tanso tracks &lt;code&gt;usageUnits&lt;/code&gt; against the feature's limit on the customer's plan. The entitlement check API (&lt;code&gt;POST /api/v1/client/entitlements/check&lt;/code&gt;) returns current usage and limit in real time, so you can gate access before a customer blows past their quota.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Automatic Stripe sync.&lt;/strong&gt; Events flow through to Stripe Billing Meters and land on the customer's next invoice. You don't manage the billing side separately.&lt;/p&gt;
&lt;h2&gt;
  
  
  Works from anywhere
&lt;/h2&gt;

&lt;p&gt;You don't need a dedicated service to send events. Tanso's event API is an HTTP POST. That means it works from:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Your backend&lt;/strong&gt; add the call after any AI API response&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Your terminal&lt;/strong&gt; curl for one-off testing or backfilling&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;An AI agent&lt;/strong&gt; Tanso exposes an MCP server, so Claude Code and other agents can instrument their own AI calls natively, or query cost data while they work
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl &lt;span class="nt"&gt;-X&lt;/span&gt; POST http://localhost:8080/api/v1/client/events &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Content-Type: application/json"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-H&lt;/span&gt; &lt;span class="s2"&gt;"Authorization: Bearer sk_test_67d9fb04f0344036ba92ecc973f1445a"&lt;/span&gt; &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "eventIdempotencyKey": "550e8400-e29b-41d4-a716-446655440000",
    "eventName": "chat_completion",
    "customerReferenceId": "cus_123",
    "featureKey": "ai_summarization",
    "costInput": {
      "model": "gpt-4o",
      "modelProvider": "openai"
    },
    "usageUnits": 1847,
    "costAmount": 0.05
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  Get started
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Get an API key from the &lt;a href="https://dashboard.tansohq.com" rel="noopener noreferrer"&gt;Tanso dashboard&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Configure a feature on your plan (e.g., &lt;code&gt;ai_summarization&lt;/code&gt;) with the expected pricing model&lt;/li&gt;
&lt;li&gt;Add the event call after each AI API response in your code&lt;/li&gt;
&lt;li&gt;Check the dashboard, cost and usage data appears immediately&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If you want to verify an event landed correctly, the dashboard shows raw event history per customer. You can also check a customer's current entitlement state at any time via the entitlement API.&lt;/p&gt;



&lt;p&gt;Tanso is built for teams shipping on top of multiple AI APIs who need to know their economics at the customer level, not just at the invoice level. The event API is the foundation. Everything else, entitlement checks, metered billing, plan enforcement, runs on the same data.&lt;/p&gt;

&lt;p&gt;Would love to hear if this is helpful or not. &lt;a href="https://cal.com/katrina-laszlo/meeting?duration=15&amp;amp;overlayCalendar=true" rel="noopener noreferrer"&gt;Happy to chat!&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The Docs:&lt;br&gt;
&lt;/p&gt;
&lt;div class="crayons-card c-embed text-styles text-styles--secondary"&gt;
    &lt;div class="c-embed__content"&gt;
      &lt;div class="c-embed__body flex items-center justify-between"&gt;
        &lt;a href="https://tanso-core.readme.io/reference/createcustomer" rel="noopener noreferrer" class="c-link fw-bold flex items-center"&gt;
          &lt;span class="mr-2"&gt;tanso-core.readme.io&lt;/span&gt;
          

        &lt;/a&gt;
      &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;



</description>
      <category>ai</category>
      <category>saas</category>
      <category>billing</category>
      <category>devops</category>
    </item>
    <item>
      <title>We built an MCP server so AI coding tools can set up your entire billing system</title>
      <dc:creator>Kat Laszlo</dc:creator>
      <pubDate>Wed, 18 Mar 2026 21:55:09 +0000</pubDate>
      <link>https://dev.to/tanso/we-built-an-mcp-server-so-ai-coding-tools-can-set-up-your-entire-billing-system-3npd</link>
      <guid>https://dev.to/tanso/we-built-an-mcp-server-so-ai-coding-tools-can-set-up-your-entire-billing-system-3npd</guid>
      <description>&lt;h1&gt;
  
  
  We built an MCP server so AI coding tools can set up your entire billing system
&lt;/h1&gt;

&lt;p&gt;Every AI and API company we've talked to ends up building the same internal system. Redis counters tracking credits. Cron jobs reconciling usage. If-statements scattered across the codebase gating feature access. It starts as a quick hack when you launch your first pricing tier and becomes a permanent headache every time pricing changes.&lt;/p&gt;

&lt;p&gt;Billing platforms like Stripe handle what happens after usage. They meter events, generate invoices, process payments. But nothing in that stack answers the question that matters at runtime: should this request be allowed to run?&lt;/p&gt;

&lt;p&gt;Does this customer have enough credits? Are they within their plan limits? Is this feature included in their subscription? That logic is still on your engineering team.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;That's what we built Tanso for.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One API call before the request runs. Subscription state, usage limits, and credit balance checked simultaneously. Allow or deny. If denied, no compute runs. No cost incurred. No surprise invoice.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Check before running compute&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;isAllowed&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;tanso&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;entitlements&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;evaluate&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
  &lt;span class="na"&gt;customerReferenceId&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cust_482&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;featureKey&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ai-analysis&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;usage&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;usageUnits&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;

&lt;span class="c1"&gt;// Denied? No compute runs. No cost incurred.&lt;/span&gt;
&lt;span class="k"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isAllowed&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;status&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;403&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// Safe to run. This request is billable.&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;openai&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;chat&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;completions&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;create&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt; &lt;span class="p"&gt;...&lt;/span&gt; &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  The MCP server
&lt;/h2&gt;

&lt;p&gt;We shipped an MCP server with 34 tools so AI coding tools can configure the whole thing. Claude Code, Cursor, VS Code, Windsurf, and ChatGPT can:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create plans with graduated pricing tiers&lt;/li&gt;
&lt;li&gt;Link features with usage limits and cost models&lt;/li&gt;
&lt;li&gt;Onboard customers and create subscriptions&lt;/li&gt;
&lt;li&gt;Check entitlements and ingest usage events&lt;/li&gt;
&lt;li&gt;Set up model-aware cost tracking for LLM spend&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;No dashboard clicking required. Point your coding agent at the MCP and describe what you want.&lt;/p&gt;

&lt;p&gt;MCP config:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"mcpServers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"tanso"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"url"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"https://api.tansohq.com/mcp"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="nl"&gt;"headers"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
        &lt;/span&gt;&lt;span class="nl"&gt;"X-API-Key"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"sk_live_your_api_key_here"&lt;/span&gt;&lt;span class="w"&gt;
      &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;We also have AI-native docs so coding agents can read the full API in context: &lt;a href="https://tansohq.com/llms-mcp.txt" rel="noopener noreferrer"&gt;https://tansohq.com/llms-mcp.txt&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How it fits with Stripe
&lt;/h2&gt;

&lt;p&gt;Tanso plugs into your existing Stripe setup. You define plans and features in Tanso. Invoices push to Stripe. Payment status flows back automatically. Your payment processor still handles transactions. Tanso controls the pricing logic in your product.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we're seeing
&lt;/h2&gt;

&lt;p&gt;Every team we talk to has some version of this held together with internal tools. The pattern is always the same:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ship a simple pricing tier&lt;/li&gt;
&lt;li&gt;Hardcode some limits&lt;/li&gt;
&lt;li&gt;Pricing changes, nothing updates&lt;/li&gt;
&lt;li&gt;Customers exceed limits, nobody notices until the invoice&lt;/li&gt;
&lt;li&gt;Spend weeks rebuilding&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If that sounds familiar, we'd love to hear what you ended up building. What broke first?&lt;/p&gt;

&lt;p&gt;Self-serve is live with a free tier at &lt;a href="https://tansohq.com?utm_source=devto&amp;amp;utm_medium=blog&amp;amp;utm_campaign=mcp-launch" rel="noopener noreferrer"&gt;tansohq.com&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>mcp</category>
      <category>saas</category>
      <category>showdev</category>
    </item>
  </channel>
</rss>
