diff --git a/main.py b/main.py index 456b17b..8ac60ef 100644 --- a/main.py +++ b/main.py @@ -1,53 +1,48 @@ import asyncio from agent import Agent -from llm.bedrock_client import BedrockClient -from client import MCPClient +from util.logger import get_logger async def main(): + + log = get_logger("NORA") + print("\n==============================") - print(" JARVIS START") + print(" N.O.R.A START") print("==============================\n") - # ๐Ÿง  LLM (AWS Bedrock Nova) - llm = BedrockClient() + agent = Agent() - # ๐Ÿค– Agent - agent = Agent(llm) - - # ๐Ÿ”Œ MCP CONNECT (OpenHAB Remote) + log.info("Connecting MCP...") await agent.mcp.connect() - # ๐Ÿง  Tools laden + log.info("Loading tools...") await agent.load_tools() - print("\n[JARVIS] System bereit. Tippe 'exit' zum Beenden.\n") + print("\nN.O.R.A bereit. (exit zum Beenden)\n") while True: - try: - user_input = input("Du: ").strip() - if user_input.lower() in ["exit", "quit"]: + try: + user = input("Du: ").strip() + + if user.lower() in ["exit", "quit"]: break - if not user_input: + if not user: continue - response = await agent.run(user_input) + response = await agent.run(user) - print(f"\nJARVIS: {response}\n") + print(f"\nN.O.R.A: {response}\n") except KeyboardInterrupt: break except Exception as e: - print(f"\n[ERROR] {e}\n") + log.error(str(e)) - # ๐Ÿงน Cleanup - try: - await agent.mcp.close() - except: - pass + await agent.mcp.close() - print("\n[JARVIS] Shutdown abgeschlossen.") \ No newline at end of file + log.info("Shutdown complete") \ No newline at end of file