diff --git a/.github/workflows/agentex-tutorials-test.yml b/.github/workflows/agentex-tutorials-test.yml index a31a59bfb..7f2c762dd 100644 --- a/.github/workflows/agentex-tutorials-test.yml +++ b/.github/workflows/agentex-tutorials-test.yml @@ -2,7 +2,7 @@ name: Test Tutorial Agents on: pull_request: - branches: [main] + branches: [main, next] push: branches: [main] workflow_dispatch: diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ae11ed3c5..78e7f271d 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,3 +1,3 @@ { - ".": "0.10.5" + ".": "0.11.0" } diff --git a/CHANGELOG.md b/CHANGELOG.md index 7b37e6651..6d9dc1f90 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## 0.11.0 (2026-05-07) + +Full Changelog: [v0.10.5...v0.11.0](https://github.com/scaleapi/scale-agentex-python/compare/v0.10.5...v0.11.0) + +### Features + +* make workflow execution timeout configurable via env var ([#348](https://github.com/scaleapi/scale-agentex-python/issues/348)) ([4094708](https://github.com/scaleapi/scale-agentex-python/commit/4094708a84026aafe19eae19d022118bb26e1a72)) + ## 0.10.5 (2026-05-05) Full Changelog: [v0.10.4...v0.10.5](https://github.com/scaleapi/scale-agentex-python/compare/v0.10.4...v0.10.5) diff --git a/pyproject.toml b/pyproject.toml index a2dcd2751..547fc9cf9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "agentex-sdk" -version = "0.10.5" +version = "0.11.0" description = "The official Python library for the agentex API" dynamic = ["readme"] license = "Apache-2.0" diff --git a/src/agentex/_version.py b/src/agentex/_version.py index bc15d6ab6..59720802a 100644 --- a/src/agentex/_version.py +++ b/src/agentex/_version.py @@ -1,4 +1,4 @@ # File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details. __title__ = "agentex" -__version__ = "0.10.5" # x-release-please-version +__version__ = "0.11.0" # x-release-please-version diff --git a/src/agentex/lib/core/temporal/services/temporal_task_service.py b/src/agentex/lib/core/temporal/services/temporal_task_service.py index 5551ebcbd..81eb22389 100644 --- a/src/agentex/lib/core/temporal/services/temporal_task_service.py +++ b/src/agentex/lib/core/temporal/services/temporal_task_service.py @@ -1,6 +1,7 @@ from __future__ import annotations from typing import Any +from datetime import timedelta from agentex.types.task import Task from agentex.types.agent import Agent @@ -41,6 +42,7 @@ async def submit_task(self, agent: Agent, task: Task, params: dict[str, Any] | N ), id=task.id, task_queue=self._env_vars.WORKFLOW_TASK_QUEUE, + execution_timeout=timedelta(seconds=self._env_vars.WORKFLOW_EXECUTION_TIMEOUT_SECONDS), ) async def get_state(self, task_id: str) -> WorkflowState: diff --git a/src/agentex/lib/environment_variables.py b/src/agentex/lib/environment_variables.py index c8b877041..31ce43ab8 100644 --- a/src/agentex/lib/environment_variables.py +++ b/src/agentex/lib/environment_variables.py @@ -6,6 +6,7 @@ from pathlib import Path from dotenv import load_dotenv +from pydantic import Field from agentex.lib.utils.logging import make_logger from agentex.lib.utils.model_utils import BaseModel @@ -32,6 +33,7 @@ class EnvVarKeys(str, Enum): # Workflow Configuration WORKFLOW_NAME = "WORKFLOW_NAME" WORKFLOW_TASK_QUEUE = "WORKFLOW_TASK_QUEUE" + WORKFLOW_EXECUTION_TIMEOUT_SECONDS = "WORKFLOW_EXECUTION_TIMEOUT_SECONDS" # Temporal Worker Configuration HEALTH_CHECK_PORT = "HEALTH_CHECK_PORT" # Auth Configuration @@ -74,6 +76,11 @@ class EnvironmentVariables(BaseModel): # Workflow Configuration WORKFLOW_TASK_QUEUE: str | None = None WORKFLOW_NAME: str | None = None + # Maximum total time (in seconds) a workflow execution can run, including + # retries and continue-as-new. Defaults to 24h to bound runaway workflows; + # agents with longer-running tasks should override this. Must be > 0 — a + # zero or negative timedelta would cause every submitted workflow to fail. + WORKFLOW_EXECUTION_TIMEOUT_SECONDS: int = Field(default=86400, gt=0) # Temporal Worker Configuration HEALTH_CHECK_PORT: int = 80 # Auth Configuration