neon-functions

Deploy long-running Node.js HTTP functions on Neon branches with injected database connections.

Updated Sep 2, 2026
One-click install
npx skills add https://github.com/akira777777/vladfsBET --skill neon-functions-akira777777
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: neon-functions
Source: https://github.com/akira777777/vladfsBET/tree/main/.grok/skills/neon-functions
Command: npx skills add https://github.com/akira777777/vladfsBET --skill neon-functions-akira777777

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires @neon/config, @neon/functions, @neon/env, hono, pg, drizzle-orm, and includes references (resource) components.

What problem does it solve? Lambda-style serverless functions time out on long-running workloads like AI agents, WebSocket servers, and SSE streams, and they run far from your database. This Skill guides you through deploying long-running Node.js functions directly onto a Neon branch, with DATABASE_URL injected automatically and compute running in the same region as your Postgres data. ## Core Features & Use Cases - Long-Running Handlers: Deploy web-standard fetch handlers with a 15-minute time-to-first-byte budget, supporting streaming AI agents, WebSocket servers, and SSE endpoints that outlast traditional serverless limits. - Branch-Scoped Backends: Each Neon branch runs its own function version at its own URL against its own isolated database, so preview deployments and CI get self-contained backends. - Function Triggers: Configure cron schedules or object-storage events that POST to your function for recurring HTTP work without a separate scheduler. - Use Case: Build an AI agent with the Vercel AI SDK that streams multi-step tool-calling responses, queries Postgres through a module-scope connection pool, and authenticates callers with JWT verification — all deployed with neon deploy. ## Quick Start Ask the AI to declare a function in neon.ts with a Hono handler that queries Postgres via the injected DATABASE_URL, then run neon dev locally and neon deploy to get a public invocation URL.

Frequently Asked Questions about neon-functions

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I deploy a long-running serverless function next to my Postgres database?▼

Declare the function in a neon.ts file using defineConfig with a slug and source entry file, then run neon deploy. Neon injects DATABASE_URL automatically and provides a public HTTPS invocation URL in the same region as your database.

What is the difference between Neon Functions and lambda-style serverless functions?▼

Neon Functions are long-running with a 15-minute time-to-first-byte limit and keep WebSocket or SSE streams alive as long as bytes flow. Traditional serverless functions cap execution at 10-60 seconds, cutting off long agent streams and stateful connections.

Can I run a WebSocket or SSE server on Neon Functions?▼

Yes, Neon Functions support WebSocket servers via upgradeWebSocket from @neon/functions and SSE endpoints by returning a Response with a ReadableStream body. Connections stay alive with a 15-minute heartbeat window as long as data flows.

Which regions support Neon Functions deployment?▼

Neon Functions are currently available in aws-us-east-2, aws-us-east-1, aws-eu-central-1, and aws-ap-southeast-1. Confirm your Neon project resides in one of these regions before setting up functions.

How do I schedule a cron job that calls my Neon Function?▼

Use Function Triggers by declaring a triggers block in neon.ts with type schedule and a five-field UTC cron expression, then run neon deploy. Neon POSTs to your function on the schedule with the same 15-minute execution limits.

Why does my Neon Function need authentication if it has a public URL?▼

Every Neon Function gets a public HTTPS URL reachable by anyone, so you must verify a JWT against your identity provider's JWKS or check an API key at the top of the handler. Never deploy an unauthenticated agent or MCP server.