""" Biographer capability registration for the Household Registry. Defines The Biographer's capabilities and registers it as a household member for coordination by the Steward and Tatlock. """ from src.agents.biographer.agent import get_biographer_agent from src.agents.biographer.tools import BIOGRAPHER_TOOLS from src.core.household_registry import ( HouseholdCapability, get_household_registry, ) from src.core.logging_config import get_logger logger = get_logger(__name__) # The Biographer's capability summary for Steward coordination BIOGRAPHER_CAPABILITY = HouseholdCapability( name="biographer", role="The Biographer", category="context", description=( "Memory keeper for the user's story: can RECALL personal facts " "(car, job, family, pets), RECORD new information learned from " "conversation, UPDATE profile (name, location, timezone) and " "preferences (units, theme), and FORGET information when requested. " "Use for: 'what car do I drive?', 'remember that I...', " "'forget my...', 'what do you know about me?'" ), domains=[ "remember", "recall", "forget", "memory", "preferences", "profile", "personal", "know", "about me", "my", ], cost="low", # Mostly vector search, minimal LLM requires_network=False, # All local (Qdrant, Redis) ) def get_biographer_capability() -> HouseholdCapability: """Get The Biographer's capability definition.""" return BIOGRAPHER_CAPABILITY def register_biographer() -> None: """ Register The Biographer with the Household Registry. This makes The Biographer available for: - Steward recommendations (via capability summary) - Tatlock delegation (via agent reference) - Tool scoping (via tool list) """ registry = get_household_registry() # Check if already registered if "biographer" in registry: logger.debug("biographer_already_registered") return registry.register( name="biographer", capability=BIOGRAPHER_CAPABILITY, tools=BIOGRAPHER_TOOLS, agent=get_biographer_agent(), ) logger.info( "biographer_registered", role=BIOGRAPHER_CAPABILITY.role, domains=BIOGRAPHER_CAPABILITY.domains, tool_count=len(BIOGRAPHER_TOOLS), ) def unregister_biographer() -> None: """Unregister The Biographer from the Household Registry.""" registry = get_household_registry() registry.unregister("biographer") logger.info("biographer_unregistered")