Calling task or agent based on the user input or prompt

Hi All,

I am building Agentic AI which would generate result based on user input. There are 2 task which I want to call based on user input.

For e.g. Task1 and Task2.
Task1 should start generating the result based on user input only.
Task2 result would be dependent on the user input and Task1 result. When I say it is dependent on Task1 means it should remember the result of Task1 and integrate the user input and generate the results.

How should I achieve this? Please help here.

Thanks,
Kiran Sagar

For external user input, use “human in the loop.”

And if you want user input directly within the prompt, you can allow it via {} variables, which the user can then enter details for when ran with an interface like Streamlit or Gradio.

To pass task1’s output to task2 (or have task2 remember task1’s output), use the context parameter in task2 and add task1 to it.