ControlFlow icon indicating copy to clipboard operation
ControlFlow copied to clipboard

How to change the input source when interactive=True

Open FreeNet2023 opened this issue 1 year ago • 2 comments

Enhancement Description

When interactive=True, I want to change the input source to data from the socket instead of using input from the terminal. How should I implement this

Use Case

No response

Proposed Implementation

No response

FreeNet2023 avatar Dec 11 '24 01:12 FreeNet2023

The interactivity is implemented with a custom tool defined here. This is added to the list of tools that a task (see here) or agent (see here) can use. You would need to replace that tool with one that you implement yourself.

It would be nice if this cli_tool became a setting in the controlflow.defaults object.

bw-matthew avatar Jan 20 '25 14:01 bw-matthew

There is a such statement in the documentation: "When interactive=True, the agent is given a tool for that it can use to send messages to the user. The user can then respond to these messages, and the agent can use the responses to make decisions or perform actions. By default, ControlFlow collects inputs directly in your terminal, but input can also be sent remotely via the Prefect API.

Can you provide a sample of remote input implementation with Prefect API ?

alexander-krasilnikov avatar Jan 24 '25 17:01 alexander-krasilnikov