-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Context
While building out the 15 agent files in backend/agents/ (Phase 4), the current stubs (or early impls) lack standardized ABC interfaces with method signatures and docstrings. This risks a landmine where individual agent methods (e.g., PerceptionAgent's ingest()) don't align with BEL loop expectations, leading to cascading refactors when orchestrating all 15 in Phase 5.
Steps to Reproduce
- During Phase 4: Create a new agent file like
perception.pywithout ABC base class. - Implement
async def ingest(...)based on mental spec recall → Slight sig drift (e.g., missingcontext: dictparam). - In Phase 5 stub test: Import and call
await perception.ingest(input)inbel/loop.py→ TypeError or runtime mismatch. - Repeat x15 → Full orchestration becomes a mismatch nightmare.
Expected vs Actual
- Expected: Each agent file inherits from a shared
AgentABCwith@abstractmethodfor core methods (e.g.,async def ingest(self, raw_input: str, context: dict) -> List[str]: raise NotImplementedError), ensuring consistency as we build. - Actual: Ad-hoc impls in new files → Silent drifts until runtime/integration, blocking smooth phased dev.
Logs/Screenshots
- Hypothetical trace:
TypeError: ingest() missing 1 required positional argument: 'context'.
Suggested Fix
As we build each of the 15 agents in Phase 4:
- Create a shared
backend/agents/base.pywithAgentABC = ABCand abstract methods per role (e.g., from planned spec: ingest for Perception, create_beliefs for Creator). - Have each agent inherit:
class PerceptionAgent(AgentABC): ... - Prioritize: Add to first 3-5 files now (Perception, Creator, Reinforcement), then apply to remaining as you go.
Tie this as a Phase 4 milestone—low effort per file, huge payoff for orchestration.
Reactions are currently unavailable