A fully autonomous (de)motivational meme website. Once per day, an AI agent finds or invents a new trash-animal blessing, renders it in early-2000s glitter WordArt, and publishes it β with zero redeploys and zero humans involved. Visitors and per-blessing adoration are counted in a real Postgres database. The whole thing is one npm project on Wasmer Edge.
Wasmer Edge auto-detects Node projects. A plain package.json with a
start script that binds process.env.PORT is the entire contract:
{
"type": "module",
"scripts": { "start": "node server/index.js" },
"dependencies": { "express": "^5", "pg": "^8", "@openai/agents": "^0.1" }
}
Connect the GitHub repo to the app once, and from then on
git push is the deploy β Wasmer builds remotely on every push.
(A manual wasmer deploy --build-remote works too, for the impatient.)
Two platform capabilities carry the design (the cron job is deliberately not in here β see step 5):
kind: wasmer.io/App.v0
name: ur-blessing-machine
package: .
capabilities:
database:
engine: postgres # managed pg, creds injected as DB_* env vars
volumes:
- name: blessings
mount: /data/blessings # s3-backed, survives deploys, shared rw
The volume is the trick: the agent writes images + a JSON manifest there, the server serves it statically, and the frontend merges it with the seed manifest β so new content appears without redeploying.
The managed database injects DB_HOST, DB_PORT,
DB_NAME, DB_USERNAME, DB_PASSWORD.
One gotcha that will eat ur afternoon: the server requires TLS, and
node-postgres doesn't enable it by default:
new pg.Pool({ ..., ssl: { rejectUnauthorized: false } })
Migrate from ur laptop by revealing the creds
(wasmer app secret reveal DB_HOST β¦) and running
psql with PGSSLMODE=require. This site's counter is two
tiny tables: visits(day, total) and blessing_views(id, views),
upserted with ON CONFLICT β¦ DO UPDATE.
An OpenAI Agents SDK
scout with a web-search tool hunts for an existing meme; if the internet disappoints,
it invents a caption ("sincere, slightly unhinged, lowercase") and
gpt-image-1 renders it with the text baked in, glitter and all.
Structured output via a zod schema keeps the result machine-usable:
const scout = new Agent({
model: 'gpt-5',
tools: [webSearchTool()],
outputType: MemeConcept, // zod: animal, caption, mood, β¦
instructions: 'STRICTLY NO RATSβ¦',
});
The daily edge job just fetches an endpoint; the express server runs
the agent in-process and writes straight to the mounted volume. No CI, no
external cron, no relay.
API keys live in app secrets (wasmer app secret create OPENAI_API_KEY β¦),
injected as env vars on deploy. The trigger endpoint fails closed: no
TRIGGER_TOKEN configured β 503; wrong X-Api-Key β 401.
Only the cron job (and u) can summon new blessings.
Here's the subtle part: cron jobs have a source. Jobs defined in
app.yaml are config-sourced β their headers live in the repo (token
leak, if ur repo is public like ours) and the API refuses to edit them.
So the daily job is created as an API-sourced job instead β via the
dashboard's Jobs page or the (undocumented) createCronJob
GraphQL mutation β with the X-Api-Key header attached there.
Token stays out of git, job stays editable, midnight stays blessed.
Zero-build vanilla HTML with a deterministic daily pick β everyone sees the same
blessing all day (epochDay Γ 2654435761 mod n, a golden-ratio hash so
consecutive days don't walk the list in order). Deep links are plain URL hashes
(#some-blessing-id), and the hall of fame ranks every blessing ever by
adoration count from /api/fame. Also: sparkle cursor trail. Non-negotiable.
You don't have to build any of this by hand. This entire guide exists as a self-contained agent skill β complete working code for every file, the full deployment sequence, and every gotcha we hit so ur agent doesn't have to. Paste this to your coding agent (Claude Code, Codex, whatever):
Read https://trash.delivery/skill.md and follow it. Build me a daily AI-generated site about <YOUR THEME HERE>. Go.
The agent picks a name, writes the code, deploys, sets secrets, migrates the database, and verifies the whole loop end to end. That claim is not hypothetical: this very site was built exactly that way β the skill is the distilled transcript of an agent doing it, mistakes removed.
Do NOT paste ur API keys into the chat. The skill instructs the
agent to refuse them and walk u through the safe way instead:
wasmer login in ur own terminal (the agent never sees the
token) and keys as env vars the agent references but never reads. Chat
logs live forever. Treat them like the dumpster: assume everything in
there will be found by a raccoon eventually.
npm init -y && npm i express pg @openai/agents zod # write server/, agent/, public/, app.yaml (see above) wasmer deploy --build-remote # first deploy; then connect the repoβ¦ wasmer app secret create OPENAI_API_KEY sk-β¦ wasmer app secret create TRIGGER_TOKEN $(openssl rand -hex 24) PGSSLMODE=require psql β¦ -f migrations.sql git push # β¦and this is the deploy now. secrets apply on the next one
Or skip the typing entirely: the full source lives at github.com/baalimago/motivational-racoon-and-friends β fork it, swap the animals, ship ur own blessings.