Files
task-6a02e23da6fe2e4ac16acf65/cli.py
T
2026-05-28 09:27:42 +00:00

20 lines
503 B
Python

"""
Simple CLI for interacting with the RAG agent.
"""
import asyncio
from langchain_core.messages import HumanMessage
from agent import run_agent
async def main():
print("RAG Agent CLI. Type /quit to exit.")
while True:
user_input = input("You: ")
if user_input.strip() == "/quit":
break
msg = HumanMessage(content=user_input)
response = await run_agent([msg])
print(f"Agent: {response}")
if __name__ == "__main__":
asyncio.run(main())