mirror of
https://github.com/temporal-community/temporal-ai-agent.git
synced 2026-03-15 14:08:08 +01:00
making plans
This commit is contained in:
22
todo.md
Normal file
22
todo.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# todo list
|
||||
[ ] create people management scenario <br />
|
||||
-- check pay status
|
||||
-- book work travel
|
||||
-- check PTO levels
|
||||
-- check insurance coverages
|
||||
-- book PTO around a date (https://developers.google.com/calendar/api/guides/overview)?
|
||||
-- scenario should use multiple tools
|
||||
-- expense management
|
||||
-- check in on the health of the team
|
||||
[ ] demo the reasons why:
|
||||
-- Orchestrate interactions across distributed data stores and tools
|
||||
-- Hold state, potentially over long periods of time
|
||||
-- Ability to ‘self-heal’ and retry until the (probabilistic) LLM returns valid data
|
||||
-- Support for human intervention such as approvals
|
||||
-- Parallel processing for efficiency of data retrieval and tool use
|
||||
-- Insight into the agent’s performance
|
||||
|
||||
[ ] customize prompts in [workflow to manage scenario](./workflows/tool_workflow.py)<br />
|
||||
[ ] add in new tools? <br />
|
||||
[ ] create tests<br />
|
||||
[ ] non-retry the api key error - "Invalid API Key provided: sk_test_**J..." and "AuthenticationError"
|
||||
@@ -42,9 +42,11 @@ class AgentGoalWorkflow:
|
||||
self.confirm: bool = False
|
||||
self.tool_results: List[Dict[str, Any]] = []
|
||||
|
||||
# see ../api/main.py#temporal_client.start_workflow() for how these parameters are set
|
||||
@workflow.run
|
||||
async def run(self, combined_input: CombinedInput) -> str:
|
||||
"""Main workflow execution method."""
|
||||
# setup phase
|
||||
params = combined_input.tool_params
|
||||
agent_goal = combined_input.agent_goal
|
||||
|
||||
@@ -55,18 +57,23 @@ class AgentGoalWorkflow:
|
||||
if params and params.prompt_queue:
|
||||
self.prompt_queue.extend(params.prompt_queue)
|
||||
|
||||
waiting_for_confirm = False
|
||||
waiting_for_confirm = False # controls if we confirm with the user
|
||||
current_tool = None
|
||||
|
||||
# interactive loop
|
||||
while True:
|
||||
# wait for signals
|
||||
await workflow.wait_condition(
|
||||
lambda: bool(self.prompt_queue) or self.chat_ended or self.confirm
|
||||
)
|
||||
|
||||
#process signals of various kinds
|
||||
#chat-end signal
|
||||
if self.chat_ended:
|
||||
workflow.logger.info("Chat ended.")
|
||||
return f"{self.conversation_history}"
|
||||
|
||||
# tool execution if selected and confirmed
|
||||
if self.confirm and waiting_for_confirm and current_tool and self.tool_data:
|
||||
self.confirm = False
|
||||
waiting_for_confirm = False
|
||||
@@ -135,6 +142,7 @@ class AgentGoalWorkflow:
|
||||
)
|
||||
self.tool_data = tool_data
|
||||
|
||||
# move forward in the tool chain
|
||||
next_step = tool_data.get("next")
|
||||
current_tool = tool_data.get("tool")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user