feat: Add DAARWIZZ agent with personality

DAARWIZZ - Official AI agent for DAARION.city ecosystem

Changes:
- gateway-bot/daarwizz_prompt.txt: System prompt defining DAARWIZZ personality
- gateway-bot/http_api.py: Load and inject DAARWIZZ context into Router requests
- gateway-bot/Dockerfile: Copy DAARWIZZ prompt file to container
- providers/llm_provider.py: Support context.system_prompt from Gateway

Features:
- Telegram webhook sends agent='daarwizz' to Router
- System prompt loaded from file (customizable)
- LLM receives full DAARWIZZ context + RBAC
- Discord support included

Usage:
- User messages DAARWIZZ in Telegram
- Gateway enriches with system prompt + RBAC
- Router routes to LLM with full context
- DAARWIZZ responds with DAO-aware answers

Next: Set TELEGRAM_BOT_TOKEN and test first dialog
This commit is contained in:
Ivan Tytar
2025-11-15 15:31:58 +01:00
parent 244c6171a8
commit be95bbad9c
4 changed files with 187 additions and 53 deletions

View File

@@ -156,8 +156,20 @@ class LLMProvider(Provider):
)
def _get_system_prompt(self, req: RouterRequest) -> Optional[str]:
"""Get system prompt based on agent"""
# This can be enhanced to load from config
"""Get system prompt based on agent or context"""
# 1. Check if context.system_prompt provided (e.g., from Gateway)
context = req.payload.get("context") or {}
if "system_prompt" in context:
return context["system_prompt"]
# 2. Agent-specific system prompts
if req.agent == "daarwizz":
return (
"Ти — DAARWIZZ, офіційний AI-агент екосистеми DAARION.city. "
"Допомагай учасникам з microDAO, ролями та процесами. "
"Відповідай коротко, практично, враховуй RBAC контекст користувача."
)
if req.agent == "devtools":
return (
"Ти - DevTools Agent в екосистемі DAARION.city. "
@@ -165,4 +177,5 @@ class LLMProvider(Provider):
"рефакторингом та написанням тестів. "
"Відповідай коротко, конкретно, з прикладами коду коли потрібно."
)
return None