<?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: Michael Beckett</title>
    <description>The latest articles on DEV Community by Michael Beckett (@michael_beckett).</description>
    <link>https://dev.to/michael_beckett</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%2F3822000%2Fbaa14532-8afb-43bd-be5e-136981ba96d2.jpg</url>
      <title>DEV Community: Michael Beckett</title>
      <link>https://dev.to/michael_beckett</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/michael_beckett"/>
    <language>en</language>
    <item>
      <title>I Built Docusign for AI Agents — Here's How</title>
      <dc:creator>Michael Beckett</dc:creator>
      <pubDate>Fri, 13 Mar 2026 10:02:01 +0000</pubDate>
      <link>https://dev.to/michael_beckett/i-built-docusign-for-ai-agents-heres-how-dnh</link>
      <guid>https://dev.to/michael_beckett/i-built-docusign-for-ai-agents-heres-how-dnh</guid>
      <description>&lt;p&gt;AI agents can negotiate deals, draft contracts, manage entire business relationships.&lt;/p&gt;

&lt;p&gt;But the moment they need someone to actually &lt;strong&gt;sign&lt;/strong&gt; something? The whole flow breaks.&lt;/p&gt;

&lt;p&gt;DocuSign needs a browser. HelloSign needs OAuth. Adobe Sign needs... well, Adobe Sign. None of them were designed for a world where the sender isn't human.&lt;/p&gt;

&lt;p&gt;So I built &lt;a href="https://signb.ee" rel="noopener noreferrer"&gt;signb.ee&lt;/a&gt; — document signing infrastructure built for AI agents.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;I was building AI agent workflows and kept hitting the same wall. The agent could:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;✅ Draft an NDA based on a conversation&lt;/li&gt;
&lt;li&gt;✅ Negotiate terms back and forth&lt;/li&gt;
&lt;li&gt;✅ Agree on final language&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But then what? Copy-paste into DocuSign? Open a browser? That's not how agents work.&lt;/p&gt;

&lt;p&gt;I needed a single API call that takes markdown (which every LLM outputs natively) and handles the entire signing ceremony — verification, signatures, certificates, delivery.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Solution: One Endpoint
&lt;/h2&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 https://signb.ee/api/v1/send &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;-d&lt;/span&gt; &lt;span class="s1"&gt;'{
    "markdown": "# Mutual NDA\n\nTerms here...",
    "sender_name": "Alice",
    "sender_email": "alice@company.com",
    "recipient_name": "Bob",
    "recipient_email": "bob@acme.com"
  }'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. Signbee:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Converts the markdown to a clean PDF&lt;/li&gt;
&lt;li&gt;Verifies the sender (API key or email OTP)&lt;/li&gt;
&lt;li&gt;Emails the recipient a signing link&lt;/li&gt;
&lt;li&gt;Both parties choose a signature style and sign&lt;/li&gt;
&lt;li&gt;Both receive a SHA-256 certified PDF with a tamper-proof signing certificate&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;No SDK. No OAuth dance. No browser automation.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tech Decisions That Matter
&lt;/h2&gt;

&lt;h3&gt;
  
  
  PDF Generation: pdf-lib, not Puppeteer
&lt;/h3&gt;

&lt;p&gt;My first instinct was Puppeteer — render HTML, screenshot to PDF. It works locally but is a nightmare on serverless. Chromium binaries are 50MB+, cold starts are brutal, and Vercel's function size limits kill it.&lt;/p&gt;

&lt;p&gt;I switched to &lt;a href="https://github.com/Hopding/pdf-lib" rel="noopener noreferrer"&gt;pdf-lib&lt;/a&gt; — a pure JavaScript PDF library. Zero native dependencies. Works everywhere. The signing certificate page (with both signatures, timestamps, IPs, and SHA-256 hash) is built programmatically:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;PDFDocument&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;StandardFonts&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;pdf-lib&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;pdfDoc&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;PDFDocument&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;load&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;originalPdfBytes&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;page&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;pdfDoc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addPage&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="mi"&gt;595&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;842&lt;/span&gt;&lt;span class="p"&gt;]);&lt;/span&gt; &lt;span class="c1"&gt;// A4&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;helveticaBold&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;pdfDoc&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;embedFont&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;StandardFonts&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;HelveticaBold&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="nx"&gt;page&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;drawText&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;SIGNING CERTIFICATE&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;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;y&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;750&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;font&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;helveticaBold&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;size&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;18&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;rgb&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.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;// ... signatures, timestamps, SHA-256 hash&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Cold starts went from 8s to &amp;lt;500ms. Bundle size dropped by 95%.&lt;/p&gt;

&lt;h3&gt;
  
  
  Authentication: No API Key Required
&lt;/h3&gt;

&lt;p&gt;Most developer APIs gate everything behind API keys. I wanted agents to be able to send documents without any prior setup. Here's how it works:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Without API key:&lt;/strong&gt; Sender gets an email OTP to verify their identity. Slight friction, but zero setup.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With API key:&lt;/strong&gt; Sender is pre-verified, recipient gets the signing link immediately. Zero friction.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This means any agent can call the API right now — no registration, no dashboard, no key management. Just &lt;code&gt;POST&lt;/code&gt; and go.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Cookie Bug That Nearly Killed Launch
&lt;/h3&gt;

&lt;p&gt;The most painful bug was invisible. Everything worked on &lt;code&gt;localhost&lt;/code&gt;. Login, signing, dashboard — perfect.&lt;/p&gt;

&lt;p&gt;In production? Users logged in successfully (200 response) but got immediately bounced back to the login page.&lt;/p&gt;

&lt;p&gt;The culprit: &lt;strong&gt;BetterAuth prefixes cookies with &lt;code&gt;__Secure-&lt;/code&gt; on HTTPS&lt;/strong&gt;. My middleware was checking for &lt;code&gt;better-auth.session_token&lt;/code&gt; but production was setting &lt;code&gt;__Secure-better-auth.session_token&lt;/code&gt;. One-line fix:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight typescript"&gt;&lt;code&gt;&lt;span class="c1"&gt;// Before (broken in production)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;better-auth.session_token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;span class="c1"&gt;// After (works everywhere)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;session&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;__Secure-better-auth.session_token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt;
  &lt;span class="nx"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;better-auth.session_token&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Classic "works on my machine" bug. If you're using BetterAuth with HTTPS, check your cookie names.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Signing Flow
&lt;/h2&gt;

&lt;p&gt;Here's what happens end-to-end when an agent sends a contract:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Agent calls POST /api/v1/send
  → Markdown converted to PDF, uploaded to blob storage
  → Sender gets OTP email (or skipped with API key)

Sender clicks verification link
  → Creates account + chooses signature style
  → Signs the document
  → Recipient gets email with signing link

Recipient clicks signing link
  → Reviews the PDF
  → Chooses signature style + signs
  → Both parties get the final PDF with signing certificate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The signing certificate includes:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Both parties' names and signatures&lt;/li&gt;
&lt;li&gt;Timestamps (UTC) for each signature&lt;/li&gt;
&lt;li&gt;IP addresses&lt;/li&gt;
&lt;li&gt;SHA-256 hash of the complete document&lt;/li&gt;
&lt;li&gt;Verification URL&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What I'd Build Differently
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;An MCP server from day one.&lt;/strong&gt; Right now, agents need to know about the API to use it. An MCP server would let Claude, Cursor, and Windsurf discover Signbee automatically — no docs required. The agent would just see a &lt;code&gt;send_document&lt;/code&gt; tool available. That's next on the list.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Webhook notifications.&lt;/strong&gt; Currently, both parties get emails. But an agent can't check email. A webhook that fires when the document is fully signed would close the loop for automated workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try It
&lt;/h2&gt;

&lt;p&gt;The API is live at &lt;a href="https://signb.ee" rel="noopener noreferrer"&gt;signb.ee&lt;/a&gt; with a free tier (5 docs/month). No credit card required.&lt;/p&gt;

&lt;p&gt;If you're using agent skills, install it with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npx skills add signbee/skill &lt;span class="nt"&gt;--skill&lt;/span&gt; signbee &lt;span class="nt"&gt;-g&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;a href="https://signb.ee/openapi.json" rel="noopener noreferrer"&gt;OpenAPI spec&lt;/a&gt; and &lt;a href="https://signb.ee/llms.txt" rel="noopener noreferrer"&gt;llms.txt&lt;/a&gt; are both available for agent consumption.&lt;/p&gt;

&lt;p&gt;I'd love feedback on the API design — especially from anyone building agent workflows. What's missing? What would make this more useful for your agents?&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Built by &lt;a href="https://twitter.com/mjcbeckett" rel="noopener noreferrer"&gt;Michael Beckett&lt;/a&gt;. Follow &lt;a href="https://twitter.com/signbee" rel="noopener noreferrer"&gt;@signbee&lt;/a&gt; for updates.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>webdev</category>
      <category>api</category>
      <category>opensource</category>
    </item>
  </channel>
</rss>
