Skip to main content

First backend run

Start with an installed and configured backend: accepted host JWT, current grant, published Agent version and qualified text/embedding policies. The application needs no upstream inference key.

Vercel quickstart​

cortex templates init demo --template vercel-ai-quickstart --template-version 1.4.0 --catalog-version 1.3.0 --yes --graph none
cd demo
npm run dev

Configure .env.local with the runtime origin, HTTP action origin and Agent selectors described in configuration. Open the URL printed by Next.js, enter your host JWT in Connect, and send a message. The development token form keeps the token in memory; a host application can replace it with its identity provider callback.

Watch response and memory status separately. Use Disconnect observer, Reconnect observer and Observe an existing run to recover the retained run. Disconnect keeps backend work running; Cancel run explicitly requests cancellation. Tool/input approvals continue the same backend operation.

Basic terminal and HTTP app​

cortex templates init basic-app --template basic --template-version 1.4.0 --catalog-version 1.3.0 --yes --graph none
cd basic-app
npm start
# In a separate terminal, when the HTTP interface is needed:
npm run server

Set CONVEX_URL, AGENT_ID, AGENT_VERSION and optional MEMORY_SPACE_ID, or the generated public selector equivalents. The terminal uses CORTEX_AUTH_TOKEN_FILE (a host-managed private token file, mode 0600) or process-only CORTEX_AUTH_TOKEN. HTTP requests always provide their own Authorization: Bearer <host JWT>.

Plain input prints a request ID before submit. /send <requestId> <text>, /observe, /watch, /history, /recall <requestId> <query> and /readiness expose retained execution and memory. Keep the original identity after an ambiguous timeout.

ChatSDK​

cortex templates init chat --template chat-sdk --template-version 1.4.2 --catalog-version 1.3.0 --yes --graph none
cd chat
pnpm dev

The canonical home uses AI SDK 7 remote transport and host JWTs. Its document panel submits durable title, Markdown, code, CSV sheet and suggestion jobs. Applying a suggestion selects the exact retained artifact version. Follow the generated README for the app's manager and backend configuration.

Application development scripts start the application. Backend registration/deployment and optional graph workers are separate operator tasks. See AI SDK integration for your own React host.

The templates catalog is independently versioned at 1.3.0. The current app payloads are Basic and Vercel AI quickstart 1.4.0, and Chat SDK 1.4.2. These are upcoming release selections; the registry publication step is separate. Existing immutable app payloads remain available for their pinned versions.