Files
agent-harness/agent-human-in-the-loop/tools/interaction.py
2026-07-19 20:13:54 +02:00

9 lines
320 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)"