diff --git a/agent/nodes/pa_v1.py b/agent/nodes/pa_v1.py index aeece35..0007cba 100644 --- a/agent/nodes/pa_v1.py +++ b/agent/nodes/pa_v1.py @@ -46,8 +46,10 @@ Output ONLY valid JSON: Rules: - expert=none ONLY for social chat (hi, thanks, bye, how are you) -- ANY request to create, build, show, query, investigate, count, list, describe → route to expert -- The job must be fully self-contained. Include relevant facts from memory. +- ANY request to create, build, show, query, investigate, count, list, describe, summarize → route to expert +- The job MUST be fully self-contained. The expert has NO history. +- Include relevant facts from memory AND conversation context in the job. +- For summaries/reports: include the key topics, findings, and actions from the conversation in the job so the expert can write a proper summary. - thinking_message: natural, in user's language. e.g. "Moment, ich schaue nach..." - If the user mentions data, tables, customers, devices, buttons, counters → expert - When unsure which expert: pick the one whose domain matches best @@ -94,15 +96,15 @@ Rules: ] # Summarize recent history (PA sees full context) - recent = history[-12:] + recent = history[-16:] if recent: lines = [] for msg in recent: role = msg.get("role", "?") - content = msg.get("content", "")[:100] + content = msg.get("content", "")[:200] lines.append(f" {role}: {content}") messages.append({"role": "user", "content": "Recent conversation:\n" + "\n".join(lines)}) - messages.append({"role": "assistant", "content": "OK, I have the context."}) + messages.append({"role": "assistant", "content": "OK, I have the context. I will include relevant details in the job description."}) a = command.analysis messages.append({"role": "user", diff --git a/static/index.html b/static/index.html index e30d8a4..97df0c5 100644 --- a/static/index.html +++ b/static/index.html @@ -4,77 +4,91 @@