Workflows 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.
Notte workflows are simple python scripts that can be executed both locally and in the cloud.
The following snippet shows how to manage your workflows using the Notte Python SDK.
Copy
Ask AI
from notte_sdk import NotteClientnotte = NotteClient()# simple scraping workflowcode = """from notte_sdk import NotteClientnotte = NotteClient()def run(url: str): with notte.Session() as session: session.execute({"type": "goto", "url": url}) return session.scrape()"""with open("my_scraping_workflow.py", "w") as f: f.write(code)# Create a new workflow from a Python fileworkflow = notte.Workflow( workflow_path="my_scraping_workflow.py",)print(f"Workflow created with ID: {workflow.response.workflow_id}. You can reference it using `notte.Workflow(<workflow_id>)`")# Run the workflow with variablesresult = workflow.run(url="https://shop.notte.cc/", local=True)print(f"Workflow completed with result: {result}")# Update workflow with new versionworkflow.update(workflow_path="updated_workflow.py")# List all workflowsworkflows = notte.workflows.list()