Skip to content
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

refactor(agent): Agent modular refactoring #1487

Merged
merged 5 commits into from
May 7, 2024

Conversation

fangyinc
Copy link
Collaborator

@fangyinc fangyinc commented May 6, 2024

Description

1. Refactor

Refactor the agent code into four core modules according to the paper A survey on large language model based autonomous agents

image

2. More flexible Profile module

A more flexible Profile module implementation that supports creating agent profiles from environment variables, databases, and other implementations.
Note: In order to be more clear and intuitive, use jinja2 to render the prompt template of agent profile.

3. Unified memory framework support

Supports sensory memory, short-term memory, long-term memory and hybrid memory.

How Has This Been Tested?

Run all python codes in the examples/agents directory.

Snapshots:

No snapshots.

Checklist:

  • My code follows the style guidelines of this project
  • I have already rebased the commits and make the commit message conform to the project standard.
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • Any dependent changes have been merged and published in downstream modules

@github-actions github-actions bot added agent Module: agent internal DB-GPT internal flag(chore|ci|refactor|test) labels May 6, 2024
yhjun1026
yhjun1026 previously approved these changes May 6, 2024
Copy link
Collaborator

@yhjun1026 yhjun1026 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

csunny
csunny previously approved these changes May 6, 2024
Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, The enhancement of the memory module and role module makes the agent framework capabilities more robust and complete. 🚀

@fangyinc fangyinc dismissed stale reviews from csunny and yhjun1026 via 910c51d May 6, 2024 13:19
Copy link
Collaborator

@csunny csunny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r+

Copy link
Collaborator

@Aries-ckt Aries-ckt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@Aries-ckt Aries-ckt merged commit 863b540 into eosphoros-ai:main May 7, 2024
2 checks passed
@fangyinc fangyinc deleted the agent-modularity branch May 8, 2024 02:34
Hopshine pushed a commit to Hopshine/DB-GPT that referenced this pull request Sep 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent Module: agent internal DB-GPT internal flag(chore|ci|refactor|test)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants