templates · alpha

Templates.

5 Vercel-deployable templates that drop @ar-agents/* into common production patterns. Each one ships on Edge Runtime, ships an Experimental_Agent loop, and handles the gotchas the cookbook documents. 1-click deploy. SLSA-provenanced dependencies.

The toolkit ships libraries; the templates ship runnable applications. Templates are the answer to "I've read the docs, now show me the canonical way to wire this for my use case." They are the "hello world" you would write yourself, except that the maintainer already wrote it and ran it in production at Astro.

Each template clones from a versioned subtree of the main repo and deploys on Vercel via 1-click clone. Env vars are documented per template; on first deploy the cron jobs are pre-scheduled, the webhook URLs are pre-generated, the audit log is pre-wired.

Starter · 1

Sociedad-IA starterLive

The flagship template. Wires the 8 most-common @ar-agents/* packages (identity, gde-tad, mercadopago, banking, facturacion, igj, boletin-oficial, whatsapp) into a single Next.js app with: agent endpoint, MP webhook receiver, morning-cron operating loop, status page. Configurable via env vars only, degrades gracefully if any client is missing.

identitygde-tadmercadopagobankingfacturacionigjboletin-oficialwhatsapp

Production patterns · 2

SaaS billing on Mercado PagoAlpha, clone-readyrecipe R02

Reusable Plan + per-customer subscribe_to_plan + recurring auto-charge + card swap on expiration. The closest you can get to Stripe-billing-on-Argentine-rails. Includes webhook handler with HMAC verify + replay defense + dunning sequence. Source: cookbook recipe R02 (single-file, lift into a Next.js app of your choice).

mercadopagofacturacionwhatsapp
Marketplace · seller OAuth + splitAlpha, clone-readyrecipe R04

Rappi / Tienda Nube pattern. Seller OAuth onboarding, marketplace fee split, AFIP padron validation on each new seller, monotributo-category-aware tier rules. VercelKVOAuthTokenStore for token persistence. Source: cookbook recipe R04.

mercadopagoidentitywhatsapp

Infrastructure / agent commerce · 2

ACP checkout · LLM-buyer storefrontLiverecipe R16

Stripe-style hosted checkout where the buyer is an LLM agent (ChatGPT Instant Checkout / Claude tool calls / Gemini extensions). Server auto-emits AFIP/ARCA factura A/B/C/E on payment confirmation. /.well-known/acp.json discovery built in. Reference impl in apps/bridge-hello + cookbook recipe R16.

agentic-commerce-bridgemercadopagofacturacion
MCP host · Claude Desktop / Cursor / ContinueLive

Bundles the full @ar-agents/mcp toolkit as a stdio MCP server you can drop into any MCP client. Configure with the same env vars as the underlying packages; the doctor CLI (ar-agents-mcp doctor) tells you which surfaces are wired. Use this when you want every AR ops capability available from inside an existing host.

mcp

How a template is structured

Every template follows the same skeleton: a Next.js app with one app/api/agent/route.ts that owns the agent loop, a app/api/webhook/[provider]/route.ts per upstream, an app/cron/morning/route.ts wired to Vercel Cron, and a single lib/agent.ts that builds the Experimental_Agent with all needed tool collections spread in. Reading one template teaches all of them.

What's different from rolling your own

Edge-Runtime first. Templates use export const runtime = "edge"on every route. Cold starts < 100ms. Web Crypto only. No Node-specific deps surface in the agent loop.

HMAC audit log on by default. Every tool call is wrapped in AuditLogger.wrap() with timestamp signing. RFC-001 § 9 compliance out of the box.

HITL gates pre-wired. The 8 irreversible tools have the requireConfirmation callback set to a Slack-style approval URL by default. Replace with your own UI when ready.

OpenTelemetry-ready.Templates wire the toolkit's OTel instrumentation behind an env-var flag. Set OTEL_EXPORTER_OTLP_ENDPOINT and traces start flowing.

Submission to Vercel marketplace

We're submitting these to vercel.com/templates in batches. The MCP-host template is in review. Sociedad-IA starter is next. Watch the releases feed for status.