Save tokens with Neon Function templates Neon launched the Neon Function Registry, a collection of ready-made Node.js function templates that developers and AI agents can add to a Neon project with a single command, the company said. The registry includes templates built with Vercel's Chat SDK, Mastra, Context.dev and WorkOS, plus templates for Postgres, the Neon AI Gateway, Neon Object Storage and Managed Better Auth, and agents can list and install them via `neon functions templates list` and `neon functions new -y` without a linked project or signed-in CLI. Neon positions the templates as a token and time saver, since agents otherwise spend tokens reading docs and picking package versions before writing code; deploying requires Neon CLI 8.11.0 or later and a directory linked to a Neon project. A few weeks ago we launched Neon Functions https://neon.com/blog/neon-functions-backend-logic-next-to-your-data , Node.js functions that run in your Neon project in the same region as your Postgres database, with enough runtime for agents that stream for minutes or WebSockets that stay open. Today we're introducing the Neon Function Registry https://neon.com/functions/templates , a collection of ready-made functions you add to a project with one command. Agents can already bootstrap a function on their own, but before they write any code they read the docs, look up best practices, figure out neon.ts https://neon.com/docs/reference/neon-ts and pick package versions. All of that costs tokens and time. With the registry, your agent starts from a working template and spends its time on something more useful like building your app. Templates worth trying Here is a small collection of some of my favorite templates, built with Vercel's Chat SDK https://chat-sdk.dev/ , Mastra https://mastra.ai/ , Context.dev https://www.context.dev/ and WorkOS https://workos.com/ : - First Party https://neon.com/functions/templates/chat-sdk Chat SDK bot for Slack, Telegram, and the webA Vercel Chat SDK bot that answers on Slack, Telegram, and useChat, streams replies from AI Gateway, and keeps conversations, subscriptions, and locks in Neon Postgres. Mastra agent with Postgres memoryA Mastra agent that remembers users in Neon Postgres, streams chat for useChat on AI Gateway, and runs a resumable human-in-the-loop review workflow. Context.dev web dataSearch the web and news, read pages, answer questions, and retrieve brand data with Context.dev. Mirror WorkOS data into PostgresBackfill, tail the Events API, and reconcile drift on a cron, with a WorkOS webhook nudge. Join users, organizations, and memberships in SQL. The rest of the collection uses the Neon services you may already use for your project: - Postgres rest-api-postgres https://neon.com/functions/templates/rest-api-postgres and mcp-postgres https://neon.com/functions/templates/mcp-postgres read and write your database through the DATABASE URL Neon injects. - AI Gateway openai-agents https://neon.com/functions/templates/openai-agents runs a streaming OpenAI Agents SDK https://openai.github.io/openai-agents-js/ agent with tools and handoffs on models from the Neon AI Gateway https://neon.com/docs/ai-gateway/overview . - Object Storage image-generation https://neon.com/functions/templates/image-generation creates an image with the AI Gateway and stores it in Neon Object Storage https://neon.com/docs/storage/overview . - Auth authenticated-api https://neon.com/functions/templates/authenticated-api checks callers with Managed Better Auth https://neon.com/docs/auth/overview . Because those services live in the same project as the function, you don't need to sign up for a separate database, storage provider or AI Gateway to use a template. Why templates work so well for agents A template hands an agent pre-built code it would otherwise have to write itself, in a form it can install without stopping to ask you questions: - neon functions templates list returns every available template's ID, so the agent can pick one without browsing the website. - neon functions new