Build vs. Buy in the Agent Era: Shipping “Disposable” Internal CLI & FastAPI Tools in an Afternoon

32% of firms are skipping SaaS purchases to build with coding agents, and Gartner named Disposable Applications a top 2027 trend. Here is how to ship single-file uv CLIs and FastAPI+SQLite micro-apps—and retire them cleanly.

For twenty years, the default engineering rule was simple: never build what you can buy. That rule made sense when software was scarce and a custom internal tool meant weeks of scaffolding, CI pipelines, and ongoing maintenance.

In 2026, that math flipped. McKinsey’s August 2026 survey found that 32% of organizations skipped a software purchase to build the tool in-house with coding agents. Two months later, Gartner named Disposable Applications one of its Top 10 Strategic Technology Trends for 2027—purpose-built software designed to solve a specific problem and be cleanly retired once the job is done.

When a $30/seat SaaS subscription takes three weeks of procurement and security review, a coding agent can help you ship a 150-line CLI or FastAPI micro-app in an afternoon. The catch? If you don’t design it to be disposable from day one, you just created tomorrow’s legacy technical debt.

The Two Rules of Disposable Software

  • Zero-sprawl packaging: No multi-service architectures, no shared database migrations, and no sprawling dependency trees. One file (or one tiny directory) should hold the entire tool.
  • Pre-planned decommissioning: Every disposable tool gets a hard sunset date, a self-contained data store (like a single SQLite file), and a 2-minute teardown path.

Pattern 1: The Single-File CLI with uv (PEP 723)

Before reaching for a web UI, ask if a sharp command-line tool solves 90% of the problem. Using Python’s PEP 723 inline script metadata with uv, you can bundle dependencies right inside the script—no requirements.txt, no manual virtualenv activation, and trivial cleanup:

#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.12"
# dependencies = ["httpx", "rich"]
# ///

import sys
import httpx
from rich.table import Table
from rich.console import Console

# Example: quick internal endpoint health & latency audit
urls = sys.argv[1:] or ["https://example.com/health"]
table = Table(title="Service Audit")
table.add_column("URL")
table.add_column("Status")
table.add_column("Latency (ms)")

for url in urls:
    r = httpx.get(url, timeout=5.0)
    table.add_row(url, str(r.status_code), f"{r.elapsed.total_seconds()*1000:.1f}")

Console().print(table)

Run it with chmod +x audit.py && ./audit.py. When the migration or audit is over, retiring it is literally rm audit.py.

Pattern 2: The Afternoon FastAPI + SQLite Micro-App

When non-engineers need a form, an approval queue, or a temporary dashboard, a single-file FastAPI + SQLite app behind Caddy beats buying a SaaS tool for a 60-day project:

# /// script
# requires-python = ">=3.12"
# dependencies = ["fastapi[standard]"]
# ///

import os
import sqlite3
from fastapi import FastAPI, Form
from fastapi.responses import HTMLResponse

SUNSET_DATE = os.getenv("SUNSET_DATE", "2027-03-01")
DB_PATH = "disposable_requests.db"

app = FastAPI(title="Temp Intake Tool")

def get_db():
    conn = sqlite3.connect(DB_PATH)
    conn.execute("PRAGMA journal_mode=WAL;")
    conn.execute("CREATE TABLE IF NOT EXISTS items (id INTEGER PRIMARY KEY, note TEXT, created TIMESTAMP DEFAULT CURRENT_TIMESTAMP)")
    return conn

@app.get("/", response_class=HTMLResponse)
def index():
    with get_db() as db:
        rows = db.execute("SELECT id, note, created FROM items ORDER BY id DESC LIMIT 20").fetchall()
    items_html = "".join(f"<li>#{r[0]}: {r[1]} ({r[2]})</li>" for r in rows)
    return f'''
    <p><strong>Notice:</strong> Disposable internal tool. Scheduled sunset: {SUNSET_DATE}</p>
    <form method="post" action="/submit">
      <input name="note" required placeholder="Request details" />
      <button type="submit">Submit</button>
    </form>
    <ul>{items_html}</ul>
    '''

@app.post("/submit", response_class=HTMLResponse)
def submit(note: str = Form(...)):
    with get_db() as db:
        db.execute("INSERT INTO items (note) VALUES (?)", (note,))
    return index()

Front it with a three-line Caddy block on your internal tailnet or VPN (reverse_proxy 127.0.0.1:8000), and you have automatic HTTPS with zero database server to manage.

When Not to Build Disposable

Coding agents make it dangerously easy to over-build. Skip the disposable approach and buy—or integrate into your core platform—when the tool involves:

  • Regulated PII, PHI, or payment data: Compliance scope (SOC 2, HIPAA, PCI) outlives any afternoon script.
  • Systems of record: If three other teams start building integrations against your SQLite endpoint, it is no longer disposable.
  • Complex auth & RBAC: If you need fine-grained multi-tenant permissions, put it behind your existing identity provider (like Keycloak) or buy the SaaS.

The 2-Minute Sunset Checklist

Gartner’s point about durable agility is that retiring software cleanly is just as important as shipping it fast. Put a calendar reminder on the SUNSET_DATE to run:

# 1. Archive the data
sqlite3 -header -csv disposable_requests.db "SELECT * FROM items;" > archive_2027-03-01.csv

# 2. Stop the service, remove the Caddy route, and delete the runtime dir
sudo systemctl disable --now temp-intake.service
rm -rf /opt/temp-intake

Bottom Line

In the agent era, the cheapest code is often code you write for one specific quarter and delete when the quarter ends. Keep the footprint to a single file, store state in portable SQLite, and bake the teardown date right into the UI.

Leave a Reply