Repository navigation
feat: add AgentBrain abstract base class - #73
AkashGowdaNC wants to merge 3 commits into
Conversation
|
@rosspeili PR 1 is up: the |
|
Nice work on step1 @AkashGowdaNC! A few small polish items before we land this and start Step 2:
No changelog entry needed for this PR since it's internal scaffolding, we'll add one once the brains are wired to |
|
Thanks @rosspeili — pushed all four:
Tests still pass (5/5). Ready when you are. |
|
Looks great @AkashGowdaNC! All 4 review items were addressed cleanly, the constructor contract and Just one tiny formatting nit on line 5 of from rooms.brains import AgentBrain , BrainResultThere's a stray space before the comma ( Please change it to: from rooms.brains import AgentBrainOnce that's pushed, we'll merge this and open the floor for Step 2 ( |
|
Thanks @rosspeili — fixed:
The file now imports |
Refs #15
What this PR does
Adds the
AgentBrainabstract base class described in #15, plus tests.This is step 1 of the plan discussed in the issue — the ABC and its tests only, with no production refactor yet. Follow-ups will move the LiteLLM path, then the custom-function path, behind this interface, and wire
AgentConfigto pick a brain.Why this is useful
The
Agentclass currently handles LiteLLM routing, custom-function dispatch, and Skillware tool-use in one place. Introducing the ABC first lets later PRs move each backend behind it without touching callers, keeping each change reviewable.Changes
rooms/brains/__init__.py: newAgentBrainABC with agenerate()method matching the return shape ofAgent.generate_response_with_eventstodaytests/test_agent_brain.py: 5 tests covering abstractness, minimal subclasses, result shape, and override-param pass-throughHow to verify