Skip to content

simulatecraft.core.agent

simulatecraft.core.agent

Base Agent: identity + state + an interchangeable Brain.

Agent

Bases: BaseModel

Wraps a Brain; the runner only ever talks to this interface.

on_human_message

on_human_message(sender: str, text: str) -> None

Hook for human-in-the-loop chat. Brains may override via attribute.

Source code in src/simulatecraft/core/agent.py
def on_human_message(self, sender: str, text: str) -> None:
    """Hook for human-in-the-loop chat. Brains may override via attribute."""
    handler = getattr(self.brain, "on_human_message", None)
    if handler is not None:
        handler(sender, text)