diff --git a/pyproject.toml b/pyproject.toml
index 4ab7bec..6f3c4f9 100644
--- a/pyproject.toml
+++ b/pyproject.toml
@@ -1,5 +1,5 @@
[tool.poetry]
-name = "temporal-AI-agent"
+name = "temporal_AI_agent"
version = "0.1.0"
description = "Temporal AI Agent"
license = "MIT"
@@ -13,7 +13,7 @@ packages = [
]
[tool.poetry.urls]
-"Bug Tracker" = "https://github.com/temporalio/samples-python/issues"
+"Bug Tracker" = "https://github.com/temporal-community/temporal-ai-agent/issues"
[tool.poe.tasks]
format = [{cmd = "black ."}, {cmd = "isort ."}]
@@ -43,9 +43,16 @@ gtfs-kit = "^10.1.1"
[tool.poetry.group.dev.dependencies]
pytest = "^7.3"
+pytest-asyncio = "^0.18.3"
black = "^23.7"
isort = "^5.12"
[build-system]
requires = ["poetry-core>=1.4.0"]
-build-backend = "poetry.core.masonry.api"
\ No newline at end of file
+build-backend = "poetry.core.masonry.api"
+
+[tool.pytest.ini_options]
+asyncio_mode = "auto"
+log_cli = true
+log_cli_level = "INFO"
+log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)"
\ No newline at end of file
diff --git a/todo.md b/todo.md
index f67239e..c7d439f 100644
--- a/todo.md
+++ b/todo.md
@@ -10,11 +10,14 @@
[ ] financial advise - args being freeform customer input about their financial situation, goals
[ ] tool is maybe a new tool asking the LLM to advise
+
[ ] LLM failure->autoswitch:
- detect failure in the activity using failurecount
- activity switches to secondary LLM defined in .env
- activity reports switch to workflow
+[ ] for demo simulate failure - add utilities/simulated failures from pipeline demo
+
[ ] ask the ai agent how it did at the end of the conversation, was it efficient? successful? insert a search attribute to document that before return
- Insight into the agent’s performance
[ ] non-retry the api key error - "Invalid API Key provided: sk_test_**J..." and "AuthenticationError"
diff --git a/workflows/agent_goal_workflow.py b/workflows/agent_goal_workflow.py
index 1972547..28a2b52 100644
--- a/workflows/agent_goal_workflow.py
+++ b/workflows/agent_goal_workflow.py
@@ -108,7 +108,7 @@ class AgentGoalWorkflow:
conversation_history=self.conversation_history,
agent_goal=self.goal,
)
- validation_result = await workflow.execute_activity(
+ validation_result = await workflow.execute_activity_method(
ToolActivities.agent_validatePrompt,
args=[validation_input],
schedule_to_close_timeout=LLM_ACTIVITY_SCHEDULE_TO_CLOSE_TIMEOUT,
@@ -134,7 +134,7 @@ class AgentGoalWorkflow:
prompt_input = ToolPromptInput(prompt=prompt, context_instructions=context_instructions)
# connect to LLM and execute to get next steps
- tool_data = await workflow.execute_activity(
+ tool_data = await workflow.execute_activity_method(
ToolActivities.agent_toolPlanner,
prompt_input,
schedule_to_close_timeout=LLM_ACTIVITY_SCHEDULE_TO_CLOSE_TIMEOUT,
@@ -316,8 +316,9 @@ class AgentGoalWorkflow:
async def lookup_wf_env_settings(self, combined_input: CombinedInput)->None:
env_lookup_input = EnvLookupInput(
show_confirm_env_var_name = "SHOW_CONFIRM",
- show_confirm_default = True)
- env_output:EnvLookupOutput = await workflow.execute_activity(
+ show_confirm_default = True,
+ )
+ env_output:EnvLookupOutput = await workflow.execute_activity_method(
ToolActivities.get_wf_env_vars,
env_lookup_input,
start_to_close_timeout=LLM_ACTIVITY_START_TO_CLOSE_TIMEOUT,