#!/usr/bin/env python3
"""Run find_agent interactively."""

from agents.find_agent import create_find_agent, run_find_agent


def main() -> None:
    agent = create_find_agent()
    print(f"find_agent ready | model={agent.model}")
    print(f"tools: {agent.tools.list_tools()}")
    print()

    while True:
        try:
            run_id = input("run_id> ").strip()
            if not run_id or run_id.lower() in ("exit", "quit", "q"):
                break
            user_input = input("You> ").strip()
        except (EOFError, KeyboardInterrupt):
            print("\nBye.")
            break
        if not user_input or user_input.lower() in ("exit", "quit", "q"):
            break
        result = run_find_agent(user_input, run_id=run_id)
        print(f"\nAgent> {result.content}\n")


if __name__ == "__main__":
    main()
