-
Notifications
You must be signed in to change notification settings - Fork 348
feat[agent]: add BaseAgent and standardize planner, memory, tool mana… #385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
feat[agent]: add BaseAgent and standardize planner, memory, tool mana… #385
Conversation
…ger (backward compatible)
<END_OF_USER_QUERY> | ||
""" | ||
|
||
OUTPUT_FORMAT = r"""You should provide a JSON object in this structure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is not used
class ReActMemory(BaseMemory): | ||
"""ReAct-specific memory implementation.""" | ||
|
||
def retrieve(self, query: str) -> List[Step]: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
retrieve is also not used
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup In progress few things still left to add and test. Memory, training.. will let you know once PR is ready for review in some time.
can you review and let me know is it good or what until now @liyin2015 pls. |
@@ -0,0 +1,134 @@ | |||
"""Example demonstrating ReAct agent with vector memory support.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
examples should not be in the package, please move it to tutorials
raise NotImplementedError | ||
|
||
|
||
class BaseToolManager(Component): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dont need another base tool manager, the toolmanager is already abstracted enough.
The goal is not to create more than 3 levels of abstraction especially those not doing much work.
The abstraction of the agent should be more focused on the design pattern of agents, such as openai's agent sdk, where it makes it easier to create an agent from user's experience and still remain the control over the prompts if the user wants to modify it.
also we are trying to make it easy to hand over the context (memory) and the step history to all other agents (as a tool).
i have some code and i can share later.
we can do another quick sync call next week.
you can check out openai agent sdk before that.
raise NotImplementedError | ||
|
||
|
||
class BaseAgent(Component): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
another complexity of the agent is at the auto-optimization, we can make this new agent experimental and it might need multiple iterations to get more mature
Agent Architecture Refactoring
⚠NOTE: TESTING UNDER PROGRESS!!⚠
Overview
Refactored agent architecture to improve modularity and maintainability by introducing a base agent class and restructuring the ReAct agent implementation.
Key Changes
BaseAgent
with standardized interfaces for planning, tool management, and memoryReActAgent
to use the new base architectureReActPlanner
,ReActToolManager
,ReActMemory
)Benefits
Breaking Changes
None. Both old (
LegacyReActAgent
) and new (NewReActAgent
) implementations are available.