seo-agent runs as two Supabase edge functions over your Postgres, driven by a content adapter you write. Everything generic (rankings, competitor research, learning, budget, self-ops) ships in the package; you supply your content and your keys.
Prerequisites
- A Supabase project (Postgres + Edge Functions),
supabaseCLI linked. - Node 18+ (to run the cores' tests and the
initCLI). - API keys: Anthropic (LLM), and a SERP provider — Google Custom Search or Serper.dev.
- A
public.is_admin()predicate in your DB (or add the alias the migration notes).
1. Scaffold
node cli/init.mjs ../my-projectThis writes (idempotent — re-run is safe, --force to overwrite):
seo.adapter.ts— the content seam you implement.seo.config.json— providers, budget, cost_rates, cron cadence..env.example— the secrets to set (never commit).supabase/functions/seo-generate/index.ts+.../seo-worker/index.ts— shells withCONFIGURE:markers.supabase/migrations/0000000000_seo_agent.sql— theseo_*schema + hardening.
2. Implement the adapter
Fill listIndexableEntities(): Promise<SeoEntity[]> over your content (see docs/ARCHITECTURE.md).
3. Migrate
Rename the migration with a real timestamp, ensure public.is_admin() exists, then:
supabase db push4. Configure + deploy
- Put
.env.examplevalues into Supabase function secrets / Vault (seedocs/SECURITY.md). - Set providers + budget in
seo.config.json. - Wire the
CONFIGURE:points in both shells (copy the reference fromdocs/REFERENCE-DEPLOYMENT.md), then:
supabase functions deploy seo-generate seo-worker --no-verify-jwt5. Schedule + seed
- Schedule the four crons from
seo.config.json(docs/OPERATIONS.md). - Run Update SEO once to seed the profile, then review proposals in your admin.
Verify the delivery
shasum -a 256 -c MANIFEST.sha256 # all OK == untampered
npm test # all green == intact