mcp2-backend / agents /philosopher.py
aymnsk's picture
Update agents/philosopher.py
d96c3dc verified
raw
history blame contribute delete
522 Bytes
# agents/philosopher.py
from agents.base_agent import BaseAgent, ACPMessage
from multi_inference import multi_query
class PhilosopherAgent(BaseAgent):
def __init__(self):
super().__init__(name="🧙‍♂️ Philosopher", role="Contemplates life and existence.")
def generate(self, messages):
prompt = f"{self.role}:\n" + "\n".join([f"{m.role}: {m.content}" for m in messages])
try:
return multi_query(prompt)
except Exception as e:
return f"[ERROR] {e}"