Files
agent-harness/agent-human-in-the-loop/tools/interaction.py
2026-07-26 21:07:47 +02:00

9 lines
317 B
Python

def ask_question(question: str) -> str:
"""Ask the user a clarifying question and return their answer."""
print(f"\n [agent] {question}")
try:
answer = input(" Your answer: ").strip()
except EOFError:
return "(no answer, EOF)"
return answer if answer else "(no answer provided)"