feat: pydantic models and inter-process messaging

Moved `InternalMessage` into schemas and created a `BeliefMessage`
model. Also added the ability for agents to communicate via ZMQ to
agents on another process.

ref: N25B-316
This commit is contained in:
2025-11-24 14:03:34 +01:00
parent 47a20413c4
commit ef00c03ec5
9 changed files with 113 additions and 37 deletions

View File

@@ -3,6 +3,7 @@ import json
from control_backend.agents.base import BaseAgent
from control_backend.core.agent_system import InternalMessage
from control_backend.core.config import settings
from control_backend.schemas.belief_message import BeliefMessage
class BDIBeliefCollectorAgent(BaseAgent):
@@ -80,7 +81,7 @@ class BDIBeliefCollectorAgent(BaseAgent):
msg = InternalMessage(
to=settings.agent_settings.bdi_core_name,
sender=self.name,
body=json.dumps(beliefs),
body=BeliefMessage(beliefs=beliefs).model_dump_json(),
thread="beliefs",
)