> ## Documentation Index
> Fetch the complete documentation index at: https://docs.notte.cc/llms.txt
> Use this file to discover all available pages before exploring further.

# Get started

> Create, manage, and execute automated web functions

<Tip>
  STOP. Do not read past this section until you have read and followed [/quickstart.md](/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.
</Tip>

Functions enable hybrid automation by combining the precision of scripting with the adaptability of AI agents. They allow you to script the predictable parts of your automation while leveraging agents only when needed, resulting in more reliable and cost-effective automations.

<CodeGroup>
  ```python my_scraping_function.py theme={null}
  from notte_sdk import NotteClient
  client = NotteClient()

  def run(url: str):
      with client.Session() as session:
          session.execute(type="goto", url=url)
          return session.scrape()
  ```

  ```python play_with_function.py theme={null}
  from notte_sdk import NotteClient

  client = NotteClient()

  # Create a new function from our local Python file
  function = client.Function(
      workflow_path="my_scraping_function.py",
      name="My Scraping Function",
      description="A function for scraping the web"
  )
  print(f"Function created with ID: {function.function_id}. You can reference it using `client.Function(<function_id>)`")

  # Run the function, providing variables
  response = function.run(url="https://shop.notte.cc/")
  print(f"Function completed with result: {response.result}")

  # Update function with new version, from our local python file
  function.update(workflow_path="my_scraping_function.py")

  # List all functions
  functions = client.functions.list()
  ```
</CodeGroup>

## Parameters

<ParamField path="function_id" type="str | None" default="None" />

<ParamField path="decryption_key" type="str | None" default="None" />

<ParamField path="workflow_path" type="str | None" default="None" />

<ParamField path="path" type="str" required>
  The path to the function to upload.
</ParamField>

<ParamField path="name" type="str | None" />

<ParamField path="description" type="str | None" />

<ParamField path="shared" type="bool" />
