diff --git a/agent.py b/agent.py new file mode 100644 index 0000000..6f9f48e --- /dev/null +++ b/agent.py @@ -0,0 +1,34 @@ +import json +import re + +from config import OPENROUTER_MODEL +from openrouter_client import client +from mcp_client import MCPClient + + +class Agent: + def __init__(self): + self.mcp = MCPClient() + self.tools = [] + self.messages = [ + { + "role": "system", + "content": ( + "Du bist JARVIS, ein Smart-Home Assistent.\n" + "Du kannst MCP Tools verwenden.\n\n" + "Wenn du ein Tool benutzen willst, antworte STRICT als JSON:\n" + "{\n" + ' "tool": "tool_name",\n' + ' "args": {...}\n' + "}\n\n" + "Wenn kein Tool nötig ist:\n" + "{\n" + ' "response": "Text"\n' + "}\n\n" + "WICHTIG:\n" + "- KEIN Markdown\n" + "- KEIN zusätzlicher Text\n" + "- NUR JSON\n" + ) + } + ] \ No newline at end of file