From 50d3e3d638fddf6f9cc5e76c989388b8a5037986 Mon Sep 17 00:00:00 2001 From: Joshua Smith Date: Thu, 27 Mar 2025 11:22:17 -0400 Subject: [PATCH] setup instructions for money movement/real workflow or fake, and some minor code cleanup --- setup.md | 7 +++++++ tools/fin/move_money.py | 3 --- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/setup.md b/setup.md index 1afa4c1..d70f2e6 100644 --- a/setup.md +++ b/setup.md @@ -176,6 +176,13 @@ dotnet run ``` If you're running your train API above on a different host/port then change the API URL in `Program.cs`. Otherwise, be sure to run it using `python thirdparty/train_api.py`. +### Money Movement Scenario +This scenario _can_ initiate a secondary workflow to move money. Check out [this repo](https://github.com/temporal-sa/temporal-money-transfer-java) - you'll need to get the worker running and connected to the same account as the agentic worker. +By default it will _not_ make a real workflow, it'll just fake it. If you get the worker running and want to start a workflow, in your [.env](./.env): +```bash +FIN_START_REAL_WORKFLOW=FALSE #set this to true to start a real workflow +``` + ## Customizing the Agent - `tool_registry.py` contains the mapping of tool names to tool definitions (so the AI understands how to use them) - `goal_registry.py` contains descriptions of goals and the tools used to achieve them diff --git a/tools/fin/move_money.py b/tools/fin/move_money.py index d6adee6..1f17f3e 100644 --- a/tools/fin/move_money.py +++ b/tools/fin/move_money.py @@ -78,10 +78,7 @@ async def move_money(args: dict) -> dict: # Async function to start workflow async def start_workflow(amount_cents: int, from_account_name: str, to_account_name: str)-> str: - # Connect to Temporal - - client = await get_temporal_client() start_real_workflow = os.getenv("FIN_START_REAL_WORKFLOW") if start_real_workflow is not None and start_real_workflow.lower() == "false":