Adding signals & queries to the basic Bedrock sample. Starts a workflow with a prompt, allows follow-up prompts to be given using Temporal signals, and allows the conversation history to be queried using Temporal queries.
To run, first see samples-python README.md, and bedrock README.md for prerequisites specific to this sample. Once set up, run the following from the root directory:
-
Run the worker:
uv run bedrock/signals_and_queries/run_worker.py -
In another terminal run the client with a prompt.
Example:
uv run bedrock/signals_and_queries/send_message.py 'What animals are marsupials?' -
View the worker's output for the response.
-
Give followup prompts by signaling the workflow.
Example:
uv run bedrock/signals_and_queries/send_message.py 'Do they lay eggs?' -
Get the conversation history by querying the workflow.
Example:
uv run bedrock/signals_and_queries/get_history.py -
The workflow will timeout after inactivity.