Skip to main content
Convex Components are independent, sandboxed TypeScript modules that add features to your Convex backend. Each component manages its own tables, functions, and state. Install with npm, register in convex.config.ts, and start using.

Pre-installed

mf² ships with five components already registered:
ComponentPackagePurpose
Stripe@convex-dev/stripeCheckout sessions, subscriptions, customer management, webhook sync
Resend@convex-dev/resendTransactional email delivery with event tracking
Workflow@convex-dev/workflowDurable, long-running code flows with retries and delays
Action Retrier@convex-dev/action-retrierAutomatic retry with backoff for unreliable external calls
Migrations@convex-dev/migrationsSchema migrations for live data without downtime
Register them in packages/backend/convex/convex.config.ts:
packages/backend/convex/convex.config.ts
import { defineApp } from "convex/server";
import actionRetrier from "@convex-dev/action-retrier/convex.config.js";
import migrations from "@convex-dev/migrations/convex.config.js";
import resend from "@convex-dev/resend/convex.config.js";
import stripe from "@convex-dev/stripe/convex.config.js";
import workflow from "@convex-dev/workflow/convex.config.js";

const app = defineApp();
app.use(actionRetrier);
app.use(migrations);
app.use(resend);
app.use(stripe);
app.use(workflow);

export default app;

Adding a component

Install the package and register it:
bun add @convex-dev/rate-limiter
packages/backend/convex/convex.config.ts
import rateLimiter from "@convex-dev/rate-limiter/convex.config.js";

app.use(rateLimiter);
Then use it in your Convex functions via the generated components object:
packages/backend/convex/example.ts
import { components } from "./_generated/api";
Each component sandboxes its own tables. They don’t mix with your app tables and can only interact through explicitly defined APIs. Components that pair well with the mf² stack:

AI

ComponentPackageWhat it does
AI Agent@convex-dev/agentThread management, tool integration, streaming, and message history for AI agents
RAG@convex-dev/ragVector search and retrieval-augmented generation with configurable embeddings
Persistent Text Streaming@convex-dev/persistent-text-streamingStream AI text to the browser while storing it to the database
Action Cache@convex-dev/action-cacheCache expensive AI calls with optional expiration

Backend

ComponentPackageWhat it does
Rate Limiter@convex-dev/rate-limiterType-safe, transactional rate limiting with token bucket and fixed window strategies
Presence@convex-dev/presenceTrack which users are online in real time
Workpool@convex-dev/workpoolPriority queues for async operations with customizable concurrency

Database

ComponentPackageWhat it does
Aggregate@convex-dev/aggregateDenormalized sums and counts that scale
Sharded Counter@convex-dev/sharded-counterHigh-throughput increment/decrement counters
Geospatial@convex-dev/geospatialQuery points on a map within a selected region

Integrations

ComponentPackageWhat it does
Collaborative Text Editor@convex-dev/prosemirror-syncReal-time collaborative editing with Tiptap or BlockNote
Cloudflare R2@convex-dev/r2File storage and serving from Cloudflare R2
Expo Push Notifications@convex-dev/expo-push-notificationsPush notifications with batching and retries

Payments

ComponentPackageWhat it does
Polar@convex-dev/polarSubscriptions and billing via Polar
Autumn@useautumn/convexUsage-based pricing and billing database

Learn More

Convex Components directory Component authoring docs