diff --git a/agents-api/agents_api/clients/temporal.py b/agents-api/agents_api/clients/temporal.py index 77e246286..fda995896 100644 --- a/agents-api/agents_api/clients/temporal.py +++ b/agents-api/agents_api/clients/temporal.py @@ -16,6 +16,7 @@ from ..common.protocol.tasks import ExecutionInput from ..common.retry_policies import DEFAULT_RETRY_POLICY from ..env import ( + temporal_api_key, temporal_client_cert, temporal_metrics_bind_host, temporal_metrics_bind_port, @@ -45,6 +46,7 @@ async def get_client( namespace=namespace, tls=tls_config, data_converter=data_converter, + api_key=temporal_api_key or None, ) diff --git a/agents-api/agents_api/env.py b/agents-api/agents_api/env.py index a5b37aaae..f81547d87 100644 --- a/agents-api/agents_api/env.py +++ b/agents-api/agents_api/env.py @@ -99,6 +99,7 @@ temporal_namespace: str = env.str("TEMPORAL_NAMESPACE", default="default") temporal_client_cert: str = env.str("TEMPORAL_CLIENT_CERT", default=None) temporal_private_key: str = env.str("TEMPORAL_PRIVATE_KEY", default=None) +temporal_api_key: str = env.str("TEMPORAL_API_KEY", default=None) temporal_endpoint: Any = env.str("TEMPORAL_ENDPOINT", default="localhost:7233") temporal_task_queue: Any = env.str("TEMPORAL_TASK_QUEUE", default="julep-task-queue") temporal_schedule_to_close_timeout: int = env.int( diff --git a/agents-api/docker-compose.yml b/agents-api/docker-compose.yml index 2116eafbc..d5f144565 100644 --- a/agents-api/docker-compose.yml +++ b/agents-api/docker-compose.yml @@ -19,6 +19,7 @@ x--shared-environment: &shared-environment TEMPORAL_NAMESPACE: ${TEMPORAL_NAMESPACE:-default} TEMPORAL_TASK_QUEUE: ${TEMPORAL_TASK_QUEUE:-julep-task-queue} TEMPORAL_WORKER_URL: ${TEMPORAL_WORKER_URL:-temporal:7233} + TEMPORAL_API_KEY: ${TEMPORAL_API_KEY:-} TEMPORAL_SCHEDULE_TO_CLOSE_TIMEOUT: ${TEMPORAL_SCHEDULE_TO_CLOSE_TIMEOUT:-3600} TEMPORAL_METRICS_BIND_HOST: ${TEMPORAL_METRICS_BIND_HOST:-0.0.0.0} TEMPORAL_METRICS_BIND_PORT: ${TEMPORAL_METRICS_BIND_PORT:-14000}