Convex | The backend building blocks for your agents

Source: original

AbstractAbstract Conf. — Sept.02Sign up to be notified about speakers, schedule, & ticket announcements

Product

RealtimeKeep your app up to dateAuthenticationOver 80+ OAuth integrationsConvex ComponentsComponentsIndependent, modular, TypeScript building blocks for your backend.Open sourceSelf host and develop locallyAI CodingGenerate high quality Convex code with AI

Compare

Convex vs. FirebaseConvex vs. SupabaseConvex vs. SQL

Developers

DocumentationGet started with your favorite frameworksSearchSearch across Docs, Stack, and DiscordTemplatesUse a recipe to get started quicklyConvex ChampionsAmbassadors that support our thriving communityConvex for StartupsStart and scale your company with ConvexConvex for Open SourceSupport for open source projectsConvex CommunityShare ideas and ask for help in our community Discord

StackStackStack is the Convex developer portal and blog, sharing bright ideas and techniques for building with Convex.Explore Stack

BlogChangelogDocsPricing

GitHubLog in

Build with confidence

The backend building blocks for your agents

Start building

npm create convex

Everything is code

From database schemas to queries, from auth to APIs, express every part of your backend in pure TypeScript. Your backend code lives next to your app code, is typechecked and autocompleted, and is generated by AI with exceptional accuracy.

Screenshot of code editor

Screenshot of app preview and Convex dashboard

Always in sync

Convex libraries guarantee that your app always reflects changes to your frontend code, backend code, and database state in real time. No need for state managers, cache invalidation policies, or websockets.

Screenshot of code editor

Screenshot of app preview and Convex dashboard

Backend built-ins

Create cron jobs, kick off backend AI workflows, leverage built-in auth, and tap into a growing ecosystem of components that solve common backend needs with just an npm i.

Screenshot of code editor

Screenshot of app preview and Convex dashboard

The backend building blocks for your agents

Start building

npm create convex

Everything is code

From database schemas to queries, from auth to APIs, express every part of your backend in pure TypeScript. Your backend code lives next to your app code, is typechecked and autocompleted, and is generated by AI with exceptional accuracy.

01

Always in sync

Backend built-ins

TypeScriptconvex/todos.tsTypeScriptconvex/schema.ts

import { mutation,query } from"./_generated/server";

import { v } from"convex/values";

exportconstsetComplete=mutation({

args: { id: v.id("todos") },

handler: async (ctx,args) => {

awaitctx.db.patch("todos",args.id, {

// Try checking a todo--nothing happens!

// Change this to true and try again.

completed: false,

});

},

});

exportconstlist=query({…});

exportconstadd=mutation({…});

exportconstsetIncomplete=mutation({…});

Reset code

Try it out!

import { defineSchema,defineTable } from"convex/server";

import { v } from"convex/values";

exportdefaultdefineSchema({

todos: defineTable({

text: v.string(),

category: v.optional(v.string()),

completed: v.boolean(),

}).index("by_completed", ["completed"]),

});

Reactsrc/Todo/TodoApp.tsxTypeScriptconvex/todos.ts

import { api } from"../../convex/_generated/api";

import { TodoList } from"./TodoList";

import { useQuery } from"convex/react";

exportfunctionTodoApp() {

// Load more by changing count to 10.

// Everything updates reactively.

consttodos=useQuery(api.todos.list, { count: 5 });

return TodoListtodos={todos} />;

}

Reset code

Try it out!

import { mutation,query } from"./_generated/server";

import { v } from"convex/values";

exportconstsetComplete=mutation({…});

exportconstlist=query({

args: { count: v.number() },

handler: async (ctx,args) => {

returnawaitctx.db.query("todos").order("desc").take(args.count);

},

});

exportconstadd=mutation({…});

exportconstsetIncomplete=mutation({…});

TypeScriptconvex/crons.tsTypeScriptconvex/categorize.tsTypeScriptconvex/schema.ts

import { cronJobs } from"convex/server";

import { internal } from"./_generated/api";

constcrons=cronJobs();

crons.interval(

"categorize todos",

{ seconds: 5 },

internal.categorize.categorize,

{

// Add categories "Sports" and "Health"

// to see the todos categorized on the

// next cron job run.

categories: ["Chores","Work"],

},

);

exportdefaultcrons;

Reset code

Try it out!

import { v } from"convex/values";

import { api,internal } from"./_generated/api";

import { Doc,Id } from"./_generated/dataModel";

import { internalAction,internalMutation } from"./_generated/server";

importAnthropicfrom"@anthropic-ai/sdk";

typeAiCategorizeResponse= {

id: Id"todos">;

category: string;

};

exportconstcategorize=internalAction({

args: { categories: v.array(v.string()) },

handler: async (ctx,args) => {

consttodos=awaitctx.runQuery(api.todos.list, { count: 100 });

constresponse=awaitcategorizeTodos(todos,args.categories);

awaitctx.runMutation(internal.categorize.setCategories, {

categories: response,

});

},

});

exportconstsetCategories=internalMutation({

args: {

categories: v.array(v.object({ id: v.id("todos"),category: v.string() })),

},

handler: async (ctx,args) => {

for (constcategoryofargs.categories) {

awaitctx.db.patch("todos",category.id, {

category: category.category,

});

}

},

});

asyncfunctioncategorizeTodos(

todos: Doc"todos">[],

categories: string[],

): PromiseAiCategorizeResponse[]> {…}

import { defineSchema,defineTable } from"convex/server";

import { v } from"convex/values";

exportdefaultdefineSchema({

todos: defineTable({

text: v.string(),

category: v.optional(v.string()),

completed: v.boolean(),

}).index("by_completed", ["completed"]),

});

AI Tools

LLMs love Convex

With Convex, everything is just TypeScript. This means your favorite AI tools are pre-equipped to generate high quality code.

Learn more

Product

Not just a database

Everything your product deserves to build, launch, and scale.

Learn more

Features included with Convex:

Customer Love

Loved by developers

What people building their business on Convex are saying.

Next + Convex (all in typescript) Vs Angular (typescript) + Django (python) + Postgres + S3 + Websocket DIY + SQS + IaC + DIY e2e type safety 🤔

WebDevCody@webdevcody

@convex Simple. Fast. Realtime.

AndyOz@andy_austin_dev

I think @convex might be the best DB I've ever used

Robin@robinxpfp

Happy to see more first-class clerk x convex integration There's such a major architecture shift around Serverless + Edge + React + Typescript that (imo) it's unlikely sql is still the right abstraction Very compelling that convex is approaching this from first principles

Colin | Clerk.com@tweetsbycolin

😱 @convex is the gift that keeps on giving Check it out in combination with @nextjs docs.convex.dev

Guillermo Rauch@rauchg

@convex is everything I wanted Firebase to be. Such a great tool. Feels illegal to know about this before others.

Timothy Stepro@tim_stepro

dailytip if you are a #react developer and want an alternative to Firebase, you might want to give @convex a try. It has amazing ReactHooks with samples in #Javascript and #typescript and the price isn't bad. I'm not a Firebase expert but it looks like all features are there

urubatan@urubatan

@convex feels like what I wanted Firebase and MongoDB Realm to be and more. Really enjoying the DX so far!

David Kim@dvddkkim

I used @convex once to make sure our integration at @ClerkDev worked and the docs matched what we expected. It's magical. I don't say that lightly. I think it's time to do a video on the channel.

James Perkins@james_r_perkins

I'm working on a new app build with @convex and I am very excited about the tech here - DB schema defined in TS - end-to-end types (like if tRPC also set up your DB) - real-time updates Just Work™

Jason Lengstorf@jlengstorf

Managing an application's state has become easier, but the global state concept is still a pain for developers, which @convex aims to solve. I made a realtime application using @convex, @nextjs, and @auth0 and loved it.😍

Anshuman Bhardwaj@sun_anshuman

Interesting tool of the week: convex.dev by @convex We like: Makes it easy to build a live-updating web app with a document database. Strictly-typed fully relational schemas defined in code (optional, but recommended)

Console - Devtools, devtools, devtools@consoledotdev

dailytip if you are a #react developer and want an alternative to Firebase, you might want to give @convex a try. It has amazing ReactHooks with samples in #Javascript and #typescript and the price isn't bad. I'm not a Firebase expert but it looks like all features are there

urubatan@urubatan

I used @convex once to make sure our integration at @ClerkDev worked and the docs matched what we expected. It's magical. I don't say that lightly. I think it's time to do a video on the channel.

James Perkins@james_r_perkins

@convex is everything I wanted Firebase to be. Such a great tool. Feels illegal to know about this before others.

Timothy Stepro@tim_stepro

I think @convex might be the best DB I've ever used

Robin@robinxpfp

dailytip if you are a #react developer and want an alternative to Firebase, you might want to give @convex a try. It has amazing ReactHooks with samples in #Javascript and #typescript and the price isn't bad. I'm not a Firebase expert but it looks like all features are there

urubatan@urubatan

I used @convex once to make sure our integration at @ClerkDev worked and the docs matched what we expected. It's magical. I don't say that lightly. I think it's time to do a video on the channel.

James Perkins@james_r_perkins

@convex is everything I wanted Firebase to be. Such a great tool. Feels illegal to know about this before others.

Timothy Stepro@tim_stepro

I think @convex might be the best DB I've ever used

Robin@robinxpfp

Happy to see more first-class clerk x convex integration There's such a major architecture shift around Serverless + Edge + React + Typescript that (imo) it's unlikely sql is still the right abstraction Very compelling that convex is approaching this from first principles

Colin | Clerk.com@tweetsbycolin

I'm working on a new app build with @convex and I am very excited about the tech here - DB schema defined in TS - end-to-end types (like if tRPC also set up your DB) - real-time updates Just Work™

Jason Lengstorf@jlengstorf

@convex feels like what I wanted Firebase and MongoDB Realm to be and more. Really enjoying the DX so far!

David Kim@dvddkkim

😱 @convex is the gift that keeps on giving Check it out in combination with @nextjs docs.convex.dev

Guillermo Rauch@rauchg

Happy to see more first-class clerk x convex integration There's such a major architecture shift around Serverless + Edge + React + Typescript that (imo) it's unlikely sql is still the right abstraction Very compelling that convex is approaching this from first principles

Colin | Clerk.com@tweetsbycolin

I'm working on a new app build with @convex and I am very excited about the tech here - DB schema defined in TS - end-to-end types (like if tRPC also set up your DB) - real-time updates Just Work™

Jason Lengstorf@jlengstorf

@convex feels like what I wanted Firebase and MongoDB Realm to be and more. Really enjoying the DX so far!

David Kim@dvddkkim

😱 @convex is the gift that keeps on giving Check it out in combination with @nextjs docs.convex.dev

Guillermo Rauch@rauchg

Managing an application's state has become easier, but the global state concept is still a pain for developers, which @convex aims to solve. I made a realtime application using @convex, @nextjs, and @auth0 and loved it.😍

Anshuman Bhardwaj@sun_anshuman

Interesting tool of the week: convex.dev by @convex We like: Makes it easy to build a live-updating web app with a document database. Strictly-typed fully relational schemas defined in code (optional, but recommended)

Console - Devtools, devtools, devtools@consoledotdev

Next + Convex (all in typescript) Vs Angular (typescript) + Django (python) + Postgres + S3 + Websocket DIY + SQS + IaC + DIY e2e type safety 🤔

WebDevCody@webdevcody

@convex Simple. Fast. Realtime.

AndyOz@andy_austin_dev

Managing an application's state has become easier, but the global state concept is still a pain for developers, which @convex aims to solve. I made a realtime application using @convex, @nextjs, and @auth0 and loved it.😍

Anshuman Bhardwaj@sun_anshuman

Interesting tool of the week: convex.dev by @convex We like: Makes it easy to build a live-updating web app with a document database. Strictly-typed fully relational schemas defined in code (optional, but recommended)

Console - Devtools, devtools, devtools@consoledotdev

Next + Convex (all in typescript) Vs Angular (typescript) + Django (python) + Postgres + S3 + Websocket DIY + SQS + IaC + DIY e2e type safety 🤔

WebDevCody@webdevcody

@convex Simple. Fast. Realtime.

AndyOz@andy_austin_dev

WebDevCody (@webdevcody)

AndyOz (@andy_austin_dev)

Robin (@robinxpfp)

Colin | Clerk.com (@tweetsbycolin)

Guillermo Rauch (@rauchg)

Timothy Stepro (@tim_stepro)

urubatan (@urubatan)

David Kim (@dvddkkim)

James Perkins (@james_r_perkins)

Jason Lengstorf (@jlengstorf)

Anshuman Bhardwaj (@sun_anshuman)

Console - Devtools, devtools, devtools (@consoledotdev)

Integrations

Convexlovesyour favorite frameworks

Connect your backend to your client libraries and frameworks

Learn more

Get your app up and running in minutes

Start building

ProductSyncRealtimeAuthOpen sourceAI codingFAQMerchPricing

DevelopersDocsBlogComponentsTemplatesConvex for StartupsConvex for Open SourceChampionsPodcastsLLMs.txt

CompanyAbout usBrandInvestorsBecome a partnerJobsNewsEventsSecurityLegal

SocialX (Twitter)DiscordYouTubeLumaLinkedInGitHub

A Trusted Solution

©2026 Convex, Inc.