This update adds a new run_with parameter (“agent” or “code”) to task and workflow run requests and threads it through the agent_protocol and task_v2_service layers so that scripts are generated only in code mode. It gives users finer control over execution flow and can reduce unnecessary script generation when running in agent mode. However, it may break compatibility for clients that don’t supply run_with, needs proper value validation, and still has a pending sync check before release.

support passing run_with for run_task endpoint (mostly for task v2) - Skyvern-AI/skyvern