diff --git a/agents-api/agents_api/activities/task_steps/get_value_step.py b/agents-api/agents_api/activities/task_steps/get_value_step.py index 6f505cb49..cda00789e 100644 --- a/agents-api/agents_api/activities/task_steps/get_value_step.py +++ b/agents-api/agents_api/activities/task_steps/get_value_step.py @@ -1,4 +1,3 @@ - from beartype import beartype from temporalio import activity diff --git a/agents-api/agents_api/activities/task_steps/log_step.py b/agents-api/agents_api/activities/task_steps/log_step.py index b33409474..34def9bf2 100644 --- a/agents-api/agents_api/activities/task_steps/log_step.py +++ b/agents-api/agents_api/activities/task_steps/log_step.py @@ -6,8 +6,8 @@ StepContext, StepOutcome, ) +from ...common.utils.template import render_template from ...env import testing -from .base_evaluate import base_evaluate @beartype @@ -17,8 +17,10 @@ async def log_step(context: StepContext) -> StepOutcome: try: assert isinstance(context.current_step, LogStep) - expr: str = context.current_step.log - output = await base_evaluate(expr, context.model_dump()) + template: str = context.current_step.log + output = await render_template( + template, context.model_dump(), skip_vars=["developer_id"] + ) result = StepOutcome(output=output) return result diff --git a/agents-api/tests/test_execution_workflow.py b/agents-api/tests/test_execution_workflow.py index 9cd12bb8f..74ae70f29 100644 --- a/agents-api/tests/test_execution_workflow.py +++ b/agents-api/tests/test_execution_workflow.py @@ -407,7 +407,9 @@ async def _( "other_workflow": [ # Testing that we can access the input {"evaluate": {"hello": '_["test"]'}}, - {"log": '_["hell"]'}, # <--- The "hell" key does not exist + { + "log": '{{_["hell"].strip()}}' + }, # <--- The "hell" key does not exist ], "main": [ # Testing that we can access the input