AI Engineer World's Fair 2024

Convex Launch

Loading slides…

Read the talk

Convex Launch

Convex extends dependency-driven updates from the interface into the backend, helping multistep AI applications expose results as their work progresses.

From a talk by Jamie Turner

Before you start: Basic familiarity with React state and backend APIs will help; no prior Convex experience is required.

Replacing backend glue

What would it take to replace routine backend engineering with an API that feels native to an application? Jamie Turner introduces Convex through that ambition, abandoning his planned deterministic-workflow title for a more revealing one: “We Accidentally Made an AI Platform and What Are We Gonna Do About It?”

The opening illustration includes an accidental generative-AI contribution: “fate limiting,” an ominous addition to the backend engineer’s responsibilities. The familiar work is less mysterious: gluing systems together, configuring them, and mapping data formats. Turner estimates that teams sometimes spend half their time on this integration work. Users receive little direct benefit from the plumbing itself. Convex’s proposed replacement is a high-level functional interface, with Firebase and Parse as precedents. The design question is what that interface should look like for applications built in the 2020s.

0:000:19
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

0:00 · section reference included

Extending React’s state model to the server

React supplies the starting point: create a state variable and a setter, then let the framework refresh the places that depend on that state. In Turner’s small example, changing a name produces an uppercase greeting for Olivia. The essential relationship can be expressed in TypeScript like this:

tsx

import { useState } from "react";

export function Greeting() {
  const [name, setName] = useState("");

  return (
    <>
      <input
        aria-label="Name"
        value={name}
        onChange={(event) => setName(event.target.value)}
      />
      <p>{`Hi ${name}`.toUpperCase()}</p>
    </>
  );
}

Entering Olivia calls the setter; React renders the dependent expression as HI OLIVIA. There is no separate instruction to find and update the greeting.

Diagram with a state setter, React logo, connecting arrows, rendering code, and a browser displaying HI OLIVIA.Open full source frame
React state changes flow through to the rendered “HI OLIVIA” result.

That relationship usually breaks at the server boundary. The application must poll for changes, invalidate caches, or arrange its own push mechanism. Convex exposes queries and mutations, but its distinguishing mechanism is pervasive tracking of backend data flow and dependencies. Queries are subscribable: when underlying state changes, applications can receive updated results. The reactive relationship extends through the backend, instead of ending at local component state.

1:181:29
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

1:18 · section reference included

A note-taker with visible checkpoints

The connection to AI appears when server-side work participates in the flow of state. A note-taking application needs more than a final response: it performs several operations and brings the interface back into the process at useful checkpoints. Turner sketches this sequence:

  1. Run automatic speech recognition on the recording.
  2. Summarize the transcription and show the summary in the application.
  3. Generate embeddings for retrieval.
  4. Find related notes and display them in the application.

The diagram connects ASR, summarization, embedding generation, a vector index, and related notes to the application. Each intermediate result can become useful before the whole workflow is finished.

Flowchart labeled AI-Powered Voice Recorder, with ASR, summarization, embedding generation, vector index, related notes, and application boxes linked by arrows.Open full source frame
An AI-powered voice recorder workflow connects transcription, summarization, embeddings, and related notes to an application.

The implementation distinction is between subscribed query results and actions that perform external work. Turner describes server-side actions as reacting entities; this does not establish that actions automatically subscribe to database changes. In the current action API, actions are invoked or scheduled, call external services, and store results through mutations. Query subscriptions then expose changed database state to the interface. That distinction makes the workflow concrete without assuming an automatic trigger for every processing step.

2:272:31
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:27 · section reference included

Concurrent results in a project planner

Real applications can have several branches running at once. Turner demonstrates a developer’s application for generating an initial project plan from a prompt. The example asks for an app to track recipes. Clicking Create Plan starts work on Convex, with concurrent chains producing several kinds of output:

  • Project names: candidate names for the application.
  • Initial feature requests: a first set of capabilities to build.
  • Color palettes: possible visual directions.
  • Icon ideas: suggestions for the application’s identity.

Results flow into the interface as the chains produce them. The application does not need to hold every output until one complete plan is ready.

Synchronizing state between backend steps and the application turns out to be especially useful for generative AI products. Turner reports that, after the ChatGPT boom, more than 90% of projects on Convex were generative AI projects. He does not specify the observation window or classification method; the figure describes his account of adoption at the time. That concentration of AI builders shapes the next additions to the platform.

2:593:10
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

2:59 · section reference included

Vector indexes in the existing schema

Vector indexing repeatedly appeared as a step developers needed. Convex already let them define schemas in TypeScript, with type completions, and add indexes to fields. Their request was to extend that same interface to vector indexes. The demonstrated foods schema adds a vector-index configuration with an embedding field, dimensions, and cuisine filtering. The extension keeps vector indexing alongside the application’s existing data definition.

Slide titled “1. Last year: built-in vector search” showing a foods schema and vector index configuration.Open full source frame
A schema example adds a vector index with an embedding field, dimensions, and cuisine filtering.

Turner says vector indexing shipped late the previous year and was already broadly used by Convex projects. It is an available capability in this recording, unlike the workflow components introduced at the end.

3:564:04
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

3:56 · section reference included

Supporting startups and packaging workflows

The next announcement is Convex for Startups: discounts plus access to startup-only forums and events. Turner says the first admitted batch includes many generative AI companies, which he describes as the most engaged and excited customers at the time.

The final product direction raises the level of reuse from individual backend functions to whole state machines. Convex Components is intended to package sophisticated workflows, co-developed with customers, into building blocks developers can drop into an application. The slide illustrates the idea with puzzle pieces labeled RAG and Model Flow. These high-level components are forthcoming in the recording, described as arriving very soon.

Slide titled “3. Soon: Convex AI Components” with two puzzle pieces labeled RAG and Model Flow.Open full source frame
Upcoming Convex AI Components are illustrated as RAG and Model Flow puzzle pieces.

The progression is from synchronizing individual state changes to packaging entire workflows that maintain state across multiple steps. Turner closes by inviting generative AI builders to try Convex, with the aim of shipping applications quickly and confidently.

4:244:37
Suggest correction

This note stays in this page until you copy or download it. Nothing is submitted; reloading clears the draft.

4:24 · section reference included

Resources

From the talk

  • The backend platform combining a database, server functions, and reactive application updates.

Updates since the talk

  • A walkthrough of reusable backend components with persistent state, isolated APIs, and transactional behavior.

Transcript download
Full transcript

Loading transcript…