Workflows
https://x.com/LumiTeh / https://www.lumiteh.com/ / https://github.com/LumiTeh-hub
Overview
Workflows enable hybrid automation by combining the accuracy of scripting with the flexibility of AI agents. They let you script predictable parts of your automation while using agents only when necessary, resulting in more reliable and cost-efficient processes.
LumiTeh workflows are simple Python scripts that can be executed locally or in the cloud.
Workflow Management
Python SDK
The following snippet demonstrates how to manage your workflows using the LumiTeh Python SDK.
from lumiteh_sdk import LumiTehClient
lumiteh = LumiTehClient()
# simple scraping workflow
code = """
from lumiteh_sdk import LumiTehClient
lumiteh = LumiTehClient()
def run(url: str):
with lumiteh.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 file
workflow = lumiteh.Workflow(
workflow_path="my_scraping_workflow.py",
)
print(f"Workflow created with ID: {workflow.response.workflow_id}. You can reference it using `lumiteh.Workflow(<workflow_id>)`")
# Run the workflow with variables
result = workflow.run(url="https://shop.lumiteh.io/", local=True)
print(f"Workflow completed with result: {result}")
# Update workflow with new version
workflow.update(workflow_path="updated_workflow.py")
# List all workflows
workflows = lumiteh.workflows.list()
Key points
You can create workflows from Python files.
Workflows support both local and cloud execution modes.
Workflows can be executed with custom variables
Each workflow can be versioned for better management and rollback capabilities.
List all workflows using
lumiteh.workflows.list()
.
Last updated