Functions redesigned for agents
June 25, 2026
We have redesigned Netlify functions for an improved agent experience.
With these updates, functions are more discoverable, easier to autocomplete, update, and manage for people and agents alike. They move function configuration into code, making it type-safe and immediately visible to editors, tools, and agents, with no platform-specific naming conventions to memorize or get wrong. None of these changes are breaking, so you can adopt them on your own timeline.
Netlify Functions are serverless functions that run on-demand in response to HTTP requests or platform events. They handle server-side logic without any infrastructure to manage, and live in your repository at netlify/functions/.
To learn more about these updates in depth, check out our blog on redesigning Netlify functions for agent experience. See the table below for a summary.
| Feature | What changed | What it means for agents | What you need to do |
|---|---|---|---|
| Event handlers | Export typed event handlers from the default export object | Typed handlers are discoverable like any API, with no magic filenames to guess or get wrong. | Nothing required. Adopt the new syntax for new event handlers for better agent discoverability and updates. |
| Background functions | Declare with background: true in config instead of the -background filename suffix | Type-safe and config-driven, not name-driven. Agents can set it in code without guessing platform naming conventions, and get an error if the value is wrong. | Nothing required. The -background suffix still works. |
| Region selection | Set per-function via the region config property, replacing the global UI setting | Agents can set region as a type-safe config property, catching invalid values before deploy rather than at runtime. Use deploy previews to test before going live. | Nothing required. Optionally move region out of the UI into config for per-function control. |
| Memory and vCPU | Set via memory or vcpu config properties; both values scale together automatically | Agents provisioning compute-heavy workloads (inference, large payloads) can do so in code. | Nothing. Defaults unchanged. Set only if your workload needs more than 1 GB / 0.5 vCPU. Requires a credit-based Pro plan. |
getContext() | Named import from @netlify/functions, replacing the Netlify.context global | Named imports surface in autocomplete and carry type information. Globals are invisible to agents; named imports are not. | Nothing required. Netlify.context still works. Switch to getContext() for better discoverability. |
Learn more in the Netlify Functions documentation, which has also been recently revamped.