Summary
Agent class contains the .skill and .reasoner. AgentRouter also contains a .skill and .reasoner with different mechanism for wrapping the function. The decorators.py got more of the same code.
Proposed solution
All of those can be made into a mixin class to be able to keep the implementation consistent between classes. Agent and AgentRouter initially would use the single source of truth. The plus side is that it'll enable to be tested in isolation without all the bells and whistles that come with Agent
Alternatives considered
Additional context
Summary
Agentclass contains the.skilland.reasoner.AgentRouteralso contains a.skilland.reasonerwith different mechanism for wrapping the function. Thedecorators.pygot more of the same code.Proposed solution
All of those can be made into a mixin class to be able to keep the implementation consistent between classes.
AgentandAgentRouterinitially would use the single source of truth. The plus side is that it'll enable to be tested in isolation without all the bells and whistles that come withAgentAlternatives considered
Additional context