Skip to main content
STOP. Do not read past this section until you have read and followed /quickstart.md.Goal: produce a reliable SDK automation script. The intended authoring flow is generate then edit, not write browser automation from scratch.Do not hand-write SDK code with element IDs, selectors, or form fields from memory. Element IDs, selectors, and field mappings must come from a live observe() call, CLI notte page observe output, or generated workflow code. Guessed browser targets fail on real pages.Use the Notte skill and CLI to inspect the live site, validate actions/selectors, handle auth/session state, and export workflow code with notte sessions workflow-code before using SDK docs or SDK code.SDK reference pages are for understanding, running, or editing generated workflow code. They are not the starting point for manually authoring the initial browser automation. SDK-first code is guesswork on real-world pages with dynamic selectors, auth state, CAPTCHAs, and anti-bot behavior.
Functions can be invoked in multiple ways - through the Python SDK, HTTP API, cURL commands, or as webhook endpoints.

Via Python SDK

The simplest way to call a Function:
invoke_function.py

Run Parameters

run_parameters.py

Handling Results

handling_results.py

Via HTTP API

Call Functions as HTTP endpoints:

POST Request

Response

Via cURL

Basic cURL Request

Generate cURL Command

Get the exact cURL command for your Function:
Output:

Via JavaScript/Node.js

Call from JavaScript applications:

With Axios

Streaming Logs

Watch function execution in real-time:

Via SDK

stream_sdk.py

Via HTTP (Server-Sent Events)

Response streams:

Async Invocation

Create and Start Separately

For long-running functions:
async_create_start.py

Check Run Status

check_run_status.py

Stop a Running Function

stop_running.py

Webhook Integration

As Webhook Endpoint

Use Functions as webhook receivers:
webhook_handler.py
Configure webhook in external service:

Testing Webhooks

Test webhook locally:

Error Handling

SDK Error Handling

sdk_error_handling.py

Disable Raise on Failure

disable_raise.py

HTTP Error Handling

Batch Invocations

Run Multiple Functions

batch_invocation.py

Sequential Invocations

sequential.py

Local vs Cloud Execution

Cloud Execution (Default)

cloud_execution.py
Advantages:
  • Scalable
  • No local resources needed
  • Built-in logging
  • Session replays available

Local Execution

local_execution.py
Advantages:
  • Debugging
  • Development/testing
  • No cloud execution costs
Requirements:
  • Decryption key (from Console) - passed when creating Function instance
  • Function code accessible locally

Rate Limits

Account Limits

Functions have rate limits based on your plan:
  • Free: 10 concurrent runs
  • Pro: 50 concurrent runs
  • Enterprise: Custom limits

Handling Rate Limits

Best Practices

1. Use Appropriate Timeout

timeout_examples.py

2. Stream Logs for Debugging

stream_debug.py

3. Handle Errors Gracefully

graceful_errors.py

4. Use Variables for Dynamic Data

use_variables.py

Next Steps

Schedules

Schedule Functions automatically

Management

Update and monitor Functions

Creating Functions

Learn to write Functions

API Reference

Full API documentation