PrefectHQ / ControlFlow

🦾 Take control of your AI agents
https://controlflow.ai
Apache License 2.0
746 stars 53 forks source link

Adjust how human input works #244

Open jlowin opened 3 months ago

jlowin commented 3 months ago

Probably will address #219

Instead of having human input only via agent making a tool call and the user input in the response, instruct the agents that user input may come at any time in the thread, but they must use a tool to specifically request a response from the user.

The pattern the agent would see is:

...
<agent used human input tool: 'hello, whats your name?'>
<tool response successful>
<human message>

The key is we have to show the tool call so that agents don't conclude from history that they can converse with users by posting "regular" messages.

This will also facilitate adding user messages at any point, perhaps with a mechanism like

agent.send_message()
or 
task.send_message()

sending a global message doesn't seem necessary at the moment.

dexhorthy commented 3 months ago

yes please! I hadn't considered the "create a synthetic tool call before inserting the user input" to allow for ad-hoc "injection" of user input - definitely interesting