Newer
Older
cortex-hub / ai-hub / app / core / skills / definitions.py
# app/core/skills/definitions.py

SYSTEM_SKILLS = [
    {
        "name": "mesh_terminal_control",
        "description": "Execute stateful shell commands and manage terminal sessions across the agent mesh.",
        "system_prompt": "You are an expert linux terminal operator. When using this skill, you have direct access to a PTY. Format commands clearly and wait for confirmation if they are destructive.",
        "skill_type": "remote_grpc",
        "is_enabled": True,
        "features": ["chat", "swarm_control"],
        "config": {
            "service": "TerminalService",
            "method": "Execute",
            "capabilities": ["shell", "pty", "interactive"],
                    "parameters": {
                        "type": "object",
                        "properties": {
                            "command": {"type": "string", "description": "The shell command to execute."},
                            "node_id": {"type": "string", "description": "The target node ID within the mesh."},
                            "timeout": {"type": "integer", "description": "The max seconds to wait for result. Default 30. Use for long-running tasks."}
                        },
                        "required": ["command", "node_id"]
                    }
        },
        "is_system": True
    },
    {
        "name": "browser_automation_agent",
        "description": "Perform web browsing, form filling, and UI testing on remote agent nodes using Playwright.",
        "system_prompt": "You are an AI browsing assistant. Use the Playwright tool to navigate pages, extract information, and interact with web elements. Always provide reasoning for your actions.",
        "skill_type": "remote_grpc",
        "is_enabled": True,
        "features": ["chat", "workflow", "swarm_control"],
        "config": {
            "service": "BrowserService",
            "method": "Navigate",
            "capabilities": ["browser", "screenshot", "click"],
            "parameters": {
                "type": "object",
                "properties": {
                    "url": {"type": "string", "description": "The URL to navigate to."},
                    "action": {"type": "string", "enum": ["navigate", "click", "type", "screenshot"], "description": "The browser action to perform."},
                    "node_id": {"type": "string", "description": "The target node ID."}
                },
                "required": ["url", "action", "node_id"]
            }
        },
        "is_system": True
    },
    {
        "name": "voice_interaction_handler",
        "description": "Handle real-time voice interruptions, tone analysis, and speech-to-speech feedback loops.",
        "system_prompt": "You are a voice-first AI. Keep your responses concise and conversational. Focus on natural prosody and handle interruptions gracefully.",
        "skill_type": "local",
        "is_enabled": True,
        "features": ["voice"],
        "config": {
            "interaction_mode": "speech-to-speech",
            "latency_target": 300,
            "parameters": {
                "type": "object",
                "properties": {
                    "mode": {"type": "string", "enum": ["active", "passive"], "description": "Voice interaction mode."}
                }
            }
        },
        "is_system": True
    },
    {
        "name": "mesh_file_explorer",
        "description": "List, read, and manipulate files within the decentralized mesh synchronization system.",
        "system_prompt": "You are a file management assistant. You can browse and synchronize files across different agent nodes.",
        "skill_type": "local",
        "is_enabled": True,
        "features": ["chat", "workflow", "swarm_control"],
        "config": {
            "internal_module": "app.core.grpc.core.mirror",
            "actions": ["list", "read", "write", "delete"],
            "parameters": {
                "type": "object",
                "properties": {
                    "action": {"type": "string", "enum": ["list", "read", "write", "delete"], "description": "File system action."},
                    "path": {"type": "string", "description": "Relative path to the file/directory."},
                    "node_id": {"type": "string", "description": "The target node ID."},
                    "content": {"type": "string", "description": "Optional content for write action."}
                },
                "required": ["action", "path", "node_id"]
            }
        },
        "is_system": True
    }
]