Skip to content

Commit 9fb8223

Browse files
manifest support for temporal worker
1 parent 74f2276 commit 9fb8223

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/agentex/lib/cli/handlers/run_handlers.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,10 @@ def create_agent_environment(manifest: AgentManifest) -> dict[str, str]:
392392
env_vars["WORKFLOW_NAME"] = temporal_config.name
393393
env_vars["WORKFLOW_TASK_QUEUE"] = temporal_config.queue_name
394394

395+
# Set health check port from temporal config
396+
if manifest.agent.temporal and manifest.agent.temporal.health_check_port is not None:
397+
env_vars["HEALTH_CHECK_PORT"] = str(manifest.agent.temporal.health_check_port)
398+
395399
if agent_config.env:
396400
for key, value in agent_config.env.items():
397401
env_vars[key] = value

src/agentex/lib/cli/templates/temporal/manifest.yaml.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,10 @@ agent:
8989
# Convention: <agent_name>_task_queue
9090
queue_name: {{ queue_name }}
9191

92+
# Optional: Health check port for temporal worker
93+
# Defaults to 80 if not specified
94+
# health_check_port: 8080
95+
9296
# Optional: Credentials mapping
9397
# Maps Kubernetes secrets to environment variables
9498
# Common credentials include:

src/agentex/lib/types/agent_configs.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ class TemporalConfig(BaseModel):
4545
enabled: Whether this agent uses Temporal workflows
4646
workflow: The temporal workflow configuration
4747
workflows: The list of temporal workflow configurations
48+
health_check_port: Port for temporal worker health check endpoint
4849
"""
4950

5051
enabled: bool = Field(
@@ -58,6 +59,10 @@ class TemporalConfig(BaseModel):
5859
default=None,
5960
description="List of temporal workflow configurations. Used when enabled=true.",
6061
)
62+
health_check_port: int | None = Field(
63+
default=None,
64+
description="Port for temporal worker health check endpoint. Defaults to 80 if not specified.",
65+
)
6166

6267
@validator("workflows")
6368
def validate_workflows_not_empty(cls, v):

0 commit comments

Comments
 (0)