Skip to main content
Use add_workflow_history_to_steps to inject prior-run history into agent steps. A custom function step reads the same history with StepInput.get_workflow_history_context(). This workflow has three steps:
  • The first step is a meal suggester that suggests meal categories and cuisines.
  • The second step is a preference analysis step that analyzes the conversation history to understand user food preferences.
  • The third step is a recipe specialist that provides recipe recommendations based on the user’s preferences.
02_workflow_with_history_enabled_for_steps.py

Usage

1

Create a Python file

Create 02_workflow_with_history_enabled_for_steps.py with the code above.
2

Set up your virtual environment

3

Install dependencies

4

Export your OpenAI API key

5

Run Workflow