Install

Scaffold, implement the adapter, migrate, configure, deploy and schedule.

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), supabase CLI linked.
  • Node 18+ (to run the cores' tests and the init CLI).
  • 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-project

This 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 with CONFIGURE: markers.
  • supabase/migrations/0000000000_seo_agent.sql — the seo_* 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 push

4. Configure + deploy

  • Put .env.example values into Supabase function secrets / Vault (see docs/SECURITY.md).
  • Set providers + budget in seo.config.json.
  • Wire the CONFIGURE: points in both shells (copy the reference from docs/REFERENCE-DEPLOYMENT.md), then:
supabase functions deploy seo-generate seo-worker --no-verify-jwt

5. 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