Repository navigation
feat: add AgentBrain abstract base class - #73
AkashGowdaNC wants to merge 4 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 |
|
@rosspeili — friendly nudge on this one. The last review round was addressed (import fix pushed in |
|
Thanks @AkashGowdaNC, small change of plan: all of #15 lands in this one PR. Use one commit per step so we can review commit by commit if it's easier for you. We'll review and merge it all together once it's complete. 1. Base contract (
|
|
@rosspeili Thanks for the plan — that's a much better structure. I want to be upfront: this is a multi-day refactor for me, so I'll push one commit per step. Commit 1 is up: Starting on Commit 2 ( |
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