Engineering · Skill
Neon Functions
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your data. Use when a user wants to host an API, an AI agent with long streaming responses, a WebSocket or server-sent-events (SSE) server, a webhook handler, a Discord bot, an MCP server, or any request/response workload that risks timing out on short, lambda-style serverless functions — and wants it to branch with their database. Also use for Function Triggers: a cron or an object-storage event that POSTs to a function. Triggers include "serverless function", "deploy an API", "long-running function", "streaming agent", "SSE server", "WebSocket server", "webhook handler", "MCP server", "cron", "scheduled function", "object storage trigger", "on upload", "function that won't time out", "function logs", "Neon Functions", "Neon Compute", "DDoS protection", "rate limiting", and "production hardening". For live UIs over database rows, use neon-realtime.
Open in PhởWhat the skill covers
The sections of its instructions, in order.
- 01 When to Use
- 02 What It Does
- 03 Availability
- 04 Architecture: Where Functions Fit
- 05 Production hardening
- 06 Setup
- 07 Develop Locally and Deploy
- Native binaries and custom builds
- 08 Neon Infrastructure as Code (neon.ts)
- 09 Environment Variables
- 10 Connecting to Postgres
- 11 Timeouts and Runtime Limits
- 12 Functions as an Agent Backend (Next.js and Similar Frameworks)
- 13 WebSocket Servers
- Heartbeat (keep the socket alive)
- Fan-out across isolates (do not skip this)
- Client must reconnect
- 14 Server-Sent Events (SSE)
- 15 Function Triggers
- 16 MCP Servers
Reference files
8 files Phở can open while it uses the skill.
- references/ai-sdk.md
- references/function-triggers.md
- references/mastra-studio.md
- references/mcp.md
- references/native-binaries.md
- references/production-hardening.md
- references/sentry.md
- references/sse.md
More in Neon Postgres
- Neon
Overview of Neon, a complete set of cloud backend primitives around Lakebase Postgres: Auth, Object Storage, Functions, the AI Gateway, and Realtime. Start here to choose Neon…
- Lakebase Postgres
Guides and best practices for working with Lakebase Postgres on Neon: connections, pooled vs direct, schema migrations, branching (including schema-only, reset-from-parent, and…
- Neon Auth
Add authentication to a new app. Use for "add auth", "add login", Neon Auth (Managed Better Auth), identity routing, sign-up, sign-in, password reset, email OTP, magic links…
- Neon Object Storage
S3-compatible object storage that branches with your database, so each branch gets its own copy of the files and the rows that point at them. Use when a user wants object…
- Neon Realtime
Neon Realtime makes any SQL query live. Build realtime, reactive apps and agents on Lakebase Postgres with live SQL queries and reactivity primitives. Use when app UI or agent…
Similar engineering skills
Frequently asked questions
What does Neon Functions do?
Long-running, serverless Node.js HTTP functions deployed onto your Neon branch, with DATABASE_URL injected automatically and compute that runs next to your data. Use when a user wants to host an API, an AI agent with long streaming responses, a WebSocket or server-sent-events (SSE) server, a webhook handler, a Discord bot, an MCP server, or any request/response workload that risks timing out on short, lambda-style serverless functions — and wants it to branch with their database. Also use for Function Triggers: a cron or an object-storage event that POSTs to a function. Triggers include "serverless function", "deploy an API", "long-running function", "streaming agent", "SSE server", "WebSocket server", "webhook handler", "MCP server", "cron", "scheduled function", "object storage trigger", "on upload", "function that won't time out", "function logs", "Neon Functions", "Neon Compute", "DDoS protection", "rate limiting", and "production hardening". For live UIs over database rows, use neon-realtime.
Is Neon Functions free to use?
Yes. Neon Functions is published by Neon under the Apache 2.0 licence, and you can use it with a free Phở account.
How do I use Neon Functions in Phở?
Press Open in Phở, then Try to apply it to your next message, or add the Neon Postgres set so Phở loads it whenever a request matches.
Does Neon Functions need other tools?
No. It works in a normal Phở chat with what you type or upload.
Copied unchanged from neondatabase/agent-skills at commit ea79164 and credited to Neon, who is not affiliated with Phở. The full instructions and licence text ship with the skill inside Phở.