<a href="https://github.com/Haijian06/EartAgent/raw/v0.0.1/LICENSE">
<img height="21" src="https://img.shields.io/badge/License-Apache--2.0-ffffff?style=flat-square&labelColor=d4eaf7&color=1570EF" alt="license">
EartAgent (Efficient and real-time Agent) is a multimodal multi-intelligent body framework, through the compatibility of the large model ecology, for the current large model exists such as outdated information, the lack of external validation, error prediction frequently, etc., EartAgent framework aims to improve the efficiency and accuracy of the large language model. The framework is lightweight and easy to use, with a range of tools such as real-time search capabilities, and improves answer accuracy through multi-intelligence collaboration and reflection mechanisms. The framework is highly compatible and provides packaging examples to realize out-of-the-box use. At high fault tolerance, we also provide wrapper examples for developers to use out of the box: - 😃 Example - Real-time voice dialog - Website cloning - Thesis writing - 😁 Games. - Werewolf - Italian Town Life
Translated with DeepL.com (free version)
If you do not have pytorch installed locally (Windows, Mac, or Linux), you can install it yourself by referring to the documentation Install pytorch. Recommended to use conda as an administrative tool, you can create a new Python 3.9 virtual environment with the following command:
bash conda create -n EartAgent python=3.9 conda activate EartAgentbash git clone https://github.com/haijian-wang/EartAgent.gitInstallation of dependenciesbash pip install -r requirements.txt
You need to apply api_key in advance, apply according to your needs: ```python import EartAgent
form EartAgent.Agent.text_Agent import *
QwenAgent.api_key = “your_api_key” agent = QwenAgent( config=AgentConfig(name='kerry', system_prompt=“”)) x = 'Hi kerry' agent(x)
Memory is not turned on by default because it will cost you more tokens, but of course it is convenient to turn it onpython agent = QwenAgent( config=AgentConfig(name='kerry', system_prompt=“”,remember=True))We also support uploading all files and URLs to make Agent replies more what you want them to be.python agent(x,url='')2. Multi-intelligentsia coordinated work and communication: Multi-intelligence collaboration can greatly prompt the accuracy of responses, and MsgHub and Pipeline are the main means of communication between intelligences in EartAgent If we want agent_1 and agent_2 to communicate then it would bepython. while True. x = agent_1t(x) x = agent_2(x)If the user types “exit”, terminate the dialog.
if x.content == “exit”. print(“Exiting the conversation.”) break
Simpler you just need, EartAgent provides the option of Pipeline to maintain the flow of messages between intelligencespython pipeline = Pipeline(agent_list=[agent_1, agent_2]) final_response = pipeline.execute_pipeline(initial_message=“Initial message to pipeline”)Actually agent can also communicate in group chatspython. hub = MsgHub(agent_list) hub.broadcast_message(“Hello, everyone.”) hub.execute_pipeline()You can also add and remove members to the group chat as you wish.python hub.add_agent(agent_3) hub.remove_agent(agent_3)3. We have prepared a rich set of tools for Agents to use, such as Smart Body Networking. But here we need to request [search_api_key](https://serpapi.com/).python agent_1 = QwenAgent( config=AgentConfig(name='Kerry', system_prompt=“You're a good helper.", system_prompt="You're a good helper." tool_use=[ {'name': 'serpapi_search', 'api_key': 'your_search_api_key'} ]))5. There are many more tools available to us, as follows, and UtilityTools is full of them for you to explore. UtilityTools has many tools for you to explore.python from EartAgent.utils.UT import UtilityTools tools = UtilityTools() ```
Still need to apply for api_key in advance, according to your needs to apply:
python from EartAgent.app_packaging.voice_dialog_assistant import VoiceAssistant assistant = VoiceAssistant(api_key=“your_api_key”) assistant.run()
```python. from EartAgent.thinking.reflector import AgentReflector qwen_reflector = AgentReflector(qwen_agent)
Here you can define the number of reflections
reflected_content = qwen_reflector.Mreflect(reflection_count=3)
```
$ claude mcp add EartAgent \
-- python -m otcore.mcp_server <graph>