up
81
README.md
|
|
@ -26,7 +26,7 @@ Welcome to MetaChain! MetaChain is a **Fully-Automated** and highly **Self-Devel
|
|||
* **Top 1** 🏆 open-sourced method in GAIA benchmark, with performance comparable to **OpenAI's Deep Research**.
|
||||
* **Top 1** 🏆 Agentic-RAG with native self-managing vector database, outperforming **LangChain**.
|
||||
* Create ready-to-use **tools**, **agents** and **workflows** using natural language **only**.
|
||||
* Support for **ALL** LLMs (OpenAI, Anthropic, vLLM, Grok, Huggingface ...)
|
||||
* Support for **ALL** LLMs (OpenAI, Anthropic, Deepseek, vLLM, Grok, Huggingface ...)
|
||||
* Support both **function-calling** and **ReAct**.
|
||||
* Dynamic, extensible, and lightweight - your **personal** agent system.
|
||||
* Try it now!
|
||||
|
|
@ -152,8 +152,87 @@ MetaChain have a out-of-the-box multi-agent system, which you could choose `user
|
|||
|
||||
### 2. `agent editor` (Agent Creation without Workflow)
|
||||
|
||||
The most distinctive feature of MetaChain is its natural language customization capability. Unlike other agent frameworks, MetaChain allows you to create tools, agents, and workflows using natural language alone. Simply choose `agent editor` or `workflow editor` mode to start your journey of building agents through conversations.
|
||||
|
||||
You can use `agent editor` as shown in the following figure.
|
||||
|
||||
<table>
|
||||
<tr align="center">
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/1-requirement.png" alt="requirement" width="100%"/>
|
||||
<br>
|
||||
<em>Input what kind of agent you want to create.</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/2-profiling.png" alt="profiling" width="100%"/>
|
||||
<br>
|
||||
<em>Automated agent profiling.</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/3-profiles.png" alt="profiles" width="100%"/>
|
||||
<br>
|
||||
<em>Output the agent profiles.</em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr align="center">
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/4-tools.png" alt="tools" width="100%"/>
|
||||
<br>
|
||||
<em>Create the desired tools.</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/5-task.png" alt="task" width="100%"/>
|
||||
<br>
|
||||
<em>Input what do you want to complete with the agent. (Optional)</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/agent_editor/6-output-next.png" alt="output" width="100%"/>
|
||||
<br>
|
||||
<em>Create the desired agent(s) and go to the next step.</em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
### 3. `workflow editor` (Agent Creation with Workflow)
|
||||
|
||||
You can also create the agent workflows using natural language description with the `workflow editor` mode, as shown in the following figure. (Tips: this mode does not support tool creation temporarily.)
|
||||
|
||||
<table>
|
||||
<tr align="center">
|
||||
<td width="33%">
|
||||
<img src="./assets/workflow_editor/1-requirement.png" alt="requirement" width="100%"/>
|
||||
<br>
|
||||
<em>Input what kind of workflow you want to create.</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/workflow_editor/2-profiling.png" alt="profiling" width="100%"/>
|
||||
<br>
|
||||
<em>Automated workflow profiling.</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/workflow_editor/3-profiles.png" alt="profiles" width="100%"/>
|
||||
<br>
|
||||
<em>Output the workflow profiles.</em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table>
|
||||
<tr align="center">
|
||||
<td width="33%">
|
||||
<img src="./assets/workflow_editor/4-task.png" alt="task" width="100%"/>
|
||||
<br>
|
||||
<em>Input what do you want to complete with the workflow. (Optional)</em>
|
||||
</td>
|
||||
<td width="33%">
|
||||
<img src="./assets/workflow_editor/5-output-next.png" alt="output" width="100%"/>
|
||||
<br>
|
||||
<em>Create the desired workflow(s) and go to the next step.</em>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
## ☑️ Todo List
|
||||
|
||||
|
||||
|
|
|
|||
BIN
assets/agent_editor/1-requirement.png
Normal file
|
After Width: | Height: | Size: 609 KiB |
BIN
assets/agent_editor/2-profiling.png
Normal file
|
After Width: | Height: | Size: 651 KiB |
BIN
assets/agent_editor/3-profiles.png
Normal file
|
After Width: | Height: | Size: 700 KiB |
BIN
assets/agent_editor/4-tools.png
Normal file
|
After Width: | Height: | Size: 621 KiB |
BIN
assets/agent_editor/5-task.png
Normal file
|
After Width: | Height: | Size: 630 KiB |
BIN
assets/agent_editor/6-output-next.png
Normal file
|
After Width: | Height: | Size: 611 KiB |
BIN
assets/workflow_editor/1-requirement.png
Normal file
|
After Width: | Height: | Size: 499 KiB |
BIN
assets/workflow_editor/2-profiling.png
Normal file
|
After Width: | Height: | Size: 689 KiB |
BIN
assets/workflow_editor/3-profiles.png
Normal file
|
After Width: | Height: | Size: 564 KiB |
BIN
assets/workflow_editor/4-task.png
Normal file
|
After Width: | Height: | Size: 580 KiB |
BIN
assets/workflow_editor/5-output-next.png
Normal file
|
After Width: | Height: | Size: 577 KiB |
|
|
@ -5,7 +5,7 @@ cd ../..
|
|||
export DOCKER_WORKPLACE_NAME=workplace
|
||||
export EVAL_MODE=True
|
||||
export BASE_IMAGES=tjbtech1/gaia-bookworm:v2
|
||||
export COMPLETION_MODEL=claude-3-5-sonnet-20241022
|
||||
export COMPLETION_MODEL=claude-3-5-haiku-20241022
|
||||
# export COMPLETION_MODEL=gpt-4o-2024-08-06
|
||||
export DEBUG=False
|
||||
export MC_MODE=True
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ def agent_editing(agent_creator_agent, client, messages, context_variables, agen
|
|||
"""
|
||||
Use this tools when the desired agent(s) is created and tested successfully. You can NOT use this tool if the agent(s) is not created or tested successfully by running the agent(s).
|
||||
"""
|
||||
return f"Case resolved. The desired agent(s) is created and tested successfully. : {task_response}"
|
||||
return f"Case resolved. The desired agent(s) is created and tested successfully. : {task_response}"
|
||||
def case_not_resolved(task_response: str, context_variables: dict):
|
||||
"""
|
||||
Use this tools when you encounter irresistible errors after trying your best with multiple attempts for creating the desired agent(s). You can NOT use this tool before you have tried your best.
|
||||
|
|
@ -215,24 +215,24 @@ def meta_agent(model: str, context_variables: dict, debug: bool = True):
|
|||
requirements = query
|
||||
agent_form, output_xml_form, messages = agent_profiling(agent_former, client, messages, context_variables, requirements, debug)
|
||||
if agent_form is None:
|
||||
console.print(f"[bold red]The agent form is not created successfully, please modify your requirements again.[/bold red]")
|
||||
console.print(f"[bold red][bold magenta]@{agent_name}[/bold magenta] has not created agent form successfully, please modify your requirements again.[/bold red]")
|
||||
last_message = "Tell me what do you want to create with `Agent Chain`?"
|
||||
continue
|
||||
|
||||
agent = tool_editor_agent
|
||||
console.print(f"[bold green]The agent form is created successfully. [/bold green]")
|
||||
console.print(f"[bold green][bold magenta]@{agent_name}[/bold magenta] has created agent form successfully with the following details:\n[/bold green][bold blue]{output_xml_form}[/bold blue]")
|
||||
last_message = "It is time to create the desired tools, do you have any suggestions for creating the tools?"
|
||||
case 'Tool Editor Agent':
|
||||
suggestions = query
|
||||
tool_response, messages = tool_editing(tool_editor_agent, client, messages, context_variables, agent_form, output_xml_form, debug, suggestions)
|
||||
if tool_response.startswith("Case not resolved"):
|
||||
console.print(f"[bold red]Some desired tools are not created or tested successfully, please try again.[/bold red]")
|
||||
console.print(f"[bold red][bold magenta]@{agent_name}[/bold magenta] has not created tools successfully with the following error: {tool_response}[/bold red]")
|
||||
agent = tool_editor_agent
|
||||
last_message = "The tools are not created successfully, do you have any suggestions for creating the tools?"
|
||||
continue
|
||||
elif tool_response.startswith("Case resolved"):
|
||||
agent = agent_creator_agent
|
||||
console.print(f"[bold green]The tools are created successfully. [/bold green]")
|
||||
console.print(f"[bold green][bold magenta]@{agent_name}[/bold magenta] has created tools successfully with the following details:\n[/bold green][bold blue]{tool_response}[/bold blue]")
|
||||
last_message = "It is time to create the desired agent(s), do you have any suggestions for creating the agent(s)?"
|
||||
else:
|
||||
raise ValueError(f"Unknown tool response: {tool_response}")
|
||||
|
|
@ -247,10 +247,10 @@ def meta_agent(model: str, context_variables: dict, debug: bool = True):
|
|||
task = default_value if not task.strip() else task
|
||||
agent_response, messages = agent_editing(agent_creator_agent, client, messages, context_variables, agent_form, output_xml_form, requirements, task, debug, suggestions)
|
||||
if agent_response.startswith("Case not resolved"):
|
||||
console.print(f"[bold red]The agent(s) is not created or tested successfully, please try again.[/bold red]")
|
||||
console.print(f"[bold red][bold magenta]@{agent_name}[/bold magenta] has not created agent(s) successfully with the following error: {agent_response}[/bold red]")
|
||||
agent = agent_creator_agent
|
||||
last_message = "The agent(s) are not created successfully, do you have any suggestions for creating the agent(s)?"
|
||||
continue
|
||||
else:
|
||||
console.print(f"[bold green]The agent(s) are created successfully. [/bold green]")
|
||||
console.print(f"[bold green][bold magenta]@{agent_name}[/bold magenta] has created agent(s) successfully with the following details:\n[/bold green][bold blue]{agent_response}[/bold blue]")
|
||||
last_message = "Tell me what do you want to create with `Agent Chain`?"
|
||||
|
|
|
|||
|
|
@ -167,12 +167,12 @@ def meta_workflow(model: str, context_variables: dict, debug: bool = True):
|
|||
requirements = query
|
||||
workflow_form, output_xml_form, messages = workflow_profiling(workflow_former, client, messages, context_variables, requirements, debug)
|
||||
if workflow_form is None:
|
||||
console.print(f"[bold red]The workflow form is not created successfully, please modify your requirements again.[/bold red]")
|
||||
console.print(f"[bold red][bold magenta]@{agent_name}[/bold magenta] has not created workflow form successfully, please modify your requirements again.[/bold red]")
|
||||
last_message = "Tell me what do you want to create with `Workflow Chain`?"
|
||||
continue
|
||||
agent = workflow_creator_agent
|
||||
context_variables["workflow_form"] = workflow_form
|
||||
console.print(f"[bold green]The workflow form is created successfully. [/bold green]")
|
||||
console.print(f"[bold green][bold magenta]@{agent_name}[/bold magenta] has created workflow form successfully with the following details:\n[/bold green][bold blue]{output_xml_form}[/bold blue]")
|
||||
last_message = "It is time to create the desired workflow, do you have any suggestions for creating the workflow?"
|
||||
case "Workflow Creator Agent":
|
||||
suggestions = query
|
||||
|
|
@ -184,10 +184,10 @@ def meta_workflow(model: str, context_variables: dict, debug: bool = True):
|
|||
task = default_value if not task.strip() else task
|
||||
agent_response, messages = workflow_editing(workflow_creator_agent, client, messages, context_variables, workflow_form, output_xml_form, requirements, task, debug, suggestions)
|
||||
if agent_response.startswith("Case not resolved"):
|
||||
console.print(f"[bold red]The workflow is not created or tested successfully, please try again.[/bold red]")
|
||||
console.print(f"[bold red][bold magenta]@{agent_name}[/bold magenta] has not created workflow successfully with the following error: {agent_response}[/bold red]")
|
||||
agent = workflow_creator_agent
|
||||
else:
|
||||
console.print(f"[bold green]The workflow is created successfully. [/bold green]")
|
||||
console.print(f"[bold green][bold magenta]@{agent_name}[/bold magenta] has created workflow successfully with the following details:\n[/bold green][bold blue]{agent_response}[/bold blue]")
|
||||
last_message = "Tell me what do you want to create with `Workflow Chain` next?"
|
||||
|
||||
|
||||
|
|
|
|||