← Blog

I Had an AI Agent Build, Deploy, and Instrument a Course Platform While I Watched

Nissan Dookeran6 min readOpenClawAI agentsFly.iodeployment

Here's something that happened this week that I can't stop thinking about.

I run OpenClaw — a self-hosted AI agent framework that lives on my Mac Mini and manages my digital life. One of the agents, Loki, is my primary assistant. This week I asked Loki to deploy OpenClaw Academy — a course platform we'd built locally — to the public internet.

I didn't write a deployment script. I didn't configure anything manually. I just said "deploy this to Fly.io" and watched.


What OpenClaw Academy is

Before the how, the what.

OpenClaw Academy is a free, open-source course platform for learning how OpenClaw works under the hood. 10 modules, 33 lessons:

  • Gateway architecture and WebSocket protocol
  • How the agent lifecycle works
  • The skill system and hooks
  • Security model and prompt injection defences
  • Configuration deep-dive
  • Real-world deployment patterns

Built on FastAPI + HTMX + SQLite. Dark theme. Quizzes. Progress tracking. Runs in Docker. Clone it and you're running locally in about 30 seconds.

Live: openclaw-academy.fly.dev
GitHub: reddinft/openclaw-academy


The deployment session

I asked Loki to deploy the academy and get some basic analytics going. Here's what happened over the next 20 minutes. I'm paraphrasing the actual session but the steps are real.

Step 1: Evaluate the options

Loki checked the codebase (FastAPI + SQLite), noted that Vercel wouldn't work without swapping the database layer, and gave me three options: Railway (proven, ~$5/mo), Fly.io (free with card on file, Docker-native), Vercel + Turso (free but requires a DB rewrite). It recommended Railway for speed and Fly.io for the long-term free tier.

I chose Fly.io. I wanted to actually set up a platform we hadn't touched before.

Step 2: Sign up for Fly.io

Loki opened the browser, navigated to fly.io/app/sign-up, filled in the form, submitted it, then checked Proton Mail via IMAP to retrieve the activation link. The email had been mangled by quoted-printable encoding — a known Proton Bridge quirk — so Loki flagged it and I clicked the verification link myself.

One hCaptcha on the payment page also needed a human. Everything else, including adding the Visa card details pulled from 1Password, was handled automatically.

Step 3: Install flyctl and authenticate

curl -fsSL https://fly.io/install.sh | sh
flyctl auth login --email monkfenix@proton.me --password <from 1password>

No TTY, no browser OAuth dance. Done.

Step 4: Write the fly.toml

Loki wrote a fly.toml for a FastAPI app with a persistent SQLite volume, targeting Sydney, with auto-stop-on-idle to avoid burning free credits:

app = "openclaw-academy"
primary_region = "syd"

[env]
  COURSE_DIR = "/app/course"
  DB_PATH = "/data/progress.db"

[http_service]
  internal_port = 8080
  force_https = true
  auto_stop_machines = "stop"
  auto_start_machines = true
  min_machines_running = 0

[[vm]]
  size = "shared-cpu-1x"
  memory = "256mb"

[[mounts]]
  source = "academy_data"
  destination = "/data"

Step 5: Create the app, provision a volume, deploy

flyctl apps create openclaw-academy --org personal
flyctl volumes create academy_data --region syd --size 1 --app openclaw-academy --yes
flyctl deploy --app openclaw-academy --remote-only

The build took about 45 seconds. The image was 52MB. The app was live at https://openclaw-academy.fly.dev/ returning HTTP 200 within 2 minutes of the deploy command.

Step 6: Analytics — "poor man's" but effective

I asked for the simplest possible visitor tracking: hit counts, geo breakdown, bot detection.

Loki signed up for GoatCounter (privacy-friendly, free, no cookies), added a single script tag to the base template, and wrote a FastAPI middleware that logs every request server-side to the existing SQLite database — capturing path, IP, country (via ip-api.com), user-agent, and whether it's a bot.

Two layers:

  • GoatCounter at openclaw-academy.goatcounter.com — human visitors only, geo map, referrers, auto bot-filtered
  • /stats page at openclaw-academy.fly.dev/stats — raw server-side view including bots, country breakdown, top pages

All stored in the same SQLite volume. Zero extra infrastructure.


What made this possible

A few things worth naming explicitly.

1Password integration. Every credential — Fly.io password, Visa card details, GitHub PAT — was read from 1Password at runtime via op read using a read-only service account token. Nothing in plaintext anywhere.

Browser automation. Loki used Playwright to navigate the Fly.io signup flow, fill the Stripe payment form, and sign up for GoatCounter. The only things that needed me were the hCaptcha image puzzle and one email verification click.

Agent memory. After the session, Loki wrote everything it learned — the correct Fly.io org slug (personal not monk-fenix), the flyctl path, the deploy command pattern — into TOOLS.md and the daily memory file. Next time it needs to deploy something to Fly.io, it won't start from scratch.

Constraints as features. Loki can't install Homebrew packages because our Mac is locked to a non-admin account. That constraint pushed the solution toward curl | sh for flyctl, which is actually the right install method for automation anyway. The security boundary produced better engineering.


The honest version

It wasn't 100% hands-off. I:

  • Solved one hCaptcha image puzzle
  • Clicked one email verification link (Proton Bridge mangled the URL)
  • Said "continue" twice

Everything else — evaluating platforms, writing configs, signing up for services, deploying, writing middleware, pushing to GitHub — was done by the agent.

The session took about 25 minutes wall-clock. I spent maybe 3 of those minutes doing anything.

I find the hCaptcha thing interesting, actually. The last line of defence against automated account creation on most platforms is a visual puzzle that takes a human about 4 seconds to solve. That feels like it should be more uncomfortable to acknowledge than it usually is.


Try it yourself

The academy is live. No login required.

openclaw-academy.fly.dev

The source is fully open. Clone it, run it locally, send us a PR:

github.com/reddinft/openclaw-academy

git clone https://github.com/reddinft/openclaw-academy.git
cd openclaw-academy
docker compose up -d
open http://localhost:8080

Code is MIT. Course content is CC-BY-SA 4.0. Modules 7, 8, and 10 are stubs — patches welcome.


What's next

Three modules are still placeholder content (Config, Extending OpenClaw, Case Study). We'll be filling those in — and if you know OpenClaw well enough to write a lesson, the CONTRIBUTING.md has everything you need.

We're also planning PostHog once there are actual users to track, and a Vercel + Turso migration for the proper free serverless path.

If you're building with OpenClaw, or just curious how agent-assisted deployment works in practice, come say hi.

OpenClaw Discord · @redditech on X