geekan / MetaGPT

🌟 The Multi-Agent Framework: First AI Software Company, Towards Natural Language Programming
https://deepwisdom.ai/
MIT License
43.58k stars 5.19k forks source link

about ActionNode and the MetaGPT framework #1439

Open chenk-gd opened 1 month ago

chenk-gd commented 1 month ago

Looked at ActionNode and was quite confused. Can't see what role ActionNode mainly plays and what it does. There is an example of generating a Fibonacci series online. On this simple example, the main methods of ActionNode, Action and Role are all overloaded, it's basically hard-coding this particular process, completely unable to see the role of the framework should be.

I have a code generation scenario here, parsing the requirements document,and generating different code files according to the parsed content. Each step builds a different prompt using the content generated in some of the previous steps, call LLM to generate code. How does this requirement make more sense to implement in the metagpt framework? Single Agent or multi-Agent? Each step mapped to Action or ActionNode?

iorisa commented 1 month ago

If you need to generate prompts at runtime, you can use an alternative solution instead of the ActionNode approach. The ActionNode approach is suitable for SOP (Standard Operating Procedure) scenarios, where it is used to achieve modular prompt reuse.

If your scenario can be abstracted into finite states, then you can use the SOP approach, just like software company do. If your scenario cannot be abstracted into finite states or requires support for human-computer interaction, then I suggest considering the DataInterpreter solution.