From 67d3cc5e29053669f3969bc43ab6443272b1c1f9 Mon Sep 17 00:00:00 2001 From: akhisud3195 Date: Wed, 7 May 2025 20:52:19 +0530 Subject: [PATCH] Handle max child calls and tracing variable defaults in env --- apps/rowboat_agents/src/app/main.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/rowboat_agents/src/app/main.py b/apps/rowboat_agents/src/app/main.py index 5d467836..a5cf6fa0 100644 --- a/apps/rowboat_agents/src/app/main.py +++ b/apps/rowboat_agents/src/app/main.py @@ -17,8 +17,17 @@ master_config = read_json_from_file("./configs/default_config.json") print("Master config:", master_config) # Get environment variables with defaults -MAX_CALLS_PER_CHILD_AGENT = int(os.environ.get('MAX_CALLS_PER_CHILD_AGENT', '1')) -ENABLE_TRACING = os.environ.get('ENABLE_TRACING', 'false').lower() == 'true' +MAX_CALLS_PER_CHILD_AGENT = 1 +try: + MAX_CALLS_PER_CHILD_AGENT = int(os.environ.get('MAX_CALLS_PER_CHILD_AGENT')) +except Exception as e: + print(f"Error getting MAX_CALLS_PER_CHILD_AGENT: {e}, using default of 1") + +ENABLE_TRACING = False +try: + ENABLE_TRACING = os.environ.get('ENABLE_TRACING').lower() == 'true' +except Exception as e: + print(f"Error getting ENABLE_TRACING: {e}, using default of False") # filter out agent transfer messages using a function def is_agent_transfer_message(msg):