Overview
Makers Functions is a Serverless function service provided by EdgeOne Makers. It allows you to write and deploy server-side code in your projects without configuring or managing servers. The platform automatically scales based on request volume, helping you quickly build full-stack applications.
Two types of Functions are currently provided:
Edge Functions: Runs on EdgeOne global edge nodes, provides ultra-low latency and millisecond-level cold startup, suitable for high-concurrency, latency-sensitive lightweight services.
Cloud Functions: Deployed on cloud servers, supports Node.js, Python, and Go multiple runtime environments, possesses longer running time and stronger computing power, suitable for complex business logic and data processing.
Getting Started
Under the directory ./edge-functions/api of your project, use the following example code to create your first Edge Function:
export default function onRequest(context) {return new Response('Hello from Edge Functions!');}
Under the directory ./cloud-functions/api of the project, use the following example code to create your first Cloud Function:
export default function onRequest(context) {return new Response('Hello from Cloud Functions!');}
Difference Between Edge Functions and Cloud Functions
Features | Edge Functions | Cloud Functions |
Running location | global edge node | cloud server |
cold start time | millisecond-level | Hundred-millisecond level |
Latency performance | extremely low | Moderately Low |
runtime environment | Edge Runtime | Node.js / Python / Go |
Scenarios | High-concurrency, latency-sensitive, short execution time | Complex data processing, extended execution time |
Function Debugging
1. Install EdgeOne CLI:
npm install -g edgeone2. Local development: Under the Makers code project, execute
edgeone makers dev to start the local service and debug functions.3. Function release: Push code to the remote repository for auto-build and function release.
Note:
When debugging Cloud Functions locally, ensure the corresponding runtime environment (Node.js/Python/Go) is installed.
Log Analysis
The Makers console provides a basic log viewing feature. Developers can view basic log information for function calls and quickly identify and resolve exceptions or errors in API calls through logs. For detailed guidance, see the document Log Analysis.
Difference Between Cloud Functions and Agents
For implementing complex cloud-based services, Cloud Functions and Agents are two optional computing modules. Both are deployed in the cloud but have different positioning—Cloud Functions target single requests/tasks, while Agents target an AI business process flow. Refer to the table below to choose based on your business type:
Module | Suitable Business Scenarios |
Cloud Functions | Authentication and identity verification, API interfaces, data forwarding and assembly, scheduled tasks, Webhook reception, and other conventional business logic |
Agents | LLM invocation loops, dialogue memory and session management, sandbox code execution, browser and file tool invocation, and other AI business loop scenarios |
Both types of business logic can be implemented within their respective modules, but a proper separation can make project execution more efficient and resource consumption more reasonable. Within the same project, both can coexist—you can use Cloud Functions to handle APIs and data, and use Agents to host AI applications, sharing deployment processes, domain names, and environment variables.
