File size: 1,568 Bytes
6f07b3c
 
 
 
 
d98c62d
6f07b3c
fb6bc13
6f07b3c
 
 
fb6bc13
 
 
 
 
 
6f07b3c
 
 
 
 
 
 
 
 
 
 
 
 
 
 
d98c62d
 
 
6f07b3c
 
 
 
 
 
 
 
 
 
 
d98c62d
6f07b3c
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
import yaml
import os

def generate_config():
    telegram_token = os.getenv("TELEGRAM_BOT_TOKEN", "8964920717:AAEdwvXgdPPhOtLVjnsqfXdfnIx0wmzKyHg")
    agent_name = os.getenv("AGENT_NAME", "Hermes Worker")
    
    hf_token = os.getenv("HF_TOKEN")
    config = {
        "agent": {
            "name": agent_name,
            "personality": "I am your dedicated AI worker. I am powered by free Hugging Face inference and have access to 30+ free APIs from GitHub. I am 100% self-sufficient and ready to work."
        },
        "llm": {
            "provider": "huggingface",
            "model": "meta-llama/Meta-Llama-3-70B-Instruct",
            "api_key": hf_token
        },
        "mcp_servers": {
            "public-apis": {
                "command": "uvx",
                "args": ["public-apis-mcp", "run"]
            }
        },
        "gateway": {
            "platforms": {
                "telegram": {
                    "enabled": True,
                    "token": telegram_token
                }
            }
        },
        "toolsets": [
            "web", "terminal", "file", "browser", "vision", "todo", "memory", "session_search", "cronjob"
        ],
        "display": {
            "tool_progress": "all"
        }
    }
    
    config_path = os.path.expanduser("~/.hermes/config.yaml")
    os.makedirs(os.path.dirname(config_path), exist_ok=True)
    
    with open(config_path, "w") as f:
        yaml.dump(config, f)
    
    print(f"Worker Config generated at {config_path}")

if __name__ == "__main__":
    generate_config()