diff --git a/main.py b/main.py new file mode 100644 index 0000000..dde65b4 --- /dev/null +++ b/main.py @@ -0,0 +1,20 @@ +""" +Simple chat loop for the RAG agent. +""" + +import os +from langchain.agents import AgentExecutor +from agent import agent + +# Create executor with memory +executor = AgentExecutor(agent=agent, verbose=True) + +print("RAG‑Agent ready. Type 'exit' to quit.") +while True: + user_input = input("You: ") + if user_input.lower() in {"exit", "quit"}: + break + result = executor.invoke({"input": user_input}) + # The agent returns a dict with keys 'output' and possibly tool calls. + print(f"Assistant: {result.get('output', '')}") +print("Goodbye!")