Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
Reorganize skills by agent type, enhance sub-agent delegation
trohitg6615f05b479b
diff --git a/CLAUDE.md b/CLAUDE.mdindex db9db87e..21a8b469 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -621,6 +621,7 @@ Specialized agents are AI Agents pre-configured for specific domains. They inher- `input-skill` - Skill nodes (including Master Skill for aggregated skills)- `input-memory` - Memory node for conversation history- `input-tools` - Tool nodes for LLM tool calling+- `input-task` - Task completion events from taskTrigger nodes**Specialized Agent Types:**- **android_agent**: Android Control Agent - AI agent for Android device control. Connect Android service nodes (battery, wifi, bluetooth, apps, location, camera, sensors) as tools.@@ -1671,8 +1672,8 @@ The system supports specialized agent variants that inherit from the base AI Age| Consumer | `consumer_agent` | cart | purple |All specialized agents share the same handle configuration:-- **Left**: `input-main` (Input), `input-memory` (Memory)-- **Bottom**: `input-skill` (Skill), `input-tools` (Tool)+- **Left**: `input-main` (Input, 30%), `input-memory` (Memory, 55%), `input-task` (Task, 85%)+- **Bottom**: `input-skill` (Skill, 25%), `input-tools` (Tool, 75%)- **Top**: `output-top` (Output)The `AIAgentNode.tsx` component uses `AGENT_CONFIGS` to render all agent types with their specific icons, titles, and theme colors.diff --git a/client/package.json b/client/package.jsonindex 53e11d17..7fd32de2 100644--- a/client/package.json+++ b/client/package.json@@ -1,7 +1,7 @@{"name": "react-flow-client","private": true,- "version": "0.0.12",+ "version": "0.0.13","type": "module","scripts": {"start": "vite --host 0.0.0.0",diff --git a/client/src/components/OutputPanel.tsx b/client/src/components/OutputPanel.tsxindex 6bf394e0..a46d8e5c 100644--- a/client/src/components/OutputPanel.tsx+++ b/client/src/components/OutputPanel.tsx@@ -177,9 +177,10 @@ const OutputPanel: React.FC<OutputPanelProps> = ({ nodeId }) => {// Helper to check if a handle is a config/auxiliary handle (not main data flow)const isConfigHandle = (handle: string | null | undefined): boolean => {if (!handle) return false;- // Config handles follow pattern: input-<type> where type is not 'main'+ // Config handles follow pattern: input-<type> where type is not 'main', 'chat', or 'task'// Examples: input-memory, input-tools, input-model- if (handle.startsWith('input-') && handle !== 'input-main') {+ // Non-config (data flow) handles: input-main, input-chat, input-task+ if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat' && handle !== 'input-task') {return true;}return false;diff --git a/client/src/components/parameterPanel/InputSection.tsx b/client/src/components/parameterPanel/InputSection.tsxindex 0b2a7304..01e36b06 100644--- a/client/src/components/parameterPanel/InputSection.tsx+++ b/client/src/components/parameterPanel/InputSection.tsx@@ -60,10 +60,11 @@ const InputSection: React.FC<InputSectionProps> = ({ nodeId, visible = true }) =// Helper to check if a handle is a config/auxiliary handle (not main data flow)const isConfigHandle = (handle: string | null | undefined): boolean => {if (!handle) return false;- // Config handles follow pattern: input-<type> where type is not 'main' or 'chat'+ // Config handles follow pattern: input-<type> where type is not 'main', 'chat', or 'task'// Examples: input-memory, input-tools, input-model, input-skill- // Non-config (primary data) handles: input-main, input-chat- if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat') {+ // Non-config (primary data) handles: input-main, input-chat, input-task+ // Note: input-task is for taskTrigger node output which should be visible as draggable variables+ if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat' && handle !== 'input-task') {return true;}return false;diff --git a/docs-internal/specialized_agent_node_creation.md b/docs-internal/specialized_agent_node_creation.mdindex fb1a043e..5585b1bb 100644--- a/docs-internal/specialized_agent_node_creation.md+++ b/docs-internal/specialized_agent_node_creation.md@@ -4,6 +4,22 @@Specialized Agent nodes are AI Agents pre-configured for specific domains and use cases. They inherit full AI Agent functionality (provider selection, model configuration, prompt templates, thinking/reasoning) while being tailored for specific capabilities like Android control, coding, web automation, task management, or social messaging.+## Full Capabilities++All specialized agents support:++| Capability | Description |+|------------|-------------|+| **LangGraph Execution** | Full StateGraph with iterative tool-calling loop (max 10 iterations) |+| **6 AI Providers** | OpenAI, Anthropic (Claude), Google (Gemini), Groq, OpenRouter, Cerebras |+| **Extended Thinking** | Thinking/reasoning for Claude, Gemini, Groq, OpenAI o-series with output available for downstream nodes |+| **Skill Injection** | Master Skill expansion with `get_registry_prompt()` system message enhancement |+| **Tool Calling** | Connect tool nodes to `input-tools` for LLM tool invocation |+| **Two-Tier Memory** | Short-term (markdown window) + long-term (vector store) via `input-memory` |+| **Task Delegation** | Fire-and-forget async delegation, receive results via `input-task` handle |+| **Input Auto-Fallback** | Empty prompt extracts text from connected `input-main` nodes |+| **taskTrigger Integration** | React to child agent completion events via `input-task` handle |+## Architecture```@@ -441,16 +457,34 @@ All specialized agents support:| Feature | Description ||---------|-------------|-| **Multi-Provider** | OpenAI, Anthropic, Google, Groq, OpenRouter |+| **Multi-Provider** | OpenAI, Anthropic, Google, Groq, OpenRouter, Cerebras || **Dynamic Models** | Model dropdown populated based on selected provider || **Prompt Templates** | Support for `{{ $json.field }}` template variables || **System Message** | Customizable agent personality and behavior || **Temperature** | Response randomness control (0-2) || **Max Tokens** | Output length limit (1-8192) |-| **Thinking/Reasoning** | Extended thinking for Claude, Gemini, Groq models |+| **Thinking/Reasoning** | Extended thinking for Claude, Gemini, Groq, OpenAI o-series || **Thinking Budget** | Token budget for reasoning (1024-16000) || **Reasoning Effort** | Low/Medium/High for OpenAI o-series and Groq |+| **Thinking Output** | Thinking content available in Input Data & Variables for downstream nodes || **Async Delegation** | Can be used as tools by parent agents (fire-and-forget) |+| **Task Completion** | Receive delegated task results via `input-task` handle |+| **Input Auto-Fallback** | Empty prompt extracts text from connected `input-main` nodes |+| **Skill Injection** | Skills appended to system message via `get_registry_prompt()` |+| **Two-Tier Memory** | Short-term (markdown) + long-term (vector store) memory |++### Extended Thinking Details++Thinking content is extracted differently per provider and accumulates across tool-calling iterations:++| Provider | Extraction Method | Notes |+|----------|------------------|-------|+| **Claude** | `content_blocks` with `type='thinking'` | Requires `max_tokens > thinkingBudget` |+| **Gemini** | `response_metadata.candidates[0].content.parts` with `thought=True` | 2.5/Flash Thinking models |+| **Groq** | `additional_kwargs.reasoning` or `response_metadata.reasoning` | Qwen3/QwQ models, `reasoningFormat='parsed'` |+| **OpenAI** | Reasoning summaries | o-series, requires org verification |++The accumulated `thinking` content is available in the agent's output for downstream nodes to use via drag-and-drop in Input Data & Variables.## Async Agent Delegation@@ -527,6 +561,221 @@ When the AI Agent needs to control Android devices:| `server/services/handlers/tools.py` | `_execute_delegated_agent()` spawns child via `asyncio.create_task()` || `server/services/handlers/ai.py` | Passes `context` for nested agent delegation |+## Task Completion Handling++The `input-task` handle allows specialized agents to receive and react to task completion events from delegated child agents.++### taskTrigger Node Integration++Connect a `taskTrigger` workflow node to the agent's `input-task` handle. When a delegated child agent completes (success or error), the taskTrigger fires and provides the completion data to the parent agent.++```+[Parent Agent] ←──task── [taskTrigger] ←── (listens for task_completed events)+ ↓+ delegates to+ ↓+[Child Agent] ──(completes)──→ broadcasts task_completed event+```++### Task Completion Event Structure++When a delegated child agent completes, it broadcasts a `task_completed` event:++```python+{+ 'task_id': 'uuid-string',+ 'status': 'completed' | 'error',+ 'agent_name': 'Android Control Agent',+ 'agent_node_id': 'node-id',+ 'parent_node_id': 'parent-node-id',+ 'result': '...', # Present when status='completed'+ 'error': '...', # Present when status='error'+ 'workflow_id': 'workflow-uuid'+}+```++### Tool Stripping Behavior++**Critical**: When an agent receives task completion data via `input-task`, ALL tools are stripped from the agent before execution. This prevents confusion where the agent is instructed to "report the result" but still has tools bound that it might try to use.++```python+# In handlers/ai.py - when task_data is present+if task_data:+ # Strip all tools - agent's job is to report result, not execute+ tool_data = []+```++### Use Case: Parent Reacting to Child Completion++1. Parent agent delegates task: `delegate_to_android_agent(task="Check battery")`+2. Parent continues immediately (fire-and-forget)+3. Child agent executes and completes+4. Child broadcasts `task_completed` event+5. taskTrigger connected to parent's `input-task` fires+6. Parent agent receives task result via `input-task` handle+7. Parent agent (with tools stripped) reports the result naturally++## LangGraph Execution++Specialized agents use LangGraph's StateGraph for structured tool-calling execution.++### StateGraph Construction++When tools are connected to `input-tools`, the agent builds a conditional graph:++```python+# Simplified from server/services/ai.py+graph = StateGraph(AgentState)+graph.add_node("agent", call_model)+graph.add_node("tools", tool_executor)++graph.add_conditional_edges(+ "agent",+ should_continue, # Check if LLM wants to call tools+ {"continue": "tools", "end": END}+)+graph.add_edge("tools", "agent") # Loop back after tool execution+```++### Iterative Tool-Calling Loop++- **Max iterations**: 10 (prevents infinite loops)+- **Loop pattern**: LLM → tool call → tool execution → LLM → ... → final response+- **Exit conditions**: LLM returns response without tool calls, or max iterations reached++### Tool-Less Optimization++When no tools are connected to `input-tools`, the agent skips LangGraph entirely for better performance:++```python+if not tools:+ # Direct LLM invocation without graph overhead+ response = await model.ainvoke(messages)+else:+ # Full LangGraph execution with tool loop+ response = await graph.ainvoke(state)+```++## Input Data Auto-Fallback++When the agent's `prompt` parameter is empty, it automatically extracts text from nodes connected to `input-main`.++### Extraction Priority++The agent searches the connected node's output for text in this order:+1. `message` field+2. `text` field+3. `content` field+4. String representation of entire output++### Use Case++Enables simple workflows like:+```+[Chat Trigger] → [Zeenie]+```++Without manually setting `prompt` to `{{chatTrigger.message}}`, the agent auto-extracts the message.++## Skill Injection++Skills connected to `input-skill` are injected into the agent's system message.++### Master Skill Expansion++When a `masterSkill` node is connected, it expands into individual skill entries based on `skillsConfig`:++```python+skillsConfig = {+ 'whatsapp-skill': {+ 'enabled': True,+ 'instructions': '...',+ 'isCustomized': False+ },+ 'http-skill': {+ 'enabled': True,+ 'instructions': '...',+ 'isCustomized': True # User modified in UI+ }+}+```++### Registry Prompt Generation++The `SkillLoader.get_registry_prompt()` method generates a skill list appended to the system message:++```markdown+## Available Skills++You have access to the following skills. Use them when appropriate:++- **whatsapp-skill**: Send and receive WhatsApp messages+ - Tools: whatsapp_send, whatsapp_db+- **http-skill**: Make HTTP requests to external APIs+ - Tools: http-request+```++### DB-First Pattern++After first activation, skill instructions are stored in and read from the database:+1. First load: Instructions seeded from SKILL.md file+2. Subsequent loads: Database is source of truth+3. User edits: Saved to database only+4. "Reset to Default": Reloads from SKILL.md file++## Memory Integration++Memory connected to `input-memory` provides conversation history via a two-tier system.++### Short-Term Memory++- **Format**: Markdown with timestamps+- **Window-based trimming**: Keeps last N message pairs (configurable via `windowSize`)+- **Auto-append**: New human/AI messages appended after each execution++### Long-Term Memory++- **Optional**: Enable via `longTermEnabled` parameter+- **Storage**: InMemoryVectorStore per session+- **Semantic retrieval**: Archived messages retrieved by similarity+- **Retrieval count**: Configurable via `retrievalCount` parameter++### Memory Lifecycle++1. Load markdown from `memoryContent` parameter+2. Parse to LangChain messages+3. Retrieve relevant long-term memories (if enabled)+4. Execute agent with conversation history+5. Append new exchange to markdown+6. Trim to window size, archive removed messages+7. Save updated markdown back to node parameters++## Architecture Notes++### Shared Handler Routing++All 10 specialized agents route to the same backend handler:++```python+# In node_executor.py+'android_agent': partial(handle_chat_agent, ai_service=..., database=...),+'coding_agent': partial(handle_chat_agent, ai_service=..., database=...),+# ... all 10 specialized agents use handle_chat_agent+```++This means specialization is purely UI/configuration, not backend behavioral. All agents share:+- Same `_collect_agent_connections()` base function+- Same skill injection pipeline+- Same tool execution flow+- Same memory handling++### Database-First Architecture++Node parameters, memory content, and tool schemas come from database first (not `node.data`):+- Reduces workflow JSON bloat+- Enables user customization persistence+- Separates configuration from workflow structure+## Testing1. Hard refresh browser (Ctrl+Shift+R) after changesdiff --git a/package-lock.json b/package-lock.jsonindex c50a2018..78b66be3 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "machinaos",- "version": "0.0.10",+ "version": "0.0.12","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "machinaos",- "version": "0.0.10",+ "version": "0.0.12","hasInstallScript": true,"license": "MIT","workspaces": [@@ -27,7 +27,7 @@},"client": {"name": "react-flow-client",- "version": "0.0.0",+ "version": "0.0.12","dependencies": {"@ant-design/icons": "^6.0.2","@eslint/js": "^9.33.0",diff --git a/package.json b/package.jsonindex bdfc2840..9ef7e640 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "machinaos",- "version": "0.0.12",+ "version": "0.0.13","description": "Open source workflow automation platform with AI agents, React Flow, and n8n-inspired architecture","type": "module","keywords": [diff --git a/server/routers/websocket.py b/server/routers/websocket.pyindex 58194140..868006b5 100644--- a/server/routers/websocket.py+++ b/server/routers/websocket.py@@ -629,20 +629,20 @@ async def handle_deploy_workflow(data: Dict[str, Any], websocket: WebSocket) ->session_id = data.get("session_id", "default")# DEBUG: Log received edges to trace tool connection issues- logger.info(f"[Deploy] Received {len(edges)} edges for workflow {workflow_id}")+ logger.debug(f"[Deploy] Received {len(edges)} edges for workflow {workflow_id}")for e in edges:target_handle = e.get('targetHandle')if target_handle and target_handle.startswith('input-') and target_handle != 'input-main':- logger.info(f"[Deploy] Config edge: {e.get('source')} -> {e.get('target')} (handle={target_handle})")+ logger.debug(f"[Deploy] Config edge: {e.get('source')} -> {e.get('target')} (handle={target_handle})")# Check for tool connections to AI Agenttool_edges = [e for e in edges if e.get('targetHandle') == 'input-tools']if tool_edges:- logger.info(f"[Deploy] Tool edges found: {len(tool_edges)}")+ logger.debug(f"[Deploy] Tool edges found: {len(tool_edges)}")for te in tool_edges:- logger.info(f"[Deploy] Tool edge: source={te.get('source')} -> target={te.get('target')}")+ logger.debug(f"[Deploy] Tool edge: source={te.get('source')} -> target={te.get('target')}")else:- logger.info(f"[Deploy] No input-tools edges found")+ logger.debug(f"[Deploy] No input-tools edges found")if not nodes:return {"success": False, "error": "No nodes provided"}diff --git a/server/services/ai.py b/server/services/ai.pyindex 06eac87a..b9775ea3 100644--- a/server/services/ai.py+++ b/server/services/ai.py@@ -2092,6 +2092,7 @@ class AIService:'whatsappDb': 'whatsapp_db','gmaps_locations': 'geocode','gmaps_nearby_places': 'nearby_places',+ 'taskManager': 'task_manager','timer': 'timer','cronScheduler': 'cron_scheduler',# Built-in check tool for delegation results@@ -2138,23 +2139,24 @@ class AIService:'whatsappDb': 'Query WhatsApp database - list contacts, search groups, get contact/group info, retrieve chat history.','gmaps_locations': 'Geocode addresses to coordinates or reverse geocode coordinates to addresses using Google Maps.','gmaps_nearby_places': 'Search for nearby places (restaurants, hospitals, banks, etc.) using Google Maps Places API.',+ 'taskManager': 'Track delegated sub-agent tasks. Operations: list_tasks (see all tasks), get_task (check specific task status/result), mark_done (cleanup completed tasks).','timer': 'Wait/sleep for a specified duration. Specify duration (1-3600) and unit (seconds, minutes, or hours). Returns timestamp and elapsed time after waiting.','cronScheduler': 'Schedule a delayed or recurring execution. Supports seconds, minutes, hours, daily, weekly, monthly frequencies with timezone. Use frequency to set schedule type, then set the relevant interval/time parameters.',# Built-in check tool for delegation results'_builtin_check_delegated_tasks': 'Check status and retrieve results of previously delegated tasks.',- # Agent delegation tools- 'aiAgent': 'Delegate a task to another AI Agent. Returns task_id. Use check_delegated_tasks for results.',- 'chatAgent': 'Delegate a task to a Chat Agent. Returns task_id. Use check_delegated_tasks for results.',- 'android_agent': 'Delegate to Android Control Agent. Returns task_id. Use check_delegated_tasks for results.',- 'coding_agent': 'Delegate to Coding Agent. Returns task_id. Use check_delegated_tasks for results.',- 'web_agent': 'Delegate to Web Control Agent. Returns task_id. Use check_delegated_tasks for results.',- 'task_agent': 'Delegate to Task Management Agent. Returns task_id. Use check_delegated_tasks for results.',- 'social_agent': 'Delegate to Social Media Agent. Returns task_id. Use check_delegated_tasks for results.',- 'travel_agent': 'Delegate to Travel Agent. Returns task_id. Use check_delegated_tasks for results.',- 'tool_agent': 'Delegate to Tool Agent. Returns task_id. Use check_delegated_tasks for results.',- 'productivity_agent': 'Delegate to Productivity Agent. Returns task_id. Use check_delegated_tasks for results.',- 'payments_agent': 'Delegate to Payments Agent. Returns task_id. Use check_delegated_tasks for results.',- 'consumer_agent': 'Delegate to Consumer Agent. Returns task_id. Use check_delegated_tasks for results.',+ # Agent delegation tools - ONE-SHOT fire-and-forget pattern+ 'aiAgent': 'ONE-SHOT delegation to AI Agent. Call ONCE per task, returns task_id immediately. Agent works in background - do NOT re-call.',+ 'chatAgent': 'ONE-SHOT delegation to Chat Agent. Call ONCE per task, returns task_id immediately. Agent works in background - do NOT re-call.',+ 'android_agent': 'ONE-SHOT delegation to Android Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'coding_agent': 'ONE-SHOT delegation to Coding Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'web_agent': 'ONE-SHOT delegation to Web Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'task_agent': 'ONE-SHOT delegation to Task Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'social_agent': 'ONE-SHOT delegation to Social Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'travel_agent': 'ONE-SHOT delegation to Travel Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'tool_agent': 'ONE-SHOT delegation to Tool Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'productivity_agent': 'ONE-SHOT delegation to Productivity Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'payments_agent': 'ONE-SHOT delegation to Payments Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',+ 'consumer_agent': 'ONE-SHOT delegation to Consumer Agent. Call ONCE per task, returns task_id. Agent works in background - do NOT re-call.',# Android service nodes (direct tool usage)'batteryMonitor': 'Monitor Android battery status, level, charging state, temperature, and health.','networkMonitor': 'Monitor Android network connectivity, type, and internet availability.',@@ -2210,6 +2212,29 @@ class AIService:service_names = [s.get('label') or s.get('service_id', 'unknown') for s in connected_services]tool_description = f"{tool_description} Connected: {', '.join(service_names)}"+ # For AI Agent nodes, enhance description with child agent's tool capabilities+ # This allows parent agent to know what the child agent can do+ from constants import AI_AGENT_TYPES+ if node_type in AI_AGENT_TYPES:+ child_tools = tool_info.get('child_tools', [])+ if child_tools:+ # Build capability description from child's connected tools+ capability_descriptions = []+ for child_tool in child_tools:+ child_type = child_tool.get('node_type', '')+ child_label = child_tool.get('label', child_type)+ # Get the tool description from DEFAULT_TOOL_DESCRIPTIONS+ child_desc = DEFAULT_TOOL_DESCRIPTIONS.get(child_type, f"Use {child_label}")+ capability_descriptions.append(f"- {child_label}: {child_desc}")++ capabilities_text = "\n".join(capability_descriptions)+ tool_description = (+ f"Delegate tasks to '{node_label}' agent. "+ f"This agent has the following capabilities:\n{capabilities_text}\n"+ f"Call ONCE per task, returns task_id. Agent works in background."+ )+ logger.info(f"[LangGraph] Enhanced tool description for {node_type} with {len(child_tools)} child tools")+# Clean tool name (LangChain requires alphanumeric + underscores)import retool_name = re.sub(r'[^a-zA-Z0-9_]', '_', tool_name)diff --git a/server/services/deployment/manager.py b/server/services/deployment/manager.pyindex 5135b197..39aa18b2 100644--- a/server/services/deployment/manager.py+++ b/server/services/deployment/manager.py@@ -629,6 +629,20 @@ class DeploymentManager:downstream_ids.add(source)logger.debug(f"[Deployment] Including sub-node {source} connected to toolkit {target}")+ # Include tool nodes connected to AI Agent nodes (for capability discovery)+ # When a child agent is included, we need its connected tools so the parent+ # can discover what capabilities the child has+ from constants import AI_AGENT_TYPES+ agent_node_ids = {n['id'] for n in nodes if n.get('type') in AI_AGENT_TYPES and n['id'] in downstream_ids}+ for edge in edges:+ target = edge.get('target')+ source = edge.get('source')+ target_handle = edge.get('targetHandle', '')+ # Include tool nodes connected to agent's input-tools handle+ if target in agent_node_ids and target_handle == 'input-tools' and source not in downstream_ids:+ downstream_ids.add(source)+ logger.debug(f"[Deployment] Including tool node {source} connected to agent {target}")+return [n for n in nodes if n['id'] in downstream_ids]# =========================================================================diff --git a/server/services/execution/executor.py b/server/services/execution/executor.pyindex 529b5ce9..f0645ed1 100644--- a/server/services/execution/executor.py+++ b/server/services/execution/executor.py@@ -804,6 +804,7 @@ class WorkflowExecutor:# Build execution context for node handler# workflow_id is included for per-workflow status scoping (n8n pattern)+ logger.info(f"[Executor] Building context for {node.node_id}, ctx.outputs keys: {list(ctx.outputs.keys())}")exec_context = {"nodes": ctx.nodes,"edges": ctx.edges,@@ -813,6 +814,7 @@ class WorkflowExecutor:"start_time": node.started_at,"outputs": ctx.outputs, # Previous node outputs}+ logger.info(f"[Executor] exec_context['outputs'] keys: {list(exec_context['outputs'].keys())}")# Call the actual node executorresult = await self.node_executor(diff --git a/server/services/execution/models.py b/server/services/execution/models.pyindex 1c6c1ab2..0ce3fda8 100644--- a/server/services/execution/models.py+++ b/server/services/execution/models.py@@ -13,6 +13,10 @@ from datetime import datetimefrom enum import Enumfrom typing import Dict, Any, List, Optional+from core.logging import get_logger++logger = get_logger(__name__)+class TaskStatus(str, Enum):"""Task execution states (Conductor-style lifecycle).@@ -361,6 +365,8 @@ class ExecutionContext:if node.get("_pre_executed"):# Mark as COMPLETED with trigger outputtrigger_output = node.get("_trigger_output", {})+ logger.info(f"[ExecutionContext] Pre-executed node found: {node_id} (type={node_type})")+ logger.info(f"[ExecutionContext] Trigger output keys: {list(trigger_output.keys()) if trigger_output else 'empty'}")node_exec = NodeExecution(node_id=node_id,node_type=node_type,@@ -369,6 +375,7 @@ class ExecutionContext:completed_at=time.time(),)ctx.outputs[node_id] = trigger_output+ logger.info(f"[ExecutionContext] Set ctx.outputs[{node_id}] = trigger_output")ctx.checkpoints.append(node_id)else:node_exec = NodeExecution(@@ -378,6 +385,7 @@ class ExecutionContext:ctx.node_executions[node_id] = node_exec+ logger.info(f"[ExecutionContext] Created context with outputs: {list(ctx.outputs.keys())}")return ctxdef get_node_status(self, node_id: str) -> Optional[TaskStatus]:diff --git a/server/services/handlers/ai.py b/server/services/handlers/ai.pyindex 24bdcda7..33d08d25 100644--- a/server/services/handlers/ai.py+++ b/server/services/handlers/ai.py@@ -203,6 +203,45 @@ async def _collect_agent_connections(tool_entry['connected_services'] = connected_serviceslogger.debug(f"{log_prefix} Android toolkit has {len(connected_services)} connected services")+ # Special handling for AI Agent nodes - discover their connected tools+ # This allows parent agent to know child agent's capabilities+ if tool_type in AI_AGENT_TYPES:+ child_tools = []++ # Count edges targeting this child agent+ child_incoming_edges = [e for e in edges if e.get('target') == source_node_id]+ child_tool_edges = [e for e in child_incoming_edges if e.get('targetHandle') == 'input-tools']+ logger.debug(f"{log_prefix} Child agent {source_node_id}: {len(child_incoming_edges)} incoming edges, {len(child_tool_edges)} input-tools edges")++ # Log all incoming edge handles for debugging+ if child_incoming_edges:+ handles = [e.get('targetHandle', 'None') for e in child_incoming_edges]+ logger.debug(f"{log_prefix} Child agent {source_node_id} incoming handles: {handles}")++ # Scan edges for tools connected to this child agent's input-tools handle+ for child_edge in edges:+ if child_edge.get('target') != source_node_id:+ continue+ if child_edge.get('targetHandle') != 'input-tools':+ continue++ child_tool_id = child_edge.get('source')+ child_tool_node = next((n for n in nodes if n.get('id') == child_tool_id), None)++ logger.debug(f"{log_prefix} Child agent {source_node_id}: tool edge from {child_tool_id}, node found: {child_tool_node is not None}")++ if child_tool_node:+ child_tool_type = child_tool_node.get('type', '')+ child_tool_label = child_tool_node.get('data', {}).get('label', child_tool_type)+ child_tools.append({+ 'node_type': child_tool_type,+ 'label': child_tool_label+ })++ if child_tools:+ tool_entry['child_tools'] = child_tools+ logger.debug(f"{log_prefix} Child agent {source_node_id} has tools: {[t['label'] for t in child_tools]}")+tool_data.append(tool_entry)logger.debug(f"{log_prefix} Connected tool: {tool_type}")@@ -218,9 +257,24 @@ async def _collect_agent_connections(# Used to receive results from delegated child agentselif target_handle == 'input-task':logger.info(f"{log_prefix} Found input-task edge from {source_node_id} (type={source_node.get('type')})")- all_outputs = context.get('outputs', {})- logger.info(f"{log_prefix} Available outputs in context: {list(all_outputs.keys())}")- source_output = all_outputs.get(source_node_id)++ # Try context.outputs first (parallel executor), then database via get_output_fn+ source_output = context.get('outputs', {}).get(source_node_id)+ logger.info(f"{log_prefix} Context outputs check for {source_node_id}: {source_output is not None}")++ if not source_output:+ # Database is source of truth - use get_output_fn to retrieve stored output+ get_output_fn = context.get('get_output_fn')+ session_id = context.get('session_id', 'default')+ if get_output_fn:+ try:+ source_output = await get_output_fn(session_id, source_node_id, 'output_0')+ logger.info(f"{log_prefix} DB lookup for {source_node_id}: {source_output is not None}")+ except Exception as e:+ logger.warning(f"{log_prefix} Failed to get output from DB: {e}")+ else:+ logger.warning(f"{log_prefix} No get_output_fn in context, cannot retrieve task output")+logger.info(f"{log_prefix} Source output for {source_node_id}: {source_output is not None}, type={type(source_output).__name__ if source_output else 'None'}")if source_output:# Handle nested result structure - taskTrigger may return {"result": {...}} or flat dict@@ -320,19 +374,16 @@ async def handle_ai_agent(parameters = {**parameters, 'prompt': f"{task_context}\n\n{original_prompt}"}logger.info(f"[AI Agent] Task context injected for task_id={task_data.get('task_id')}")- # CRITICAL FIX: Strip delegation tools when handling task completion- # This prevents LLM confusion - tools bound but told not to use them+ # CRITICAL FIX: Strip ALL tools when handling task completion+ # When reporting a delegated task result, the agent should NOT use any tools.+ # Binding tools while instructing "do not use tools" confuses Gemini (returns empty []).+ # The agent's only job is to report the result naturally.task_status = task_data.get('status', '')if task_status in ('completed', 'error') and tool_data:original_tool_count = len(tool_data)- # Filter out AI agent tools (delegation tools)- tool_data = [- t for t in tool_data- if t.get('node_type') not in AI_AGENT_TYPES- ]- filtered_count = original_tool_count - len(tool_data)- if filtered_count > 0:- logger.info(f"[AI Agent] Stripped {filtered_count} delegation tools for task completion handling")+ # Strip ALL tools - agent is just reporting result, not executing anything+ tool_data = []+ logger.info(f"[AI Agent] Stripped ALL {original_tool_count} tools for task completion handling")# Auto-use input data if prompt is empty (fallback for trigger nodes)if not parameters.get('prompt') and input_data:@@ -402,19 +453,16 @@ async def handle_chat_agent(parameters = {**parameters, 'prompt': f"{task_context}\n\n{original_prompt}"}logger.info(f"[Chat Agent] Task context injected for task_id={task_data.get('task_id')}")- # CRITICAL FIX: Strip delegation tools when handling task completion- # This prevents LLM confusion - tools bound but told not to use them+ # CRITICAL FIX: Strip ALL tools when handling task completion+ # When reporting a delegated task result, the agent should NOT use any tools.+ # Binding tools while instructing "do not use tools" confuses Gemini (returns empty []).+ # The agent's only job is to report the result naturally.task_status = task_data.get('status', '')if task_status in ('completed', 'error') and tool_data:original_tool_count = len(tool_data)- # Filter out AI agent tools (delegation tools)- tool_data = [- t for t in tool_data- if t.get('node_type') not in AI_AGENT_TYPES- ]- filtered_count = original_tool_count - len(tool_data)- if filtered_count > 0:- logger.info(f"[Chat Agent] Stripped {filtered_count} delegation tools for task completion handling")+ # Strip ALL tools - agent is just reporting result, not executing anything+ tool_data = []+ logger.info(f"[Chat Agent] Stripped ALL {original_tool_count} tools for task completion handling")# Auto-use input data if prompt is empty (fallback for trigger nodes)if not parameters.get('prompt') and input_data:diff --git a/server/services/handlers/tools.py b/server/services/handlers/tools.pyindex be8aefdd..47eec2a6 100644--- a/server/services/handlers/tools.py+++ b/server/services/handlers/tools.py@@ -9,7 +9,8 @@ import mathimport jsonimport asyncioimport uuid-from typing import Dict, Any, Optional, List, TYPE_CHECKING+import hashlib+from typing import Dict, Any, Optional, List, Tuple, TYPE_CHECKINGfrom core.logging import get_loggerfrom constants import ANDROID_SERVICE_NODE_TYPES@@ -27,6 +28,9 @@ _delegated_tasks: Dict[str, asyncio.Task] = {}# Follows Celery AsyncResult / Ray ObjectRef pattern_delegation_results: Dict[str, Dict[str, Any]] = {}+# Track active delegations to prevent duplicate calls: (parent_node_id, child_node_id, task_hash) -> task_id+_active_delegations: Dict[Tuple[str, str, str], str] = {}+async def execute_tool(tool_name: str, tool_args: Dict[str, Any],config: Dict[str, Any]) -> Dict[str, Any]:@@ -1171,9 +1175,34 @@ async def _execute_delegated_agent(args: Dict[str, Any],"hint": "Ensure nodes/edges are passed to tool config"}+ # Get parent node ID for duplicate tracking+ parent_node_id = config.get('parent_node_id', '')++ # Generate hash of task to detect duplicate delegation attempts+ task_hash = hashlib.md5(f"{task_description}:{task_context}".encode()).hexdigest()[:16]+ delegation_key = (parent_node_id, node_id, task_hash)++ # Check for duplicate delegation (prevents LLM from calling same delegation twice)+ existing_task_id = _active_delegations.get(delegation_key)+ if existing_task_id:+ logger.warning(f"[Delegated Agent] Duplicate delegation detected: task_hash={task_hash}, existing_task_id={existing_task_id}")+ return {+ "success": True,+ "status": "ALREADY_DELEGATED",+ "task_id": existing_task_id,+ "agent_name": config.get('parameters', {}).get('label', node_type),+ "result": (+ f"This task was ALREADY delegated (task_id: {existing_task_id}). "+ f"Do NOT call this tool again. Use 'check_delegated_tasks' to check status."+ ),+ }+# Generate unique task IDtask_id = f"delegated_{node_id}_{uuid.uuid4().hex[:8]}"+ # Register this delegation to prevent duplicates+ _active_delegations[delegation_key] = task_id+# Get child agent parameters from databasechild_params = await database.get_node_parameters(node_id) or {}@@ -1246,8 +1275,69 @@ async def _execute_delegated_agent(args: Dict[str, Any],logger.info(f"[Delegated Agent] Task {task_id} completed: success={result.get('success')}")+ # Check if child agent actually succeeded+ if not result.get('success'):+ # Child agent returned failure - treat as error+ error_msg = result.get('error', 'Child agent returned failure')+ logger.warning(f"[Delegated Agent] Task {task_id} returned success=False: {error_msg}")++ await broadcaster.update_node_status(+ node_id,+ "error",+ {+ "phase": "delegated_error",+ "task_id": task_id,+ "error": error_msg+ },+ workflow_id=workflow_id+ )++ # Cache error for parent retrieval+ _delegation_results[task_id] = {+ "task_id": task_id,+ "status": "error",+ "agent_name": agent_label,+ "agent_node_id": node_id,+ "result": None,+ "error": error_msg,+ }++ # Persist error to DB+ if database:+ await database.save_node_output(+ node_id=node_id,+ session_id=f"delegation_{task_id}",+ output_name="delegation_result",+ data={+ "task_id": task_id,+ "parent_node_id": config.get('parent_node_id', ''),+ "agent_name": agent_label,+ "status": "error",+ "error": error_msg,+ }+ )++ # Dispatch error event for trigger nodes+ await broadcaster.send_custom_event('task_completed', {+ 'task_id': task_id,+ 'status': 'error',+ 'agent_name': agent_label,+ 'agent_node_id': node_id,+ 'parent_node_id': config.get('parent_node_id', ''),+ 'error': error_msg,+ 'workflow_id': workflow_id,+ })++ return result++ # Success case - extract response properly+ response_text = result.get('result', {}).get('response', '')+ if not response_text:+ # Fallback: try to stringify the result dict+ response_text = str(result.get('result', '')) if result.get('result') else 'No response generated'+# Broadcast completion- response_preview = str(result.get('result', {}).get('response', ''))[:200]+ response_preview = response_text[:200] if response_text else ''await broadcaster.update_node_status(node_id,"success",@@ -1265,7 +1355,7 @@ async def _execute_delegated_agent(args: Dict[str, Any],"status": "completed","agent_name": agent_label,"agent_node_id": node_id,- "result": result.get('result', {}).get('response', str(result.get('result', ''))),+ "result": response_text,"error": None,}@@ -1280,7 +1370,7 @@ async def _execute_delegated_agent(args: Dict[str, Any],"parent_node_id": config.get('parent_node_id', ''),"agent_name": agent_label,"status": "completed",- "result": result.get('result', {}),+ "result": response_text,})@@ -1291,7 +1381,7 @@ async def _execute_delegated_agent(args: Dict[str, Any],'agent_name': agent_label,'agent_node_id': node_id,'parent_node_id': config.get('parent_node_id', ''),- 'result': result.get('result', {}).get('response', str(result.get('result', ''))),+ 'result': response_text,'workflow_id': workflow_id,})@@ -1351,6 +1441,8 @@ async def _execute_delegated_agent(args: Dict[str, Any],finally:# Cleanup task reference_delegated_tasks.pop(task_id, None)+ # Cleanup delegation tracking (allows re-delegation after completion)+ _active_delegations.pop(delegation_key, None)# Spawn as background task (fire-and-forget)task = asyncio.create_task(run_child_agent())@@ -1363,7 +1455,12 @@ async def _execute_delegated_agent(args: Dict[str, Any],"task_id": task_id,"agent_node_id": node_id,"agent_name": agent_label,- "message": f"Task delegated to '{agent_label}'. Agent is now working independently on: {task_description[:100]}..."+ "message": (+ f"SUCCESS: Task delegated to '{agent_label}' (task_id: {task_id}). "+ f"Agent is now working INDEPENDENTLY in the background. "+ f"IMPORTANT: Delegation is COMPLETE. Do NOT call this tool again for this task. "+ f"To check results later, use 'check_delegated_tasks' with task_id='{task_id}'."+ ),}diff --git a/server/skills/android/skill/SKILL.md b/server/skills/android/skill/SKILL.mddeleted file mode 100644index 50f03fa0..00000000--- a/server/skills/android/skill/SKILL.md+++ /dev/null@@ -1,84 +0,0 @@-----name: android-skill-description: Control Android devices - battery, wifi, bluetooth, apps, location, camera, and sensors. Use when user wants to interact with their Android phone or tablet.-metadata:- author: machina- version: "2.0"- category: device- icon: "📱"- color: "#3DDC84"------# Android Device Control--This skill provides context for monitoring and controlling Android devices.--## How It Works--This skill provides instructions and context. To execute Android actions, connect the **Android Toolkit** node to the Zeenie's `input-tools` handle, then connect Android service nodes to the toolkit:--```-[Battery Monitor] --+- |-[WiFi Automation] --+--> [Android Toolkit] --> [Zeenie]- |-[Location] ---+-```--## Available Android Service Nodes--Connect these to the Android Toolkit:--| Node | Capabilities |-|------|-------------|-| **Battery Monitor** | Battery level, charging status, health, temperature |-| **WiFi Automation** | Enable/disable WiFi, scan networks, get status |-| **Bluetooth Automation** | Enable/disable Bluetooth, paired devices |-| **App Launcher** | Launch applications by package name |-| **App List** | List installed applications |-| **Location** | Get current GPS coordinates |-| **Audio Automation** | Volume control, mute/unmute |-| **Screen Control** | Brightness, wake/sleep screen |-| **Camera Control** | Camera info, capture photos |-| **Motion Detection** | Accelerometer, gyroscope data |-| **Environmental Sensors** | Temperature, humidity, pressure |--## Example Interactions--**User**: "What's my phone's battery level?"-- Use the Battery Monitor service with action "status"--**User**: "Turn off WiFi"-- Use the WiFi Automation service with action "disable"--**User**: "What apps are installed?"-- Use the App List service with action "list"--**User**: "Open Chrome"-- Use the App Launcher service with action "launch", package_name "com.android.chrome"--**User**: "Where is my phone?"-- Use the Location service with action "current"--**User**: "Set volume to 50%"-- Use the Audio Automation service with action "set_volume", volume 50--## Device Connection--Before using Android tools, ensure:-1. Device is connected via ADB (USB) or remote WebSocket-2. Android Device Setup node shows connected status (green indicator)-3. Required permissions are granted on the device--## Error Handling--- If device is not connected, inform user to check connection-- If permission is denied, suggest enabling it in device settings-- If action fails, provide the error message and suggest alternatives--## Setup Requirements--1. Connect this skill to Zeenie's `input-skill` handle-2. Add **Android Toolkit** node and connect to Zeenie's `input-tools` handle-3. Connect desired Android service nodes to the Android Toolkit-4. Ensure Android device is paired (green status indicator)diff --git a/server/skills/android_agent/app-launcher-skill/SKILL.md b/server/skills/android_agent/app-launcher-skill/SKILL.mdnew file mode 100644index 00000000..7c02d421--- /dev/null+++ b/server/skills/android_agent/app-launcher-skill/SKILL.md@@ -0,0 +1,137 @@+---+name: app-launcher-skill+description: Launch Android applications by package name. Open any installed app programmatically.+allowed-tools: app_launcher+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "🚀"+ color: "#8B5CF6"+---++# App Launcher Tool++Launch applications on Android device.++## How It Works++This skill provides instructions for the **App Launcher** tool node. Connect the **App Launcher** node to Zeenie's `input-tools` handle to enable app launching.++## app_launcher Tool++Launch an installed application by package name.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"launch"` |+| parameters | object | Yes | Contains `package_name` |++### Parameters++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| package_name | string | Yes | Android package name of the app |++### Example++**Launch an app:**+```json+{+ "action": "launch",+ "parameters": {+ "package_name": "com.whatsapp"+ }+}+```++### Common Package Names++| App | Package Name |+|-----|--------------|+| WhatsApp | `com.whatsapp` |+| Chrome | `com.android.chrome` |+| Gmail | `com.google.android.gm` |+| YouTube | `com.google.android.youtube` |+| Maps | `com.google.android.apps.maps` |+| Camera | `com.android.camera2` |+| Phone | `com.android.dialer` |+| Messages | `com.google.android.apps.messaging` |+| Settings | `com.android.settings` |+| Play Store | `com.android.vending` |+| Spotify | `com.spotify.music` |+| Netflix | `com.netflix.mediaclient` |+| Twitter/X | `com.twitter.android` |+| Instagram | `com.instagram.android` |+| Telegram | `org.telegram.messenger` |++### Response Format++**Success:**+```json+{+ "success": true,+ "service": "app_launcher",+ "action": "launch",+ "data": {+ "message": "App launched successfully",+ "package_name": "com.whatsapp"+ }+}+```++**Error:**+```json+{+ "error": "App not installed: com.example.notinstalled",+ "service": "app_launcher",+ "action": "launch"+}+```++## Use Cases++| Use Case | Description |+|----------|-------------|+| Quick launch | Open apps on command |+| Automation | Start apps as part of workflow |+| Shortcuts | Voice-controlled app opening |+| Workflows | Chain app launches with other actions |++## Common Workflows++### Open app and send message++1. Launch WhatsApp+2. User manually selects contact+3. (Alternative: use whatsapp_send for automated messaging)++### Daily routine++1. Launch news app in morning+2. Launch email app+3. Launch calendar++## Finding Package Names++To find an app's package name:++1. Use the **App List** tool to list installed apps+2. Look for the app name in the list+3. Use the returned package_name++### Example workflow:++```+1. app_list.status -> get list of apps+2. Find desired app in results+3. app_launcher.launch with package_name+```++## Setup Requirements++1. Connect the **App Launcher** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. App must be installed on the devicediff --git a/server/skills/android_agent/app-list-skill/SKILL.md b/server/skills/android_agent/app-list-skill/SKILL.mdnew file mode 100644index 00000000..c7ae8f3c--- /dev/null+++ b/server/skills/android_agent/app-list-skill/SKILL.md@@ -0,0 +1,148 @@+---+name: app-list-skill+description: Get list of installed Android applications with package names, versions, and metadata.+allowed-tools: app_list+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📱"+ color: "#06B6D4"+---++# App List Tool++Get list of installed applications on Android device.++## How It Works++This skill provides instructions for the **App List** tool node. Connect the **App List** node to Zeenie's `input-tools` handle to enable app listing.++## app_list Tool++Get list of installed applications.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"status"` - Get installed apps |++### Example++**Get installed apps:**+```json+{+ "action": "status"+}+```++### Response Format++```json+{+ "success": true,+ "service": "app_list",+ "action": "status",+ "data": {+ "apps": [+ {+ "name": "WhatsApp",+ "package_name": "com.whatsapp",+ "version": "2.24.1.5",+ "version_code": 2241005,+ "system_app": false,+ "enabled": true+ },+ {+ "name": "Chrome",+ "package_name": "com.android.chrome",+ "version": "121.0.6167.101",+ "version_code": 616710100,+ "system_app": false,+ "enabled": true+ },+ {+ "name": "Settings",+ "package_name": "com.android.settings",+ "version": "14",+ "version_code": 34,+ "system_app": true,+ "enabled": true+ }+ ],+ "total_apps": 85,+ "user_apps": 42,+ "system_apps": 43+ }+}+```++### Response Fields++| Field | Type | Description |+|-------|------|-------------|+| name | string | Display name of the app |+| package_name | string | Android package identifier |+| version | string | Version string |+| version_code | int | Version code number |+| system_app | boolean | True if pre-installed system app |+| enabled | boolean | True if app is enabled |++### Summary Fields++| Field | Description |+|-------|-------------|+| total_apps | Total number of apps |+| user_apps | User-installed apps count |+| system_apps | Pre-installed system apps count |++## Use Cases++| Use Case | Description |+|----------|-------------|+| Find apps | Discover what's installed |+| Get package names | Find package name for app_launcher |+| Version check | Verify app versions |+| Inventory | Audit installed applications |++## Common Workflows++### Find and launch app++1. Get app list with `app_list.status`+2. Search for desired app by name+3. Use package_name with `app_launcher.launch`++### Check if app is installed++1. Get app list+2. Search for specific package_name+3. Report if found or not++### App version audit++1. Get app list+2. Check versions against known values+3. Report outdated apps++## Filtering Results++The tool returns all apps. To find specific apps:++1. Get full list+2. Filter by name or package_name+3. Check system_app to separate user/system apps++### Example: Find messaging apps++```+1. Get app list+2. Filter where name contains "message" or "chat"+3. Return matching apps+```++## Setup Requirements++1. Connect the **App List** node to Zeenie's `input-tools` handle+2. Android device must be paireddiff --git a/server/skills/android_agent/audio-skill/SKILL.md b/server/skills/android_agent/audio-skill/SKILL.mdnew file mode 100644index 00000000..bc7aa1e7--- /dev/null+++ b/server/skills/android_agent/audio-skill/SKILL.md@@ -0,0 +1,169 @@+---+name: audio-skill+description: Control Android audio - get/set volume, mute/unmute for media, ringtone, notification, and call volumes.+allowed-tools: audio_automation+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "🔊"+ color: "#F97316"+---++# Audio Automation Tool++Control audio and volume on Android device.++## How It Works++This skill provides instructions for the **Audio Automation** tool node. Connect the **Audio Automation** node to Zeenie's `input-tools` handle to enable audio control.++## audio_automation Tool++Control audio settings and volume levels.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | Action to perform (see below) |+| parameters | object | No | Additional parameters for set actions |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get current volume levels and audio state |+| `set_volume` | Set volume for a stream |+| `mute` | Mute audio |+| `unmute` | Unmute audio |++### Volume Streams++| Stream | Description |+|--------|-------------|+| `media` | Music, videos, games |+| `ring` | Ringtone volume |+| `notification` | Notification sounds |+| `alarm` | Alarm volume |+| `voice_call` | Call volume |+| `system` | System sounds (clicks, etc.) |++### Examples++**Get audio status:**+```json+{+ "action": "status"+}+```++**Set media volume:**+```json+{+ "action": "set_volume",+ "parameters": {+ "stream": "media",+ "level": 50+ }+}+```++**Mute all audio:**+```json+{+ "action": "mute"+}+```++**Unmute:**+```json+{+ "action": "unmute"+}+```++### Response Formats++**Status response:**+```json+{+ "success": true,+ "service": "audio_automation",+ "action": "status",+ "data": {+ "media_volume": 75,+ "ring_volume": 100,+ "notification_volume": 80,+ "alarm_volume": 100,+ "voice_call_volume": 50,+ "system_volume": 50,+ "muted": false,+ "ringer_mode": "normal"+ }+}+```++**Set volume response:**+```json+{+ "success": true,+ "service": "audio_automation",+ "action": "set_volume",+ "data": {+ "stream": "media",+ "previous_level": 100,+ "new_level": 50+ }+}+```++### Ringer Modes++| Mode | Description |+|------|-------------|+| `normal` | All sounds enabled |+| `vibrate` | Vibrate only |+| `silent` | No sounds or vibration |++## Use Cases++| Use Case | Action | Description |+|----------|--------|-------------|+| Check volume | status | Get current levels |+| Lower volume | set_volume | Reduce for quiet time |+| Silent mode | mute | Mute all audio |+| Restore sound | unmute | Re-enable audio |+| Night mode | set_volume | Lower ring/notification |++## Common Workflows++### Meeting mode++1. Mute device+2. Attend meeting+3. Unmute when done++### Night routine++1. Set ring volume to 20+2. Set notification volume to 0+3. Keep alarm at 100++### Media playback++1. Check current media volume+2. Set to desired level+3. Play media++## Volume Level Range++- All volumes are 0-100 (percentage)+- 0 = muted/off+- 100 = maximum++## Setup Requirements++1. Connect the **Audio Automation** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Volume control permission requireddiff --git a/server/skills/android_agent/battery-skill/SKILL.md b/server/skills/android_agent/battery-skill/SKILL.mdnew file mode 100644index 00000000..534b3bef--- /dev/null+++ b/server/skills/android_agent/battery-skill/SKILL.md@@ -0,0 +1,114 @@+---+name: battery-skill+description: Monitor Android device battery status, level, charging state, temperature, and health.+allowed-tools: battery_monitor+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "🔋"+ color: "#22C55E"+---++# Battery Monitor Tool++Monitor Android device battery status and information.++## How It Works++This skill provides instructions for the **Battery Monitor** tool node. Connect the **Battery Monitor** node to Zeenie's `input-tools` handle to enable battery monitoring.++## battery Tool++Get battery status and information from the Android device.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"status"` - Get current battery information |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get current battery level, charging state, health, temperature |++### Example++**Get battery status:**+```json+{+ "action": "status"+}+```++### Response Format++```json+{+ "success": true,+ "service": "battery",+ "action": "status",+ "data": {+ "level": 85,+ "status": "charging",+ "health": "good",+ "temperature": 28.5,+ "voltage": 4200,+ "plugged": "ac",+ "technology": "Li-ion"+ }+}+```++### Response Fields++| Field | Type | Description |+|-------|------|-------------|+| level | int | Battery percentage (0-100) |+| status | string | `"charging"`, `"discharging"`, `"full"`, `"not_charging"` |+| health | string | `"good"`, `"overheat"`, `"dead"`, `"cold"` |+| temperature | float | Temperature in Celsius |+| voltage | int | Voltage in millivolts |+| plugged | string | `"ac"`, `"usb"`, `"wireless"`, `"none"` |+| technology | string | Battery technology (e.g., "Li-ion") |++### Error Response++```json+{+ "error": "Failed to get battery status",+ "service": "battery",+ "action": "status"+}+```++## Use Cases++| Use Case | Description |+|----------|-------------|+| Low battery alert | Trigger actions when battery is low |+| Charging monitor | Detect when device starts/stops charging |+| Health check | Monitor battery health over time |+| Temperature warning | Alert on overheating |++## Common Workflows++### Low battery notification++1. Check battery status+2. If level < 20%, send notification+3. Optionally enable power saving++### Charging complete alert++1. Periodically check battery status+2. When status = "full", send notification+3. Optionally suggest unplugging++## Setup Requirements++1. Connect the **Battery Monitor** node to Zeenie's `input-tools` handle+2. Android device must be paired (green status indicator)+3. Battery monitoring permission required on devicediff --git a/server/skills/android_agent/bluetooth-skill/SKILL.md b/server/skills/android_agent/bluetooth-skill/SKILL.mdnew file mode 100644index 00000000..118e4d94--- /dev/null+++ b/server/skills/android_agent/bluetooth-skill/SKILL.md@@ -0,0 +1,151 @@+---+name: bluetooth-skill+description: Control Android Bluetooth - enable, disable, get status, and list paired devices.+allowed-tools: bluetooth_automation+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📱"+ color: "#0EA5E9"+---++# Bluetooth Automation Tool++Control Bluetooth on Android devices.++## How It Works++This skill provides instructions for the **Bluetooth Automation** tool node. Connect the **Bluetooth Automation** node to Zeenie's `input-tools` handle to enable Bluetooth control.++## bluetooth_automation Tool++Control Bluetooth settings and get device information.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | Action to perform (see below) |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get Bluetooth status and paired devices |+| `enable` | Turn Bluetooth on |+| `disable` | Turn Bluetooth off |++### Examples++**Get Bluetooth status:**+```json+{+ "action": "status"+}+```++**Enable Bluetooth:**+```json+{+ "action": "enable"+}+```++**Disable Bluetooth:**+```json+{+ "action": "disable"+}+```++### Response Formats++**Status response:**+```json+{+ "success": true,+ "service": "bluetooth_automation",+ "action": "status",+ "data": {+ "enabled": true,+ "discovering": false,+ "name": "My Phone",+ "address": "AA:BB:CC:DD:EE:FF",+ "paired_devices": [+ {+ "name": "AirPods Pro",+ "address": "11:22:33:44:55:66",+ "type": "audio",+ "bonded": true+ },+ {+ "name": "Car Stereo",+ "address": "77:88:99:AA:BB:CC",+ "type": "audio",+ "bonded": true+ }+ ]+ }+}+```++**Enable/Disable response:**+```json+{+ "success": true,+ "service": "bluetooth_automation",+ "action": "enable",+ "data": {+ "message": "Bluetooth enabled successfully"+ }+}+```++### Response Fields++| Field | Description |+|-------|-------------|+| enabled | Bluetooth radio is on |+| discovering | Scanning for new devices |+| name | Device Bluetooth name |+| address | Device Bluetooth MAC address |+| paired_devices | List of bonded devices |++### Paired Device Fields++| Field | Description |+|-------|-------------|+| name | Device name |+| address | Device MAC address |+| type | Device type (audio, computer, phone, etc.) |+| bonded | Currently paired |++## Use Cases++| Use Case | Action | Description |+|----------|--------|-------------|+| Check Bluetooth | status | See if BT is on and paired devices |+| Toggle Bluetooth | enable/disable | Control BT radio |+| List devices | status | Get paired device list |+| Battery saving | disable | Turn off when not needed |++## Common Workflows++### Connect to car++1. Check Bluetooth status+2. If not enabled, enable it+3. Car should auto-connect if paired++### Battery saving mode++1. Check Bluetooth status+2. If no audio playing and no connected devices+3. Disable Bluetooth to save battery++## Setup Requirements++1. Connect the **Bluetooth Automation** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Bluetooth permission required on devicediff --git a/server/skills/android_agent/camera-skill/SKILL.md b/server/skills/android_agent/camera-skill/SKILL.mdnew file mode 100644index 00000000..16d3fc00--- /dev/null+++ b/server/skills/android_agent/camera-skill/SKILL.md@@ -0,0 +1,148 @@+---+name: camera-skill+description: Control Android camera - get camera info, take photos, and access camera capabilities.+allowed-tools: camera_control+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📷"+ color: "#EC4899"+---++# Camera Control Tool++Control camera on Android device.++## How It Works++This skill provides instructions for the **Camera Control** tool node. Connect the **Camera Control** node to Zeenie's `input-tools` handle to enable camera control.++## camera_control Tool++Access camera and capture photos.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | Action to perform (see below) |+| parameters | object | No | Additional parameters |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get camera info and capabilities |+| `capture` | Take a photo |++### Examples++**Get camera info:**+```json+{+ "action": "status"+}+```++**Take a photo:**+```json+{+ "action": "capture"+}+```++**Capture with front camera:**+```json+{+ "action": "capture",+ "parameters": {+ "camera": "front"+ }+}+```++### Response Formats++**Status response:**+```json+{+ "success": true,+ "service": "camera_control",+ "action": "status",+ "data": {+ "cameras": [+ {+ "id": "0",+ "facing": "back",+ "megapixels": 48,+ "has_flash": true,+ "supports_video": true+ },+ {+ "id": "1",+ "facing": "front",+ "megapixels": 12,+ "has_flash": false,+ "supports_video": true+ }+ ],+ "flash_available": true+ }+}+```++**Capture response:**+```json+{+ "success": true,+ "service": "camera_control",+ "action": "capture",+ "data": {+ "photo_path": "/storage/emulated/0/DCIM/Camera/IMG_20250130_120000.jpg",+ "camera_used": "back",+ "resolution": "4000x3000",+ "timestamp": "2025-01-30T12:00:00Z"+ }+}+```++### Response Fields++| Field | Description |+|-------|-------------|+| cameras | List of available cameras |+| facing | `"back"` or `"front"` |+| megapixels | Camera resolution |+| has_flash | Flash available |+| photo_path | Path to captured photo |++## Use Cases++| Use Case | Action | Description |+|----------|--------|-------------|+| Check cameras | status | Get camera capabilities |+| Take photo | capture | Capture image |+| Selfie | capture (front) | Use front camera |+| Document | capture | Capture document/scene |++## Common Workflows++### Quick photo capture++1. Optionally check camera status+2. Capture photo+3. Photo saved to device gallery++### Automated documentation++1. Trigger (time/event based)+2. Capture photo+3. Process/send photo++## Setup Requirements++1. Connect the **Camera Control** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Camera permission must be granted+4. Storage permission for saving photosdiff --git a/server/skills/android_agent/environmental-skill/SKILL.md b/server/skills/android_agent/environmental-skill/SKILL.mdnew file mode 100644index 00000000..8bbff843--- /dev/null+++ b/server/skills/android_agent/environmental-skill/SKILL.md@@ -0,0 +1,140 @@+---+name: environmental-skill+description: Get Android environmental sensor data - temperature, humidity, pressure, and ambient light level.+allowed-tools: environmental_sensors+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "🌡️"+ color: "#84CC16"+---++# Environmental Sensors Tool++Access environmental sensors on Android device.++## How It Works++This skill provides instructions for the **Environmental Sensors** tool node. Connect the **Environmental Sensors** node to Zeenie's `input-tools` handle to enable environmental sensing.++## environmental_sensors Tool++Get temperature, humidity, pressure, and light data.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"status"` - Get sensor data |++### Example++**Get environmental data:**+```json+{+ "action": "status"+}+```++### Response Format++```json+{+ "success": true,+ "service": "environmental_sensors",+ "action": "status",+ "data": {+ "temperature": 23.5,+ "humidity": 45.0,+ "pressure": 1013.25,+ "light": 350.0,+ "sensors_available": {+ "temperature": true,+ "humidity": true,+ "pressure": true,+ "light": true+ }+ }+}+```++### Response Fields++| Field | Type | Unit | Description |+|-------|------|------|-------------|+| temperature | float | Celsius | Ambient temperature |+| humidity | float | % | Relative humidity |+| pressure | float | hPa | Atmospheric pressure |+| light | float | lux | Ambient light level |+| sensors_available | object | - | Which sensors exist |++### Sensor Availability++Not all devices have all sensors. Check `sensors_available` to see what's supported.++### Light Level Guide++| Lux | Condition |+|-----|-----------|+| < 50 | Dark/dim room |+| 50-300 | Indoor lighting |+| 300-1000 | Bright indoor |+| 1000-10000 | Overcast outdoor |+| 10000-100000 | Direct sunlight |++### Temperature Notes++- Device temperature sensor may be affected by device heat+- For accurate ambient temperature, device should be idle+- Some devices don't have temperature sensor++### Pressure Guide++| hPa | Weather |+|-----|---------|+| < 1000 | Low pressure (storms) |+| 1000-1020 | Normal |+| > 1020 | High pressure (clear) |++## Use Cases++| Use Case | Sensor | Description |+|----------|--------|-------------|+| Weather tracking | pressure | Monitor local pressure |+| Humidity alert | humidity | Warn on high/low humidity |+| Light-based actions | light | Trigger on dark/bright |+| Temperature monitoring | temperature | Track ambient temp |++## Common Workflows++### Auto-brightness trigger++1. Read light level+2. If light < 100, suggest dark mode+3. If light > 1000, suggest bright mode++### Environment monitoring++1. Periodically read all sensors+2. Log data points+3. Alert on thresholds++### Weather correlation++1. Track pressure over time+2. Correlate with weather changes+3. Predict weather patterns++## Limitations++- Sensor availability varies by device model+- Temperature sensor may read higher due to device heat+- Indoor pressure differs from outdoor+- Light sensor is typically near front camera++## Setup Requirements++1. Connect the **Environmental Sensors** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Sensors depend on device hardwarediff --git a/server/skills/android_agent/location-skill/SKILL.md b/server/skills/android_agent/location-skill/SKILL.mdnew file mode 100644index 00000000..7f1ccbd2--- /dev/null+++ b/server/skills/android_agent/location-skill/SKILL.md@@ -0,0 +1,163 @@+---+name: location-skill+description: Get Android device GPS location - latitude, longitude, accuracy, speed, and provider information.+allowed-tools: location+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📍"+ color: "#EF4444"+---++# Location Tool++Get GPS location from Android device.++## How It Works++This skill provides instructions for the **Location** tool node. Connect the **Location** node to Zeenie's `input-tools` handle to enable location tracking.++## location Tool++Get current GPS location from the Android device.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"status"` - Get current location |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get current GPS coordinates and location info |++### Example++**Get current location:**+```json+{+ "action": "status"+}+```++### Response Format++```json+{+ "success": true,+ "service": "location",+ "action": "status",+ "data": {+ "latitude": 37.7749,+ "longitude": -122.4194,+ "altitude": 10.5,+ "accuracy": 15.0,+ "speed": 0.0,+ "bearing": 180.0,+ "provider": "gps",+ "timestamp": "2025-01-30T12:00:00Z"+ }+}+```++### Response Fields++| Field | Type | Description |+|-------|------|-------------|+| latitude | float | Latitude in degrees |+| longitude | float | Longitude in degrees |+| altitude | float | Altitude in meters (if available) |+| accuracy | float | Horizontal accuracy in meters |+| speed | float | Speed in m/s (if moving) |+| bearing | float | Direction of travel in degrees |+| provider | string | `"gps"`, `"network"`, `"fused"` |+| timestamp | string | When location was obtained |++### Error Response++```json+{+ "error": "Location not available - GPS may be disabled",+ "service": "location",+ "action": "status"+}+```++## Accuracy Guide++| Accuracy (m) | Quality | Typical Source |+|--------------|---------|----------------|+| < 5 | Excellent | GPS with clear sky |+| 5-15 | Good | GPS |+| 15-50 | Fair | Network/WiFi |+| 50-100 | Poor | Cell tower |+| > 100 | Very Poor | Coarse location |++## Provider Types++| Provider | Description |+|----------|-------------|+| gps | GPS satellites (most accurate outdoors) |+| network | WiFi/Cell towers |+| fused | Combined sources (Android Fused Location) |++## Use Cases++| Use Case | Description |+|----------|-------------|+| Location tracking | Get device position |+| Geofencing | Check if in specific area |+| Speed monitoring | Track movement speed |+| Navigation | Get coordinates for routing |++## Common Workflows++### Share location via WhatsApp++1. Get location from device+2. Use `whatsapp_send` with message_type="location"+3. Pass latitude/longitude from location result++### Location-based reminder++1. Get current location+2. Calculate distance to target+3. Trigger reminder when near target++### Track movement++1. Periodically get location+2. Store coordinates+3. Calculate distance traveled++## Integration with Other Tools++### Send location to contact++```+1. location.status -> get lat/lng+2. whatsapp_send with:+ - message_type: "location"+ - latitude: <from location>+ - longitude: <from location>+```++### Find nearby places++```+1. location.status -> get lat/lng+2. nearby_places with:+ - lat: <from location>+ - lng: <from location>+ - type: "restaurant"+```++## Setup Requirements++1. Connect the **Location** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Location permission must be granted+4. GPS/Location services must be enabled on devicediff --git a/server/skills/android_agent/motion-skill/SKILL.md b/server/skills/android_agent/motion-skill/SKILL.mdnew file mode 100644index 00000000..f02c517b--- /dev/null+++ b/server/skills/android_agent/motion-skill/SKILL.md@@ -0,0 +1,141 @@+---+name: motion-skill+description: Get Android motion sensor data - accelerometer, gyroscope, detect motion, shake gestures, and device orientation.+allowed-tools: motion_detection+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📈"+ color: "#14B8A6"+---++# Motion Detection Tool++Access motion sensors on Android device.++## How It Works++This skill provides instructions for the **Motion Detection** tool node. Connect the **Motion Detection** node to Zeenie's `input-tools` handle to enable motion sensing.++## motion_detection Tool++Get accelerometer, gyroscope, and motion data.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | `"status"` - Get motion sensor data |++### Example++**Get motion data:**+```json+{+ "action": "status"+}+```++### Response Format++```json+{+ "success": true,+ "service": "motion_detection",+ "action": "status",+ "data": {+ "accelerometer": {+ "x": 0.12,+ "y": 9.78,+ "z": 0.34+ },+ "gyroscope": {+ "x": 0.01,+ "y": 0.02,+ "z": 0.00+ },+ "orientation": {+ "azimuth": 45.0,+ "pitch": -5.0,+ "roll": 2.0+ },+ "is_moving": false,+ "is_shaking": false,+ "device_position": "flat"+ }+}+```++### Response Fields++| Field | Type | Description |+|-------|------|-------------|+| accelerometer | object | X, Y, Z acceleration (m/s^2) |+| gyroscope | object | X, Y, Z rotation rate (rad/s) |+| orientation | object | Device orientation angles |+| is_moving | boolean | Significant movement detected |+| is_shaking | boolean | Shake gesture detected |+| device_position | string | Inferred position |++### Orientation Fields++| Field | Description |+|-------|-------------|+| azimuth | Compass heading (0-360 degrees) |+| pitch | Forward/backward tilt (-180 to 180) |+| roll | Left/right tilt (-90 to 90) |++### Device Positions++| Position | Description |+|----------|-------------|+| `flat` | Laying flat on surface |+| `upright` | Standing vertical |+| `tilted` | Angled position |+| `face_down` | Screen facing down |+| `face_up` | Screen facing up |++## Accelerometer Interpretation++When device is stationary and flat:+- X ~ 0 (left-right)+- Y ~ 9.8 (gravity)+- Z ~ 0 (forward-backward)++Movement creates deviations from gravity baseline.++## Use Cases++| Use Case | Data | Description |+|----------|------|-------------|+| Shake detection | is_shaking | Trigger on shake gesture |+| Movement alert | is_moving | Detect device moved |+| Orientation | device_position | Check how device is held |+| Compass heading | azimuth | Get direction |+| Tilt detection | pitch, roll | Detect angles |++## Common Workflows++### Shake to trigger action++1. Poll motion status+2. When is_shaking = true+3. Execute action++### Security monitor++1. Place device as monitor+2. Check is_moving periodically+3. Alert if movement detected++### Orientation-based response++1. Check device_position+2. Adjust behavior based on orientation++## Setup Requirements++1. Connect the **Motion Detection** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Motion sensors must be available on devicediff --git a/server/skills/android/personality/SKILL.md b/server/skills/android_agent/personality/SKILL.mdsimilarity index 100%rename from server/skills/android/personality/SKILL.mdrename to server/skills/android_agent/personality/SKILL.mddiff --git a/server/skills/android_agent/screen-control-skill/SKILL.md b/server/skills/android_agent/screen-control-skill/SKILL.mdnew file mode 100644index 00000000..32486d00--- /dev/null+++ b/server/skills/android_agent/screen-control-skill/SKILL.md@@ -0,0 +1,164 @@+---+name: screen-control-skill+description: Control Android screen - brightness, wake screen, auto-brightness toggle, and screen timeout settings.+allowed-tools: screen_control_automation+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "💡"+ color: "#EAB308"+---++# Screen Control Tool++Control screen settings on Android device.++## How It Works++This skill provides instructions for the **Screen Control Automation** tool node. Connect the **Screen Control Automation** node to Zeenie's `input-tools` handle to enable screen control.++## screen_control Tool++Control screen brightness and display settings.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | Action to perform (see below) |+| parameters | object | No | Additional parameters for set actions |++### Actions++| Action | Description |+|--------|-------------|+| `status` | Get current screen settings |+| `set_brightness` | Set screen brightness level |+| `wake` | Wake the screen |+| `auto_brightness_on` | Enable auto-brightness |+| `auto_brightness_off` | Disable auto-brightness |++### Examples++**Get screen status:**+```json+{+ "action": "status"+}+```++**Set brightness to 50%:**+```json+{+ "action": "set_brightness",+ "parameters": {+ "level": 50+ }+}+```++**Wake the screen:**+```json+{+ "action": "wake"+}+```++**Enable auto-brightness:**+```json+{+ "action": "auto_brightness_on"+}+```++**Disable auto-brightness:**+```json+{+ "action": "auto_brightness_off"+}+```++### Response Formats++**Status response:**+```json+{+ "success": true,+ "service": "screen_control",+ "action": "status",+ "data": {+ "brightness": 75,+ "auto_brightness": true,+ "screen_on": true,+ "screen_timeout": 30000+ }+}+```++**Set brightness response:**+```json+{+ "success": true,+ "service": "screen_control",+ "action": "set_brightness",+ "data": {+ "previous_brightness": 100,+ "new_brightness": 50+ }+}+```++### Response Fields++| Field | Type | Description |+|-------|------|-------------|+| brightness | int | Current brightness (0-100) |+| auto_brightness | boolean | Auto-brightness enabled |+| screen_on | boolean | Screen is currently on |+| screen_timeout | int | Timeout in milliseconds |++## Use Cases++| Use Case | Action | Description |+|----------|--------|-------------|+| Check display | status | Get current settings |+| Lower brightness | set_brightness | Reduce for battery/eyes |+| Wake device | wake | Turn on screen |+| Enable adaptive | auto_brightness_on | Let system adjust |+| Fixed brightness | auto_brightness_off | Manual control |++## Common Workflows++### Battery saving++1. Disable auto-brightness+2. Set brightness to 30%+3. Reduce screen timeout++### Night mode++1. Disable auto-brightness+2. Set brightness to 10-20%+3. Enable blue light filter (if available)++### Presentation mode++1. Disable auto-brightness+2. Set brightness to 100%+3. Increase screen timeout++## Brightness Guidelines++| Level | Use Case |+|-------|----------|+| 0-20% | Night/dark room |+| 20-50% | Indoor use |+| 50-80% | Normal use |+| 80-100% | Bright conditions/outdoor |++## Setup Requirements++1. Connect the **Screen Control Automation** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. System settings permission may be requireddiff --git a/server/skills/android_agent/wifi-skill/SKILL.md b/server/skills/android_agent/wifi-skill/SKILL.mdnew file mode 100644index 00000000..8881a0ae--- /dev/null+++ b/server/skills/android_agent/wifi-skill/SKILL.md@@ -0,0 +1,182 @@+---+name: wifi-skill+description: Control Android WiFi - enable, disable, get status, scan for networks, and get current connection info.+allowed-tools: wifi_automation+metadata:+ author: machina+ version: "1.0"+ category: android+ icon: "📶"+ color: "#3B82F6"+---++# WiFi Automation Tool++Control WiFi on Android devices.++## How It Works++This skill provides instructions for the **WiFi Automation** tool node. Connect the **WiFi Automation** node to Zeenie's `input-tools` handle to enable WiFi control.++## wifi_automation Tool++Control WiFi settings and get network information.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| action | string | Yes | Action to perform (see below) |+| parameters | object | No | Additional parameters for certain actions |++### Actions++| Action | Description | Parameters |+|--------|-------------|------------|+| `status` | Get WiFi status and connection info | None |+| `enable` | Turn WiFi on | None |+| `disable` | Turn WiFi off | None |+| `scan` | Scan for available networks | None |++### Examples++**Get WiFi status:**+```json+{+ "action": "status"+}+```++**Enable WiFi:**+```json+{+ "action": "enable"+}+```++**Disable WiFi:**+```json+{+ "action": "disable"+}+```++**Scan for networks:**+```json+{+ "action": "scan"+}+```++### Response Formats++**Status response:**+```json+{+ "success": true,+ "service": "wifi_automation",+ "action": "status",+ "data": {+ "enabled": true,+ "connected": true,+ "ssid": "MyHomeNetwork",+ "bssid": "aa:bb:cc:dd:ee:ff",+ "ip_address": "192.168.1.100",+ "link_speed": 72,+ "rssi": -45,+ "frequency": 2437+ }+}+```++**Scan response:**+```json+{+ "success": true,+ "service": "wifi_automation",+ "action": "scan",+ "data": {+ "networks": [+ {+ "ssid": "MyHomeNetwork",+ "bssid": "aa:bb:cc:dd:ee:ff",+ "rssi": -45,+ "frequency": 2437,+ "security": "WPA2"+ },+ {+ "ssid": "Neighbor_WiFi",+ "bssid": "11:22:33:44:55:66",+ "rssi": -70,+ "frequency": 5180,+ "security": "WPA3"+ }+ ]+ }+}+```++**Enable/Disable response:**+```json+{+ "success": true,+ "service": "wifi_automation",+ "action": "enable",+ "data": {+ "message": "WiFi enabled successfully"+ }+}+```++### Response Fields++| Field | Description |+|-------|-------------|+| enabled | WiFi radio is on |+| connected | Connected to a network |+| ssid | Network name |+| bssid | Access point MAC address |+| ip_address | Device IP on network |+| link_speed | Connection speed in Mbps |+| rssi | Signal strength (dBm, closer to 0 is stronger) |+| frequency | Channel frequency in MHz |++## Use Cases++| Use Case | Action | Description |+|----------|--------|-------------|+| Check connection | status | Verify WiFi is connected |+| Toggle WiFi | enable/disable | Control WiFi radio |+| Find networks | scan | List available networks |+| Signal strength | status | Check connection quality |++## Common Workflows++### Auto-connect workflow++1. Check WiFi status+2. If not enabled, enable it+3. Scan for networks+4. Report available options++### Battery saving++1. Check if on mobile data+2. If not using WiFi, disable it+3. Re-enable when needed++## Signal Strength Guide++| RSSI (dBm) | Quality |+|------------|---------|+| > -50 | Excellent |+| -50 to -60 | Good |+| -60 to -70 | Fair |+| -70 to -80 | Weak |+| < -80 | Poor |++## Setup Requirements++1. Connect the **WiFi Automation** node to Zeenie's `input-tools` handle+2. Android device must be paired+3. Location permission may be required for scanningdiff --git a/server/skills/assistant/code-skill/SKILL.md b/server/skills/assistant/code-skill/SKILL.mddeleted file mode 100644index 9b421f4c..00000000--- a/server/skills/assistant/code-skill/SKILL.md+++ /dev/null@@ -1,176 +0,0 @@-----name: code-skill-description: Execute Python or JavaScript code for calculations, data processing, and automation. Use when user needs to run code, do calculations, or process data.-allowed-tools: python_code javascript_code-metadata:- author: machina- version: "3.0"- category: code- icon: "💻"- color: "#F59E0B"------# Code Execution--This skill enables you to execute Python and JavaScript code for various tasks using the `python_code` and `javascript_code` tools.--## Tool: python_code--Execute Python code for calculations, data processing, and automation.--### Parameters--| Parameter | Type | Required | Description |-|-----------|------|----------|-------------|-| `code` | string | Yes | Python code to execute. Set `output` variable with result. Use `print()` for console output. |--### Available Libraries-- Standard library: `math`, `json`, `datetime`, `timedelta`, `re`, `random`-- Collections: `Counter`, `defaultdict`-- All built-in functions--### Variables Available-- `input_data` - Data from connected workflow nodes (dict)-- `output` - Set this variable to return a result--### Returns--| Field | Type | Description |-|-------|------|-------------|-| `success` | boolean | Whether execution succeeded |-| `result` | any | Value of `output` variable if set |-| `output` | string | Captured print() statements |-| `error` | string | Error message if execution failed |--### Example Usage-```python-# Calculate with data-data = input_data.get("numbers", [1, 2, 3])-total = sum(data)-average = total / len(data)-print(f"Total: {total}, Average: {average}")-output = {"total": total, "average": average}-```-------## Tool: javascript_code--Execute JavaScript code for calculations, data processing, and JSON manipulation.--### Parameters--| Parameter | Type | Required | Description |-|-----------|------|----------|-------------|-| `code` | string | Yes | JavaScript code to execute. Set `output` variable with result. Use `console.log()` for output. |--### Variables Available-- `input_data` - Data from connected workflow nodes (object)-- `output` - Set this variable to return a result--### Returns--| Field | Type | Description |-|-------|------|-------------|-| `success` | boolean | Whether execution succeeded |-| `result` | any | Value of `output` variable if set |-| `output` | string | Captured console.log() statements |-| `error` | string | Error message if execution failed |--### Example Usage-```javascript-// Process JSON data-const data = input_data.numbers || [1, 2, 3];-const total = data.reduce((a, b) => a + b, 0);-const average = total / data.length;-console.log(`Total: ${total}, Average: ${average}`);-output = { total, average };-```-------## Examples--### Calculate a tip (Python)-**User**: "Calculate 15% tip on $85.50"--**Tool Call** (python_code):-```json-{- "code": "bill = 85.50\ntip_percent = 15\ntip = bill * (tip_percent / 100)\ntotal = bill + tip\nprint(f\"Tip: ${tip:.2f}\")\nprint(f\"Total: ${total:.2f}\")\noutput = {\"tip\": tip, \"total\": total}"-}-```--### Generate random numbers (Python)-**User**: "Generate 5 random numbers between 1 and 100"--**Tool Call** (python_code):-```json-{- "code": "import random\nnumbers = [random.randint(1, 100) for _ in range(5)]\nprint(f\"Random numbers: {numbers}\")\noutput = numbers"-}-```--### Process JSON data (JavaScript)-**User**: "Sum all the values in this object"--**Tool Call** (javascript_code):-```json-{- "code": "const values = Object.values(input_data);\nconst sum = values.reduce((a, b) => a + b, 0);\nconsole.log(`Sum: ${sum}`);\noutput = sum;"-}-```--### Date calculations (Python)-**User**: "What date is 30 days from now?"--**Tool Call** (python_code):-```json-{- "code": "from datetime import datetime, timedelta\ntoday = datetime.now()\nfuture = today + timedelta(days=30)\nresult = future.strftime('%Y-%m-%d')\nprint(f\"30 days from now: {result}\")\noutput = result"-}-```--### Array manipulation (JavaScript)-**User**: "Filter this array to only even numbers"--**Tool Call** (javascript_code):-```json-{- "code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst evens = numbers.filter(n => n % 2 === 0);\nconsole.log(`Even numbers: ${evens}`);\noutput = evens;"-}-```-------## When to Use Each Tool--| Use Case | Recommended Tool |-|----------|------------------|-| Math calculations | `python_code` |-| Date/time operations | `python_code` |-| Data analysis | `python_code` |-| Random number generation | `python_code` |-| JSON manipulation | `javascript_code` |-| Array operations | Either |-| String processing | Either |-------## Security Guidelines--1. **No file system access** outside designated directories-2. **No network requests** from code (use http-skill instead)-3. **No system commands** or shell access-4. **Limited execution time** (timeout configurable, default 30 seconds)-5. **No sensitive data** in code outputs--## Best Practices--1. Keep code simple and focused on one task-2. Use descriptive variable names-3. Always set the `output` variable with your result-4. Use `print()` / `console.log()` for debugging-5. Handle potential errors gracefully-6. Prefer Python for math, dates, and data processing-7. Prefer JavaScript for JSON manipulationdiff --git a/server/skills/assistant/http-skill/SKILL.md b/server/skills/assistant/http-skill/SKILL.mddeleted file mode 100644index f6582ce4..00000000--- a/server/skills/assistant/http-skill/SKILL.md+++ /dev/null@@ -1,163 +0,0 @@-----name: http-skill-description: Make HTTP requests to external APIs and web services. Use when user needs to fetch data from URLs, call APIs, or interact with web services.-allowed-tools: http-request-metadata:- author: machina- version: "2.0"- category: integration- icon: "🌐"- color: "#EF4444"------# HTTP Requests--This skill enables you to make HTTP requests to external APIs and web services.--## Capabilities--- Make GET, POST, PUT, DELETE, PATCH requests-- Send JSON payloads in request body-- Set custom headers (authentication, content-type, etc.)-- Handle API responses (JSON and text)--## Tool Reference--### http-request--Make an HTTP request to a URL.--**Parameters:**-| Parameter | Type | Required | Default | Description |-|-----------|------|----------|---------|-------------|-| `url` | string | Yes | - | Full URL to request (e.g., `https://api.example.com/data`) |-| `method` | string | No | `GET` | HTTP method: `GET`, `POST`, `PUT`, `DELETE`, `PATCH` |-| `body` | object | No | null | Request body as JSON object (for POST/PUT/PATCH) |-| `headers` | object | No | null | Custom headers as key-value pairs |--**Returns:**-| Field | Type | Description |-|-------|------|-------------|-| `status` | number | HTTP status code (200, 404, 500, etc.) |-| `data` | any | Response body (parsed JSON or text) |-| `headers` | object | Response headers |-| `url` | string | Final URL (may differ if redirected) |-| `method` | string | HTTP method used |--## Common Use Cases--### Fetching Data (GET)-```json-{- "url": "https://api.example.com/users/123",- "method": "GET"-}-```--### Creating Resources (POST)-```json-{- "url": "https://api.example.com/users",- "method": "POST",- "body": {"name": "John", "email": "[email protected]"},- "headers": {"Content-Type": "application/json"}-}-```--### Updating Resources (PUT/PATCH)-```json-{- "url": "https://api.example.com/users/123",- "method": "PUT",- "body": {"name": "John Updated"}-}-```--### Deleting Resources (DELETE)-```json-{- "url": "https://api.example.com/users/123",- "method": "DELETE"-}-```--### With Authentication-```json-{- "url": "https://api.example.com/protected",- "method": "GET",- "headers": {- "Authorization": "Bearer your-api-token",- "X-API-Key": "your-api-key"- }-}-```--## Examples--**User**: "Get the current Bitcoin price"-**Action**: Use http-request with:-```json-{- "url": "https://api.coindesk.com/v1/bpi/currentprice.json",- "method": "GET"-}-```--**User**: "Post this data to my webhook"-**Action**: Use http-request with:-```json-{- "url": "https://webhook.example.com/endpoint",- "method": "POST",- "body": {"event": "user_action", "data": "..."},- "headers": {"Content-Type": "application/json"}-}-```--**User**: "Check if example.com is up"-**Action**: Use http-request with:-```json-{- "url": "https://example.com",- "method": "GET"-}-```-Then check if status is 200.--**User**: "Get weather for New York"-**Action**: Use http-request with:-```json-{- "url": "https://api.openweathermap.org/data/2.5/weather?q=New York&appid=YOUR_KEY",- "method": "GET"-}-```--## Security Guidelines--1. **Never expose API keys** in responses to the user-2. **Validate URLs** - only request from trusted domains-3. **Don't make requests** to internal/private networks (localhost, 192.168.x.x, 10.x.x.x)-4. **Respect rate limits** of external services-5. **Handle errors gracefully** and inform the user clearly-6. **Don't store sensitive data** from API responses--## Error Handling--Common HTTP status codes and what they mean:--| Status | Meaning | Action |-|--------|---------|--------|-| 200-299 | Success | Process the response data |-| 400 | Bad Request | Check request parameters |-| 401 | Unauthorized | Check API key/authentication |-| 403 | Forbidden | Access denied, may need different permissions |-| 404 | Not Found | Check URL path |-| 429 | Too Many Requests | Rate limited, wait before retrying |-| 500-599 | Server Error | External service issue, try again later |--When an error occurs, inform the user about:-- What was attempted-- What went wrong (status code and message)-- Suggested next stepsdiff --git a/server/skills/assistant/maps-skill/SKILL.md b/server/skills/assistant/maps-skill/SKILL.mddeleted file mode 100644index e9fe169b..00000000--- a/server/skills/assistant/maps-skill/SKILL.md+++ /dev/null@@ -1,172 +0,0 @@-----name: maps-skill-description: Location services including geocoding, nearby places, and maps. Use when user asks about addresses, locations, places nearby, or wants to see a map.-metadata:- author: machina- version: "3.0"- category: location- icon: "🗺️"- color: "#4285F4"------# Location Services--This skill provides context for location-based capabilities using Google Maps services.--## How It Works--This skill provides instructions and context. To execute location actions, connect the appropriate **tool nodes** to the Zeenie's `input-tools` handle:--- **Add Locations** node - Geocode addresses to coordinates or reverse geocode-- **Show Nearby Places** node - Search for nearby places--## add_locations Tool (Geocoding)--Convert addresses to coordinates or coordinates to addresses.--### Schema Fields--| Field | Type | Required | Description |-|-------|------|----------|-------------|-| service_type | string | Yes | "geocode" (address to coordinates) or "reverse_geocode" (coordinates to address) |-| address | string | If geocode | Address to geocode (e.g., "1600 Amphitheatre Parkway, Mountain View, CA") |-| lat | float | If reverse_geocode | Latitude coordinate |-| lng | float | If reverse_geocode | Longitude coordinate |--### Examples--**Geocode address:**-```json-{- "service_type": "geocode",- "address": "Eiffel Tower, Paris"-}-```--**Reverse geocode:**-```json-{- "service_type": "reverse_geocode",- "lat": 48.8584,- "lng": 2.2945-}-```--### Response Format--```json-{- "success": true,- "service_type": "geocoding",- "input": {"address": "Eiffel Tower, Paris"},- "results": [- {- "formatted_address": "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",- "geometry": {- "location": {"lat": 48.8583701, "lng": 2.2944813}- },- "address_components": [...]- }- ],- "status": "OK"-}-```--## show_nearby_places Tool--Search for places near a location.--### Schema Fields--| Field | Type | Required | Description |-|-------|------|----------|-------------|-| lat | float | Yes | Center latitude for search |-| lng | float | Yes | Center longitude for search |-| radius | int | No | Search radius in meters (default: 500, max: 50000) |-| type | string | No | Place type (default: "restaurant") |-| keyword | string | No | Optional keyword to filter results |--### Examples--**Find nearby restaurants:**-```json-{- "lat": 40.7484,- "lng": -73.9857,- "radius": 500,- "type": "restaurant"-}-```--**Find coffee shops near a location:**-```json-{- "lat": 37.7749,- "lng": -122.4194,- "type": "cafe",- "keyword": "starbucks"-}-```--### Response Format--```json-{- "success": true,- "type": "restaurant",- "search_parameters": {- "location": {"lat": 40.7484, "lng": -73.9857},- "radius": 500,- "type": "restaurant"- },- "results": [- {- "name": "Example Restaurant",- "vicinity": "123 Main St",- "rating": 4.5,- "user_ratings_total": 150,- "price_level": 2,- "geometry": {- "location": {"lat": 40.7485, "lng": -73.9860}- },- "types": ["restaurant", "food"],- "opening_hours": {"open_now": true}- }- ],- "total_results": 10,- "status": "OK"-}-```--## Place Types--Common place types for nearby search:-- Food: restaurant, cafe, bakery, bar, meal_takeaway-- Shopping: store, supermarket, shopping_mall, clothing_store-- Services: bank, atm, gas_station, pharmacy, post_office-- Health: hospital, doctor, dentist, pharmacy-- Transport: bus_station, train_station, airport, taxi_stand-- Entertainment: movie_theater, gym, park, museum, zoo--## Common Workflows--### Find nearby places by address-1. Use `add_locations` with service_type="geocode" to get coordinates-2. Use `show_nearby_places` with the returned lat/lng--### Get address from coordinates-1. Use `add_locations` with service_type="reverse_geocode"--## Response Guidelines--When presenting location results:-1. List the top results with name, rating, and address-2. Include distance if available-3. Mention if places are currently open-4. Offer to search for different types or expand radius--## Setup Requirements--1. Connect this skill to Zeenie's `input-skill` handle-2. Connect location tool nodes to Zeenie's `input-tools` handle-3. Ensure Google Maps API key is configured in credentialsdiff --git a/server/skills/assistant/scheduler-skill/SKILL.md b/server/skills/assistant/scheduler-skill/SKILL.mddeleted file mode 100644index 1819198e..00000000--- a/server/skills/assistant/scheduler-skill/SKILL.md+++ /dev/null@@ -1,86 +0,0 @@-----name: scheduler-skill-description: Schedule tasks and set timers. Use when user wants to schedule something, set a reminder, create a recurring task, or use cron expressions.-metadata:- author: machina- version: "2.0"- category: automation- icon: "⏰"- color: "#10B981"------# Task Scheduling--This skill provides context for scheduling tasks, setting timers, and creating recurring jobs.--## How It Works--This skill provides instructions and context. Scheduling is handled through workflow deployment:--- **Cron Scheduler** trigger node - Recurring schedules using cron expressions-- **Timer** trigger node - One-time delayed execution-- **Workflow Trigger** node - Manual workflow execution--## Capabilities--When used with workflow triggers:-- Create one-time timers-- Set up recurring schedules with cron expressions-- Deploy workflows that run on schedule--## Cron Expression Format--```-* * * * *-| | | | |-| | | | +-- Day of week (0-7, Sun=0 or 7)-| | | +---- Month (1-12)-| | +------ Day of month (1-31)-| +-------- Hour (0-23)-+---------- Minute (0-59)-```--### Common Patterns--| Pattern | Description |-|---------|-------------|-| `0 9 * * *` | Every day at 9:00 AM |-| `0 9 * * 1-5` | Weekdays at 9:00 AM |-| `*/15 * * * *` | Every 15 minutes |-| `0 0 1 * *` | First day of each month |-| `0 8,12,18 * * *` | At 8am, noon, and 6pm |--## Example Interactions--**User**: "Remind me in 30 minutes"-- This requires setting up a Timer trigger workflow-- Inform user: "I can help you create a scheduled workflow. Set up a Timer trigger node with 30 minute delay."--**User**: "Send a daily report at 9am"-- This requires a Cron Scheduler workflow-- Inform user: "Create a workflow with Cron Scheduler trigger using expression '0 9 * * *'"--**User**: "Check for updates every hour"-- This requires a Cron Scheduler workflow-- Inform user: "Create a workflow with Cron Scheduler trigger using expression '0 * * * *'"--## Workflow-Based Scheduling--In this system, scheduling is achieved through:--1. **Trigger Nodes**: Cron Scheduler or Timer nodes start workflows-2. **Workflow Deployment**: Deploy the workflow to activate the schedule-3. **Cancel**: Undeploy the workflow to cancel the schedule--## Best Practices--1. Explain that schedules require workflow deployment-2. Provide the cron expression for the user's request-3. Confirm timezone considerations for time-sensitive tasks-4. Help users understand workflow-based scheduling model--## Limitations--- This skill provides guidance only-- Actual scheduling requires workflow creation and deployment-- Cannot directly create/cancel schedules via chat commandsdiff --git a/server/skills/assistant/subagent-skill/SKILL.md b/server/skills/assistant/subagent-skill/SKILL.mdindex 7f6305e8..c70d4669 100644--- a/server/skills/assistant/subagent-skill/SKILL.md+++ b/server/skills/assistant/subagent-skill/SKILL.md@@ -3,7 +3,7 @@ name: subagent-skilldescription: Manage sub-agent delegation, handle task completion events, and coordinate multi-agent workflows.metadata:author: machina- version: "1.0"+ version: "2.0"category: assistanticon: "🤖"color: "#8B5CF6"@@ -13,6 +13,30 @@ metadata:You are a parent agent that can delegate tasks to specialized sub-agents. This skill helps you understand, delegate to, and handle results from sub-agents effectively.+## CRITICAL: Always Check Sub-Agents First++**NEVER say "I don't have that tool" or "I can't do that" without first checking your connected sub-agents.**++When a user requests something you don't have a direct tool for:++1. **Check your connected sub-agents** - Look at what agents are available in your tools+2. **Delegate to the appropriate sub-agent** - They have their own tools and capabilities+3. **Only say you can't** if NO sub-agent can handle it++**Wrong approach:**+```+User: "Check my phone battery"+You: "I don't have access to Android tools, so I can't check your battery."+```++**Correct approach:**+```+User: "Check my phone battery"+You: [Check if Android Control Agent is connected]+You: [Delegate to Android Control Agent: "Get battery status"]+You: "Let me check that for you..." [waits for result]+```+## Available Sub-Agent TypesYou can delegate tasks to these specialized agents (when connected to your tools):@@ -42,6 +66,26 @@ You can delegate tasks to these specialized agents (when connected to your tools| **Payments Agent** | 💳 | Payment processing | Payment workflows, invoices, financial operations || **Consumer Agent** | 🛒 | Consumer support | Customer service, product recommendations, order management |+## How to Check Sub-Agent Capabilities++Before responding "I can't do that":++1. **List your available tools** - Sub-agents appear as delegation tools+2. **Match the request to an agent specialty** - Use the table above+3. **Delegate if a match exists** - The sub-agent has its own tools+4. **Only decline if truly impossible** - No matching agent connected++### Capability Matching Examples++| User Request | Check For | Delegate To |+|--------------|-----------|-------------|+| "Check my battery" | Android Control Agent | `delegate_to_android_agent` |+| "Send a WhatsApp" | Social Media Agent | `delegate_to_social_agent` |+| "Calculate this" | Coding Agent | `delegate_to_coding_agent` |+| "Find restaurants nearby" | Travel Agent | `delegate_to_travel_agent` |+| "Make an HTTP request" | Web Control Agent | `delegate_to_web_agent` |+| "Set a reminder" | Task Management Agent | `delegate_to_task_agent` |+## How Delegation Works### Fire-and-Forget Pattern@@ -60,15 +104,15 @@ When you delegate a task:## Delegation Best Practices### When to Delegate-- Task requires specialized tools you don't have connected+- User requests something outside your direct tools+- Task requires specialized capabilities (Android, WhatsApp, code execution, etc.)- Task is time-consuming and can run in background- Task matches a sub-agent's specialty area-- User explicitly asks for a specific capability### When NOT to Delegate-- Simple questions you can answer directly-- Tasks that need immediate response in conversation-- When you already have the required tools connected+- Simple questions you can answer directly from knowledge+- Tasks that need immediate response AND you have the direct tool+- When the same task is already running (avoid duplicates)### Delegation FormatWhen delegating, provide clear instructions:@@ -101,19 +145,6 @@ When a delegated task fails:**Example Response:**"I wasn't able to send the WhatsApp message because the contact wasn't found. Could you verify the phone number? Alternatively, I can try searching for the contact by name."-## Task Tracking--If you have the Task Manager tool connected, use it to:-- **List tasks**: See all active and completed delegated tasks-- **Check status**: Get details on a specific task-- **Mark done**: Clean up completed task tracking--### Checking Task Status-Before re-delegating similar work:-1. Use Task Manager to list recent tasks-2. Check if the same task is already running-3. Avoid duplicate delegations-## Multi-Agent Coordination### Sequential Delegation@@ -131,17 +162,17 @@ For independent tasks:## Critical Rules-1. **NEVER re-delegate after receiving a result** - Report it instead-2. **NEVER retry failed tasks automatically** - Ask user first-3. **ALWAYS acknowledge task completion** to the user-4. **ALWAYS match task to agent specialty** for best results-5. **When in doubt, ask the user** before taking action+1. **ALWAYS check sub-agents before saying "I can't"** - They extend your capabilities+2. **NEVER re-delegate after receiving a result** - Report it instead+3. **NEVER retry failed tasks automatically** - Ask user first+4. **ALWAYS acknowledge task completion** to the user+5. **ALWAYS match task to agent specialty** for best results## Error Handling| Error Type | Action ||------------|--------|-| Agent not found | Check if agent is connected to your tools |+| Agent not connected | Inform user which agent is needed and how to connect it || Task timeout | Report to user, suggest retry || Invalid parameters | Clarify requirements with user || Agent error | Report error details, suggest alternatives |@@ -151,6 +182,7 @@ For independent tasks:### Battery Check Workflow```User: "Check my phone battery"+You: [See Android Control Agent in tools]You: Delegate to Android Control Agent with task "Get battery status"Agent: Returns {status: 'completed', result: 'Battery at 78%, charging'}You: "Your phone battery is at 78% and currently charging."@@ -159,15 +191,15 @@ You: "Your phone battery is at 78% and currently charging."### Message Sending Workflow```User: "Send a WhatsApp to John saying I'll be late"+You: [See Social Media Agent in tools]You: Delegate to Social Media Agent with message detailsAgent: Returns {status: 'completed', result: 'Message sent to John'}You: "Done! I've sent the message to John letting him know you'll be late."```-### Failed Task Workflow+### No Agent Available```-User: "Run the Python script at /scripts/analyze.py"-You: Delegate to Coding Agent-Agent: Returns {status: 'error', error: 'File not found'}-You: "I couldn't run that script - the file wasn't found at /scripts/analyze.py. Could you verify the path is correct?"+User: "Check my phone battery"+You: [No Android Control Agent in tools]+You: "I don't have an Android Control Agent connected right now. To check your battery, please connect an Android Control Agent to my tools input, then ask again."```diff --git a/server/skills/assistant/whatsapp-skill/SKILL.md b/server/skills/assistant/whatsapp-skill/SKILL.mddeleted file mode 100644index cb86845e..00000000--- a/server/skills/assistant/whatsapp-skill/SKILL.md+++ /dev/null@@ -1,285 +0,0 @@-----name: whatsapp-skill-description: Send WhatsApp messages, query contacts/groups, retrieve chat history. Look up contact info by name or phone for sending/replying.-metadata:- author: machina- version: "3.0"- category: messaging- icon: "💬"- color: "#25D366"------# WhatsApp Messaging Skill--This skill provides context for WhatsApp messaging capabilities.--## How It Works--This skill provides instructions and context. To execute WhatsApp actions, connect the appropriate **tool nodes** to the Zeenie's `input-tools` handle:--- **WhatsApp Send** node - Send messages to contacts or groups-- **WhatsApp DB** node - Query contacts, groups, and chat history--## whatsapp_send Tool--Send messages to contacts or groups.--### Schema Fields--| Field | Type | Required | Description |-|-------|------|----------|-------------|-| recipient_type | string | Yes | "phone" for individual or "group" for group chat |-| phone | string | If phone | Phone number without + prefix (e.g., 1234567890) |-| group_id | string | If group | Group JID (e.g., [email protected]) |-| message_type | string | Yes | "text", "image", "video", "audio", "document", "sticker", "location", "contact" |-| message | string | If text | Text message content |-| media_url | string | If media | URL for image/video/audio/document/sticker |-| caption | string | No | Caption for media messages |-| latitude | float | If location | Latitude coordinate |-| longitude | float | If location | Longitude coordinate |-| location_name | string | No | Display name for location |-| address | string | No | Address text for location |-| contact_name | string | If contact | Contact display name |-| vcard | string | If contact | vCard 3.0 format string |--### Examples--**Send text message:**-```json-{- "recipient_type": "phone",- "phone": "1234567890",- "message_type": "text",- "message": "Hello! How are you?"-}-```--**Send image with caption:**-```json-{- "recipient_type": "phone",- "phone": "1234567890",- "message_type": "image",- "media_url": "https://example.com/photo.jpg",- "caption": "Check out this photo!"-}-```--**Send to group:**-```json-{- "recipient_type": "group",- "group_id": "[email protected]",- "message_type": "text",- "message": "Hello everyone!"-}-```--**Send location:**-```json-{- "recipient_type": "phone",- "phone": "1234567890",- "message_type": "location",- "latitude": 37.7749,- "longitude": -122.4194,- "location_name": "San Francisco",- "address": "San Francisco, CA, USA"-}-```--### Response Format--```json-{- "success": true,- "recipient": "1234567890",- "recipient_type": "phone",- "message_type": "text",- "details": {- "status": "sent",- "preview": "Hello! How are you?",- "timestamp": "2025-01-30T12:00:00"- }-}-```--## whatsapp_db Tool--Query WhatsApp database - contacts, groups, messages.--### Schema Fields--| Field | Type | Required | Description |-|-------|------|----------|-------------|-| operation | string | Yes | "chat_history", "search_groups", "get_group_info", "get_contact_info", "list_contacts", "check_contacts" |-| chat_type | string | For chat_history | "individual" or "group" |-| phone | string | Varies | Phone number for chat_history (individual), get_contact_info |-| group_id | string | Varies | Group JID for chat_history (group), get_group_info |-| message_filter | string | No | For chat_history: "all" or "text_only" |-| group_filter | string | No | For chat_history (group): "all" or "contact" |-| sender_phone | string | No | For chat_history with group_filter="contact" |-| limit | int | No | Max results. chat_history: 1-500 (default 50), search_groups: 1-50 (default 20), list_contacts: 1-100 (default 50) |-| offset | int | No | For chat_history: pagination offset |-| query | string | No | Search query for search_groups, list_contacts. Use specific queries to narrow results |-| phones | string | For check_contacts | Comma-separated phone numbers |-| participant_limit | int | No | For get_group_info: max participants (1-100, default 50) |--**Important:** Always use small limits and specific queries to avoid context overflow errors.--### Operations--#### list_contacts-List contacts with saved names. Useful for finding someone by name.--```json-{- "operation": "list_contacts",- "query": "mom",- "limit": 10-}-```--#### get_contact_info-Get full contact info for sending/replying.--```json-{- "operation": "get_contact_info",- "phone": "919876543210"-}-```--#### search_groups-Search groups by name. Use specific query to narrow results.--```json-{- "operation": "search_groups",- "query": "family",- "limit": 10-}-```--#### get_group_info-Get group details with participant names. Large groups may have many participants.--```json-{- "operation": "get_group_info",- "group_id": "[email protected]",- "participant_limit": 20-}-```--#### chat_history-Retrieve message history.--```json-{- "operation": "chat_history",- "chat_type": "individual",- "phone": "1234567890",- "limit": 20-}-```--```json-{- "operation": "chat_history",- "chat_type": "group",- "group_id": "[email protected]",- "message_filter": "text_only",- "limit": 50-}-```--#### check_contacts-Check WhatsApp registration status.--```json-{- "operation": "check_contacts",- "phones": "1234567890,0987654321"-}-```--### Response Formats--**list_contacts response:**-```json-{- "success": true,- "operation": "list_contacts",- "contacts": [- {"phone": "919876543210", "name": "Mom", "jid": "[email protected]"}- ],- "total": 1-}-```--**chat_history response:**-```json-{- "success": true,- "operation": "chat_history",- "messages": [- {- "index": 1,- "message_id": "ABC123",- "sender": "[email protected]",- "text": "Hello!",- "timestamp": "2025-01-30T12:00:00",- "is_from_me": false- }- ],- "total": 50,- "has_more": true-}-```--**get_group_info response:**-```json-{- "success": true,- "operation": "get_group_info",- "name": "Family Group",- "jid": "[email protected]",- "participants": [- {"phone": "919876543210", "name": "Mom", "is_admin": true},- {"phone": "919876543211", "name": "Dad", "is_admin": false}- ]-}-```--## Common Workflows--### Send message to someone by name--1. Use `list_contacts` with query to find the person-2. Get their phone number from the result-3. Use `whatsapp_send` with the phone number--### Reply to someone in a group--1. Use `get_group_info` to get participant names and phones-2. Use `whatsapp_send` with recipient_type="phone" and the person's phone--### Find and message a group--1. Use `search_groups` to find the group by name-2. Use `whatsapp_send` with recipient_type="group" and the group_id--## Guidelines--1. **Phone numbers**: Always use without + prefix, just digits (e.g., 919876543210)-2. **Groups**: Use JID format ending in @g.us-3. **Contact lookup**: Use list_contacts first if you only have a name-4. **Media URLs**: Must be publicly accessible URLs-5. **Pagination**: Use offset with limit to page through chat history--## Setup Requirements--1. Connect this skill to Zeenie's `input-skill` handle-2. Connect WhatsApp tool nodes to Zeenie's `input-tools` handle-3. Ensure WhatsApp is connected (green status indicator)diff --git a/server/skills/coding_agent/javascript-skill/SKILL.md b/server/skills/coding_agent/javascript-skill/SKILL.mdnew file mode 100644index 00000000..4bc9479e--- /dev/null+++ b/server/skills/coding_agent/javascript-skill/SKILL.md@@ -0,0 +1,196 @@+---+name: javascript-skill+description: Execute JavaScript code for calculations, data processing, and JSON manipulation. Full ES6+ support with Node.js runtime.+allowed-tools: javascript_code+metadata:+ author: machina+ version: "1.0"+ category: code+ icon: "📜"+ color: "#F7DF1E"+---++# JavaScript Code Execution Tool++Execute JavaScript code for calculations, data processing, and JSON manipulation.++## How It Works++This skill provides instructions for the **JavaScript Executor** tool node. Connect the **JavaScript Executor** node to Zeenie's `input-tools` handle to enable JavaScript code execution.++## javascript_code Tool++Execute JavaScript code and return results.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| code | string | Yes | JavaScript code to execute |++### Available Features++| Feature | Description |+|---------|-------------|+| ES6+ syntax | Arrow functions, destructuring, spread operator |+| `JSON` | JSON.parse() and JSON.stringify() |+| `Math` | Mathematical operations |+| `Date` | Date and time manipulation |+| `Array` methods | map, filter, reduce, sort, etc. |+| `Object` methods | keys, values, entries, assign |+| `String` methods | All standard string methods |++### Built-in Variables++| Variable | Description |+|----------|-------------|+| `input_data` | Data from connected workflow nodes (object) |+| `output` | Set this to return a result |++### Output Methods++1. **Set `output` variable**: Returns structured data to the workflow+2. **Use `console.log()`**: Captured as console output++### Examples++**Basic calculation:**+```json+{+ "code": "const result = 25 * 4 + 10;\nconsole.log(`Result: ${result}`);\noutput = result;"+}+```++**Array processing:**+```json+{+ "code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5];\nconst total = numbers.reduce((a, b) => a + b, 0);\nconst average = total / numbers.length;\nconsole.log(`Total: ${total}, Average: ${average}`);\noutput = { total, average };"+}+```++**Filter array:**+```json+{+ "code": "const numbers = input_data.numbers || [1, 2, 3, 4, 5, 6, 7, 8, 9, 10];\nconst evens = numbers.filter(n => n % 2 === 0);\nconsole.log(`Even numbers: ${evens}`);\noutput = evens;"+}+```++**Transform data:**+```json+{+ "code": "const users = input_data.users || [{name: 'John', age: 30}, {name: 'Jane', age: 25}];\nconst names = users.map(u => u.name);\nconsole.log(`Names: ${names.join(', ')}`);\noutput = names;"+}+```++**JSON manipulation:**+```json+{+ "code": "const data = { name: 'John', age: 30, city: 'NYC' };\nconst json = JSON.stringify(data, null, 2);\nconsole.log(json);\noutput = data;"+}+```++**Object operations:**+```json+{+ "code": "const obj = { a: 1, b: 2, c: 3 };\nconst keys = Object.keys(obj);\nconst values = Object.values(obj);\nconst sum = values.reduce((a, b) => a + b, 0);\nconsole.log(`Sum of values: ${sum}`);\noutput = { keys, values, sum };"+}+```++**Date operations:**+```json+{+ "code": "const now = new Date();\nconst tomorrow = new Date(now.getTime() + 24 * 60 * 60 * 1000);\nconst formatted = tomorrow.toISOString().split('T')[0];\nconsole.log(`Tomorrow: ${formatted}`);\noutput = formatted;"+}+```++**Sort array:**+```json+{+ "code": "const items = input_data.items || ['banana', 'apple', 'cherry'];\nconst sorted = [...items].sort();\nconsole.log(`Sorted: ${sorted}`);\noutput = sorted;"+}+```++**String processing:**+```json+{+ "code": "const text = 'Hello World, Hello JavaScript';\nconst words = text.split(' ');\nconst unique = [...new Set(words)];\nconsole.log(`Unique words: ${unique}`);\noutput = unique;"+}+```++**Destructuring and spread:**+```json+{+ "code": "const { name, age } = input_data.user || { name: 'John', age: 30 };\nconst profile = { name, age, active: true };\nconst extended = { ...profile, role: 'admin' };\nconsole.log(JSON.stringify(extended));\noutput = extended;"+}+```++### Response Format++**Success:**+```json+{+ "success": true,+ "result": { "total": 15, "average": 3 },+ "output": "Total: 15, Average: 3"+}+```++**Error:**+```json+{+ "error": "ReferenceError: undefinedVar is not defined"+}+```++## Use Cases++| Use Case | Approach |+|----------|----------|+| Array manipulation | Use map, filter, reduce |+| JSON processing | Use JSON.parse, JSON.stringify |+| Object operations | Use Object.keys, values, entries |+| String processing | Use split, join, replace |+| Math calculations | Use Math methods |+| Date operations | Use Date object |+| Data transformation | Use spread and destructuring |++## Guidelines++1. **Always set `output`**: This returns data to the workflow+2. **Use `console.log()` for debugging**: Output is captured and returned+3. **Use ES6+ features**: Arrow functions, destructuring, spread+4. **Handle undefined**: Use `|| defaultValue` pattern+5. **Keep code focused**: One task per execution+6. **No network access**: Use http-skill for web requests+7. **Timeout**: Default 30 seconds max execution time++## Security Restrictions++- No network/fetch operations+- No file system access (no require('fs'))+- No child processes+- Limited execution time (30 seconds)+- Sandboxed environment++## Common Patterns++**Default values:**+```javascript+const data = input_data.value || 'default';+```++**Null-safe access:**+```javascript+const name = input_data?.user?.name || 'Unknown';+```++**Array to object:**+```javascript+const arr = [{id: 1, name: 'A'}, {id: 2, name: 'B'}];+const obj = Object.fromEntries(arr.map(x => [x.id, x.name]));+```++## Setup Requirements++1. Connect the **JavaScript Executor** node to Zeenie's `input-tools` handle+2. Node.js must be installed on the serverdiff --git a/server/skills/coding_agent/python-skill/SKILL.md b/server/skills/coding_agent/python-skill/SKILL.mdnew file mode 100644index 00000000..14179eea--- /dev/null+++ b/server/skills/coding_agent/python-skill/SKILL.md@@ -0,0 +1,165 @@+---+name: python-skill+description: Execute Python code for calculations, data processing, and automation. Access to math, json, datetime, collections, and more.+allowed-tools: python_code+metadata:+ author: machina+ version: "1.0"+ category: code+ icon: "🐍"+ color: "#3776AB"+---++# Python Code Execution Tool++Execute Python code for calculations, data processing, and automation tasks.++## How It Works++This skill provides instructions for the **Python Executor** tool node. Connect the **Python Executor** node to Zeenie's `input-tools` handle to enable Python code execution.++## python_code Tool++Execute Python code and return results.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| code | string | Yes | Python code to execute |++### Available Libraries++| Library | Description |+|---------|-------------|+| `math` | Mathematical functions (sqrt, pow, sin, cos, etc.) |+| `json` | JSON encoding/decoding |+| `datetime` | Date and time manipulation |+| `timedelta` | Time duration calculations |+| `re` | Regular expressions |+| `random` | Random number generation |+| `Counter` | Count hashable objects |+| `defaultdict` | Dictionary with default values |++### Built-in Variables++| Variable | Description |+|----------|-------------|+| `input_data` | Data from connected workflow nodes (dict) |+| `output` | Set this to return a result |++### Output Methods++1. **Set `output` variable**: Returns structured data to the workflow+2. **Use `print()`**: Captured as console output++### Examples++**Basic calculation:**+```json+{+ "code": "result = 25 * 4 + 10\nprint(f'Result: {result}')\noutput = result"+}+```++**Calculate tip:**+```json+{+ "code": "bill = 85.50\ntip_percent = 15\ntip = bill * (tip_percent / 100)\ntotal = bill + tip\nprint(f'Tip: ${tip:.2f}')\nprint(f'Total: ${total:.2f}')\noutput = {'tip': tip, 'total': total}"+}+```++**Generate random numbers:**+```json+{+ "code": "import random\nnumbers = [random.randint(1, 100) for _ in range(5)]\nprint(f'Random numbers: {numbers}')\noutput = numbers"+}+```++**Date calculations:**+```json+{+ "code": "from datetime import datetime, timedelta\ntoday = datetime.now()\nfuture = today + timedelta(days=30)\nresult = future.strftime('%Y-%m-%d')\nprint(f'30 days from now: {result}')\noutput = result"+}+```++**Process data:**+```json+{+ "code": "data = input_data.get('numbers', [1, 2, 3, 4, 5])\ntotal = sum(data)\naverage = total / len(data)\nprint(f'Total: {total}, Average: {average}')\noutput = {'total': total, 'average': average}"+}+```++**Parse JSON:**+```json+{+ "code": "import json\njson_str = '{\"name\": \"John\", \"age\": 30}'\ndata = json.loads(json_str)\nprint(f'Name: {data[\"name\"]}')\noutput = data"+}+```++**Count items:**+```json+{+ "code": "from collections import Counter\nitems = ['apple', 'banana', 'apple', 'cherry', 'banana', 'apple']\ncounts = dict(Counter(items))\nprint(f'Counts: {counts}')\noutput = counts"+}+```++**Text processing:**+```json+{+ "code": "import re\ntext = 'Contact: [email protected] or [email protected]'\nemails = re.findall(r'\\b[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Z|a-z]{2,}\\b', text)\nprint(f'Found emails: {emails}')\noutput = emails"+}+```++### Response Format++**Success:**+```json+{+ "success": true,+ "result": {"tip": 12.825, "total": 98.325},+ "output": "Tip: $12.83\nTotal: $98.33"+}+```++**Error:**+```json+{+ "error": "name 'undefined_var' is not defined"+}+```++## Use Cases++| Use Case | Approach |+|----------|----------|+| Math calculations | Use `math` library functions |+| Date/time operations | Use `datetime` and `timedelta` |+| Data analysis | Use list comprehensions, sum, len |+| Random generation | Use `random` library |+| Text parsing | Use `re` regular expressions |+| JSON manipulation | Use `json.loads()` and `json.dumps()` |+| Counting | Use `Counter` from collections |++## Guidelines++1. **Always set `output`**: This returns data to the workflow+2. **Use `print()` for debugging**: Output is captured and returned+3. **Keep code focused**: One task per execution+4. **Handle errors**: Use try/except for robust code+5. **No network access**: Use http-skill for web requests+6. **No file system access**: Restricted to safe operations+7. **Timeout**: Default 30 seconds max execution time++## Security Restrictions++- No network/socket operations+- No file system access outside designated areas+- No subprocess/shell commands+- Limited execution time (30 seconds)+- Sandboxed environment++## Setup Requirements++1. Connect the **Python Executor** node to Zeenie's `input-tools` handle+2. Python must be installed on the serverdiff --git a/server/skills/social_agent/whatsapp-db-skill/SKILL.md b/server/skills/social_agent/whatsapp-db-skill/SKILL.mdnew file mode 100644index 00000000..a19c0c0e--- /dev/null+++ b/server/skills/social_agent/whatsapp-db-skill/SKILL.md@@ -0,0 +1,284 @@+---+name: whatsapp-db-skill+description: Query WhatsApp database for contacts, groups, and chat history. Look up contact info, search groups, retrieve messages.+allowed-tools: whatsapp_db+metadata:+ author: machina+ version: "1.0"+ category: messaging+ icon: "🗃️"+ color: "#25D366"+---++# WhatsApp Database Tool++Query WhatsApp database for contacts, groups, and message history.++## How It Works++This skill provides instructions for the **WhatsApp DB** tool node. Connect the **WhatsApp DB** node to Zeenie's `input-tools` handle to enable database queries.++## whatsapp_db Tool++Query contacts, groups, and chat history.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| operation | string | Yes | Operation type (see below) |+| chat_type | string | For chat_history | `"individual"` or `"group"` |+| phone | string | Varies | Phone number (for chat_history individual, get_contact_info) |+| group_id | string | Varies | Group JID (for chat_history group, get_group_info) |+| query | string | No | Search query (for search_groups, list_contacts) |+| limit | int | No | Max results (varies by operation) |+| offset | int | No | Pagination offset (for chat_history) |+| message_filter | string | No | `"all"` or `"text_only"` (for chat_history) |+| group_filter | string | No | `"all"` or `"contact"` (for group chat_history) |+| sender_phone | string | No | Filter by sender (when group_filter="contact") |+| phones | string | For check_contacts | Comma-separated phone numbers |+| participant_limit | int | No | Max participants (for get_group_info, 1-100) |++### Operations++| Operation | Description | Required Fields |+|-----------|-------------|-----------------|+| `list_contacts` | List contacts with saved names | query (optional), limit |+| `get_contact_info` | Get full contact details | phone |+| `search_groups` | Search groups by name | query, limit |+| `get_group_info` | Get group details with participants | group_id |+| `chat_history` | Retrieve message history | chat_type, phone/group_id |+| `check_contacts` | Check WhatsApp registration | phones |++### Limits++| Operation | Default | Max |+|-----------|---------|-----|+| chat_history | 50 | 500 |+| search_groups | 20 | 50 |+| list_contacts | 50 | 100 |+| get_group_info participants | 50 | 100 |++**Important:** Always use small limits and specific queries to avoid context overflow.++## Operation Examples++### list_contacts++Find contacts by name.++```json+{+ "operation": "list_contacts",+ "query": "mom",+ "limit": 10+}+```++**Response:**+```json+{+ "success": true,+ "operation": "list_contacts",+ "contacts": [+ {"phone": "919876543210", "name": "Mom", "jid": "[email protected]"}+ ],+ "total": 1+}+```++### get_contact_info++Get full contact details for sending/replying.++```json+{+ "operation": "get_contact_info",+ "phone": "919876543210"+}+```++**Response:**+```json+{+ "success": true,+ "operation": "get_contact_info",+ "phone": "919876543210",+ "name": "Mom",+ "jid": "[email protected]",+ "profile_picture": "https://..."+}+```++### search_groups++Search groups by name.++```json+{+ "operation": "search_groups",+ "query": "family",+ "limit": 10+}+```++**Response:**+```json+{+ "success": true,+ "operation": "search_groups",+ "groups": [+ {"group_id": "[email protected]", "name": "Family Group", "participant_count": 5}+ ],+ "total": 1+}+```++### get_group_info++Get group details with participant list.++```json+{+ "operation": "get_group_info",+ "group_id": "[email protected]",+ "participant_limit": 20+}+```++**Response:**+```json+{+ "success": true,+ "operation": "get_group_info",+ "name": "Family Group",+ "jid": "[email protected]",+ "participants": [+ {"phone": "919876543210", "name": "Mom", "is_admin": true},+ {"phone": "919876543211", "name": "Dad", "is_admin": false}+ ],+ "total_participants": 5+}+```++### chat_history (Individual)++Get messages from an individual chat.++```json+{+ "operation": "chat_history",+ "chat_type": "individual",+ "phone": "919876543210",+ "limit": 20+}+```++### chat_history (Group)++Get messages from a group chat.++```json+{+ "operation": "chat_history",+ "chat_type": "group",+ "group_id": "[email protected]",+ "message_filter": "text_only",+ "limit": 50+}+```++**Response:**+```json+{+ "success": true,+ "operation": "chat_history",+ "messages": [+ {+ "index": 1,+ "message_id": "ABC123",+ "sender": "[email protected]",+ "sender_name": "Mom",+ "text": "Hello!",+ "timestamp": "2025-01-30T12:00:00",+ "is_from_me": false+ }+ ],+ "total": 50,+ "has_more": true+}+```++### check_contacts++Check if phone numbers have WhatsApp.++```json+{+ "operation": "check_contacts",+ "phones": "1234567890,0987654321"+}+```++**Response:**+```json+{+ "success": true,+ "operation": "check_contacts",+ "results": [+ {"phone": "1234567890", "registered": true, "jid": "[email protected]"},+ {"phone": "0987654321", "registered": false}+ ]+}+```++## Common Workflows++### Find and message someone by name++1. Use `list_contacts` with query to find the person+2. Get their phone number from the result+3. Use `whatsapp_send` tool with the phone number++### Get recent messages from a contact++1. Use `chat_history` with chat_type="individual"+2. Set appropriate limit for desired history depth++### Find and message a group++1. Use `search_groups` to find the group by name+2. Get the group_id from the result+3. Use `whatsapp_send` tool with recipient_type="group"++### See who's in a group++1. Use `get_group_info` with the group_id+2. Set participant_limit to control output size++## Guidelines++1. **Phone numbers**: Always use without + prefix, just digits+2. **Group IDs**: JID format ending in `@g.us`+3. **Limits**: Use small limits to avoid context overflow+4. **Queries**: Be specific to narrow results+5. **Pagination**: Use offset to page through chat_history++## Error Responses++```json+{+ "error": "Phone number is required for chat_type='individual'"+}+```++```json+{+ "error": "group_id is required for get_group_info"+}+```++## Setup Requirements++1. Connect the **WhatsApp DB** node to Zeenie's `input-tools` handle+2. Ensure WhatsApp is connected (green status indicator in Credentials)diff --git a/server/skills/social_agent/whatsapp-send-skill/SKILL.md b/server/skills/social_agent/whatsapp-send-skill/SKILL.mdnew file mode 100644index 00000000..925af159--- /dev/null+++ b/server/skills/social_agent/whatsapp-send-skill/SKILL.md@@ -0,0 +1,180 @@+---+name: whatsapp-send-skill+description: Send WhatsApp messages to contacts or groups. Supports text, images, videos, audio, documents, stickers, locations, and contacts.+allowed-tools: whatsapp_send+metadata:+ author: machina+ version: "1.0"+ category: messaging+ icon: "📤"+ color: "#25D366"+---++# WhatsApp Send Tool++Send messages to WhatsApp contacts or groups.++## How It Works++This skill provides instructions for the **WhatsApp Send** tool node. Connect the **WhatsApp Send** node to Zeenie's `input-tools` handle to enable message sending.++## whatsapp_send Tool++Send messages to individual contacts or groups.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| recipient_type | string | Yes | `"phone"` for individual or `"group"` for group chat |+| phone | string | If phone | Phone number without + prefix (e.g., `1234567890`) |+| group_id | string | If group | Group JID (e.g., `[email protected]`) |+| message_type | string | Yes | Message type (see below) |+| message | string | If text | Text message content |+| media_url | string | If media | URL for image/video/audio/document/sticker |+| caption | string | No | Caption for media messages |+| latitude | float | If location | Latitude coordinate |+| longitude | float | If location | Longitude coordinate |+| location_name | string | No | Display name for location |+| address | string | No | Address text for location |+| contact_name | string | If contact | Contact display name |+| vcard | string | If contact | vCard 3.0 format string |++### Message Types++| Type | Required Fields | Description |+|------|-----------------|-------------|+| `text` | message | Plain text message |+| `image` | media_url | Image file (JPG, PNG, GIF) |+| `video` | media_url | Video file (MP4) |+| `audio` | media_url | Audio file (MP3, OGG, WAV) |+| `document` | media_url | Any file type |+| `sticker` | media_url | Sticker image (WebP) |+| `location` | latitude, longitude | GPS coordinates |+| `contact` | contact_name, vcard | Contact card |++### Examples++**Send text message to contact:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "text",+ "message": "Hello! How are you?"+}+```++**Send image with caption:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "image",+ "media_url": "https://example.com/photo.jpg",+ "caption": "Check out this photo!"+}+```++**Send to group:**+```json+{+ "recipient_type": "group",+ "group_id": "[email protected]",+ "message_type": "text",+ "message": "Hello everyone!"+}+```++**Send video:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "video",+ "media_url": "https://example.com/video.mp4",+ "caption": "Check this video"+}+```++**Send document:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "document",+ "media_url": "https://example.com/report.pdf",+ "caption": "Here's the report"+}+```++**Send location:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "location",+ "latitude": 37.7749,+ "longitude": -122.4194,+ "location_name": "San Francisco",+ "address": "San Francisco, CA, USA"+}+```++**Send contact card:**+```json+{+ "recipient_type": "phone",+ "phone": "1234567890",+ "message_type": "contact",+ "contact_name": "John Doe",+ "vcard": "BEGIN:VCARD\nVERSION:3.0\nFN:John Doe\nTEL:+1234567890\nEND:VCARD"+}+```++### Response Format++```json+{+ "success": true,+ "recipient": "1234567890",+ "recipient_type": "phone",+ "message_type": "text",+ "details": {+ "status": "sent",+ "preview": "Hello! How are you?",+ "timestamp": "2025-01-30T12:00:00"+ }+}+```++### Error Response++```json+{+ "error": "Phone number is required for recipient_type='phone'"+}+```++## Guidelines++1. **Phone numbers**: Always use without + prefix, just digits (e.g., `919876543210`)+2. **Group IDs**: Use JID format ending in `@g.us` (e.g., `[email protected]`)+3. **Media URLs**: Must be publicly accessible URLs (https://)+4. **vCard format**: Use vCard 3.0 specification for contact cards+5. **Message length**: Text messages can be up to 4096 characters+6. **Media size**: Check WhatsApp limits for media file sizes++## Common Use Cases++- Send automated notifications to contacts+- Forward messages to groups+- Share media files+- Send location information+- Share contact information++## Setup Requirements++1. Connect the **WhatsApp Send** node to Zeenie's `input-tools` handle+2. Ensure WhatsApp is connected (green status indicator in Credentials)+3. The recipient must have WhatsApp installeddiff --git a/server/skills/task_agent/cron-scheduler-skill/SKILL.md b/server/skills/task_agent/cron-scheduler-skill/SKILL.mdnew file mode 100644index 00000000..c0bb87b5--- /dev/null+++ b/server/skills/task_agent/cron-scheduler-skill/SKILL.md@@ -0,0 +1,215 @@+---+name: cron-scheduler-skill+description: Schedule recurring tasks using cron expressions. Run workflows on schedules (daily, weekly, hourly, etc.).+allowed-tools: cron_scheduler+metadata:+ author: machina+ version: "1.0"+ category: automation+ icon: "📅"+ color: "#8B5CF6"+---++# Cron Scheduler Tool++Schedule recurring tasks using cron expressions.++## How It Works++This skill provides instructions for the **Cron Scheduler** tool node. Connect the **Cron Scheduler** node to Zeenie's `input-tools` handle or use as a workflow trigger.++## cron_scheduler Tool++Create recurring schedules using cron expressions.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| expression | string | Yes | Cron expression (5 fields) |+| timezone | string | No | Timezone (default: UTC) |++### Cron Expression Format++```+* * * * *+│ │ │ │ │+│ │ │ │ └── Day of week (0-7, Sun=0 or 7)+│ │ │ └──── Month (1-12)+│ │ └────── Day of month (1-31)+│ └──────── Hour (0-23)+└────────── Minute (0-59)+```++### Special Characters++| Character | Meaning | Example |+|-----------|---------|---------|+| `*` | Any value | `* * * * *` (every minute) |+| `,` | List of values | `1,15 * * * *` (minute 1 and 15) |+| `-` | Range | `1-5 * * * *` (minutes 1-5) |+| `/` | Step values | `*/15 * * * *` (every 15 minutes) |++### Common Patterns++| Pattern | Description | Cron Expression |+|---------|-------------|-----------------|+| Every minute | Runs each minute | `* * * * *` |+| Every 5 minutes | Runs at :00, :05, :10... | `*/5 * * * *` |+| Every 15 minutes | Runs at :00, :15, :30, :45 | `*/15 * * * *` |+| Every hour | Runs at minute 0 | `0 * * * *` |+| Every day at 9 AM | Morning job | `0 9 * * *` |+| Every day at midnight | Nightly job | `0 0 * * *` |+| Weekdays at 9 AM | Mon-Fri morning | `0 9 * * 1-5` |+| Every Monday | Weekly on Monday | `0 0 * * 1` |+| First of month | Monthly job | `0 0 1 * *` |+| Every Sunday at 6 PM | Weekly Sunday evening | `0 18 * * 0` |+| Multiple times daily | 8am, noon, 6pm | `0 8,12,18 * * *` |++### Examples++**Every day at 9 AM:**+```json+{+ "expression": "0 9 * * *",+ "timezone": "America/New_York"+}+```++**Every 30 minutes:**+```json+{+ "expression": "*/30 * * * *"+}+```++**Weekdays at 6 PM:**+```json+{+ "expression": "0 18 * * 1-5",+ "timezone": "Europe/London"+}+```++**Every Monday at 10 AM:**+```json+{+ "expression": "0 10 * * 1",+ "timezone": "Asia/Tokyo"+}+```++**First day of each month:**+```json+{+ "expression": "0 0 1 * *"+}+```++### Response Format++**Schedule created:**+```json+{+ "success": true,+ "message": "Cron schedule created",+ "expression": "0 9 * * *",+ "timezone": "America/New_York",+ "next_run": "2025-01-31T09:00:00-05:00",+ "description": "At 09:00 AM, every day"+}+```++**Schedule triggered:**+```json+{+ "success": true,+ "triggered": true,+ "message": "Cron schedule triggered",+ "expression": "0 9 * * *",+ "triggered_at": "2025-01-30T09:00:00Z"+}+```++### Error Response++```json+{+ "error": "Invalid cron expression: too few fields"+}+```++## Timezone Reference++| Timezone | Description |+|----------|-------------|+| `UTC` | Universal Time (default) |+| `America/New_York` | Eastern US |+| `America/Los_Angeles` | Pacific US |+| `Europe/London` | UK |+| `Europe/Paris` | Central Europe |+| `Asia/Tokyo` | Japan |+| `Asia/Shanghai` | China |+| `Australia/Sydney` | Australia Eastern |++## Use Cases++| Use Case | Expression | Description |+|----------|------------|-------------|+| Daily report | `0 9 * * *` | Generate daily reports |+| Hourly sync | `0 * * * *` | Sync data hourly |+| Weekly backup | `0 2 * * 0` | Sunday at 2 AM |+| Business hours check | `*/30 9-17 * * 1-5` | Every 30 min, 9-5 Mon-Fri |+| Monthly cleanup | `0 0 1 * *` | First of month |++## Common Workflows++### Daily notification++1. Set cron for desired time (e.g., `0 9 * * *`)+2. Cron triggers → workflow runs+3. Send notification to user++### Scheduled data sync++1. Set cron for sync interval (e.g., `0 * * * *`)+2. Cron triggers → fetch data+3. Process and store data++### Weekly report++1. Set cron for weekly (e.g., `0 10 * * 1`)+2. Cron triggers → generate report+3. Send report via email/WhatsApp++## Workflow-Based Scheduling++In this system, scheduling works through:++1. **Trigger Node**: Use Cron Scheduler as workflow start+2. **Deployment**: Deploy workflow to activate schedule+3. **Cancellation**: Undeploy workflow to stop schedule++Each trigger creates independent workflow runs.++## Best Practices++1. **Use UTC for global**: Avoid timezone confusion+2. **Consider load**: Don't schedule many jobs at :00+3. **Stagger jobs**: Use :05, :10 instead of all at :00+4. **Test expressions**: Verify with online cron tools+5. **Document schedules**: Keep track of what runs when++## Limitations++- Requires workflow deployment to activate+- Cannot schedule past events+- Minimum granularity is 1 minute+- Complex conditions need multiple schedules++## Setup Requirements++1. Connect the **Cron Scheduler** node to Zeenie's `input-tools` handle+2. Or use as workflow trigger (first node)+3. Deploy workflow to activate the schedule+4. Undeploy to cancel the schedulediff --git a/server/skills/task_agent/task-manager-skill/SKILL.md b/server/skills/task_agent/task-manager-skill/SKILL.mdnew file mode 100644index 00000000..cb9f9c88--- /dev/null+++ b/server/skills/task_agent/task-manager-skill/SKILL.md@@ -0,0 +1,251 @@+---+name: task-manager-skill+description: Manage delegated tasks. List active tasks, check task status, get results from completed delegations, and mark tasks as done.+allowed-tools: task_manager+metadata:+ author: machina+ version: "1.0"+ category: automation+ icon: "📋"+ color: "#F59E0B"+---++# Task Manager Tool++Manage and track delegated agent tasks.++## How It Works++This skill provides instructions for the **Task Manager** tool node. Connect the **Task Manager** node to Zeenie's `input-tools` handle to enable task management operations.++## task_manager Tool++List, check, and manage delegated tasks.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| operation | string | Yes | `"list_tasks"`, `"get_task"`, or `"mark_done"` |+| task_id | string | For get_task, mark_done | Specific task ID to query |+| status_filter | string | No | Filter by status: `"running"`, `"completed"`, `"error"` |++### Operations++| Operation | Description | Required Fields |+|-----------|-------------|-----------------|+| `list_tasks` | List all tracked tasks | status_filter (optional) |+| `get_task` | Get details for specific task | task_id |+| `mark_done` | Remove task from tracking | task_id |++### Task States++| Status | Description |+|--------|-------------|+| `running` | Task is currently executing |+| `completed` | Task finished successfully |+| `error` | Task failed with error |+| `cancelled` | Task was cancelled |++### Examples++**List all tasks:**+```json+{+ "operation": "list_tasks"+}+```++**List only running tasks:**+```json+{+ "operation": "list_tasks",+ "status_filter": "running"+}+```++**List completed tasks:**+```json+{+ "operation": "list_tasks",+ "status_filter": "completed"+}+```++**Get specific task details:**+```json+{+ "operation": "get_task",+ "task_id": "delegated_agent_abc12345"+}+```++**Mark task as done:**+```json+{+ "operation": "mark_done",+ "task_id": "delegated_agent_abc12345"+}+```++### Response Formats++**list_tasks response:**+```json+{+ "success": true,+ "operation": "list_tasks",+ "tasks": [+ {+ "task_id": "delegated_coding_agent_abc12345",+ "status": "completed",+ "agent_name": "Coding Agent",+ "result_summary": "Generated Python function for data processing...",+ "active": false+ },+ {+ "task_id": "delegated_web_agent_def67890",+ "status": "running",+ "active": true+ }+ ],+ "count": 2,+ "running": 1,+ "completed": 1,+ "errors": 0+}+```++**get_task response (completed):**+```json+{+ "success": true,+ "operation": "get_task",+ "task_id": "delegated_coding_agent_abc12345",+ "status": "completed",+ "agent_name": "Coding Agent",+ "result": "Here is the Python function you requested:\n\ndef process_data(items):\n return [x * 2 for x in items]"+}+```++**get_task response (running):**+```json+{+ "success": true,+ "operation": "get_task",+ "task_id": "delegated_web_agent_def67890",+ "status": "running",+ "agent_name": "Web Agent"+}+```++**get_task response (error):**+```json+{+ "success": true,+ "operation": "get_task",+ "task_id": "delegated_agent_xyz99999",+ "status": "error",+ "agent_name": "Social Agent",+ "error": "Failed to connect to WhatsApp service"+}+```++**mark_done response:**+```json+{+ "success": true,+ "operation": "mark_done",+ "task_id": "delegated_coding_agent_abc12345",+ "removed": true,+ "message": "Task delegated_coding_agent_abc12345 marked as done and removed from tracking"+}+```++### Error Response++```json+{+ "success": false,+ "error": "task_id is required for get_task operation"+}+```++```json+{+ "success": false,+ "error": "Task delegated_agent_notfound not found",+ "task_id": "delegated_agent_notfound"+}+```++## Use Cases++| Use Case | Operation | Description |+|----------|-----------|-------------|+| Monitor progress | list_tasks | See all active delegations |+| Check result | get_task | Get completed task output |+| Verify completion | get_task | Confirm task finished |+| Clean up | mark_done | Remove processed tasks |+| Error handling | list_tasks + filter | Find failed tasks |++## Common Workflows++### Check on delegated work++1. Delegate task to sub-agent+2. Wait or continue with other work+3. Use `list_tasks` to see status+4. Use `get_task` to retrieve result++### Process all completed tasks++1. Use `list_tasks` with `status_filter: "completed"`+2. For each task, use `get_task` to get full result+3. Process the results+4. Use `mark_done` to clean up++### Handle errors++1. Use `list_tasks` with `status_filter: "error"`+2. Review failed tasks+3. Decide to retry or mark_done+4. Optionally re-delegate failed work++## Integration with Agent Delegation++When a parent agent delegates work:++1. `delegate_to_<agent>` tool returns `task_id`+2. Child agent runs in background+3. Parent can check status with `task_manager`+4. Results persist until `mark_done`++### Task ID Format++Task IDs follow the pattern:+```+delegated_<node_id>_<random_hex>+```++Example: `delegated_coding_agent_1_abc12345`++## Best Practices++1. **Track task IDs**: Store returned task_ids for later reference+2. **Poll appropriately**: Don't check too frequently+3. **Handle all states**: Account for running, completed, and error+4. **Clean up**: Use mark_done after processing results+5. **Check errors**: Review failed tasks before marking done++## Limitations++- Tasks not persistent across server restarts (in-memory)+- Results may be truncated if very large (4000 char limit in responses)+- Cannot cancel running tasks (only track status)++## Setup Requirements++1. Connect the **Task Manager** node to Zeenie's `input-tools` handle+2. Works with any agent that uses delegation+3. Task IDs are returned when delegating to sub-agentsdiff --git a/server/skills/task_agent/timer-skill/SKILL.md b/server/skills/task_agent/timer-skill/SKILL.mdnew file mode 100644index 00000000..055c90d5--- /dev/null+++ b/server/skills/task_agent/timer-skill/SKILL.md@@ -0,0 +1,168 @@+---+name: timer-skill+description: Set one-time delayed timers. Execute actions after a specified duration (seconds, minutes, hours, days).+allowed-tools: timer+metadata:+ author: machina+ version: "1.0"+ category: automation+ icon: "⏱️"+ color: "#10B981"+---++# Timer Tool++Set one-time delayed execution timers.++## How It Works++This skill provides instructions for the **Timer** tool node. Connect the **Timer** node to Zeenie's `input-tools` handle to enable timed delays.++## timer Tool++Create a one-time timer that triggers after a specified duration.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| duration | number | Yes | Time value for the delay |+| unit | string | Yes | Time unit: `"seconds"`, `"minutes"`, `"hours"`, `"days"` |++### Time Units++| Unit | Range | Use Case |+|------|-------|----------|+| `seconds` | 1-3600 | Short delays, testing |+| `minutes` | 1-1440 | Task reminders, short waits |+| `hours` | 1-168 | Scheduled checks, delayed notifications |+| `days` | 1-30 | Long-term reminders, follow-ups |++### Examples++**30 second delay:**+```json+{+ "duration": 30,+ "unit": "seconds"+}+```++**5 minute reminder:**+```json+{+ "duration": 5,+ "unit": "minutes"+}+```++**1 hour delay:**+```json+{+ "duration": 1,+ "unit": "hours"+}+```++**2 day follow-up:**+```json+{+ "duration": 2,+ "unit": "days"+}+```++### Response Format++**Timer set:**+```json+{+ "success": true,+ "message": "Timer set for 5 minutes",+ "duration": 5,+ "unit": "minutes",+ "duration_seconds": 300,+ "trigger_at": "2025-01-30T12:05:00Z"+}+```++**Timer triggered:**+```json+{+ "success": true,+ "triggered": true,+ "message": "Timer completed after 5 minutes",+ "duration": 5,+ "unit": "minutes"+}+```++### Error Response++```json+{+ "error": "Duration must be a positive number"+}+```++## Use Cases++| Use Case | Duration | Unit | Description |+|----------|----------|------|-------------|+| Quick test | 10-30 | seconds | Testing workflow execution |+| Reminder | 5-30 | minutes | Short-term reminders |+| Rate limit | 60 | seconds | Wait between API calls |+| Daily check | 24 | hours | Daily automation |+| Follow-up | 2-7 | days | Long-term follow-ups |++## Common Workflows++### Delayed notification++1. Receive user request for reminder+2. Set timer with requested duration+3. Timer triggers → send notification++### Rate-limited API calls++1. Make API call+2. Set 60-second timer+3. Timer triggers → make next call++### Scheduled workflow++1. Set timer for desired delay+2. Timer triggers → execute workflow nodes++## Integration with Workflow++When used as a trigger node in a workflow:+1. Deploy the workflow+2. Timer countdown begins+3. After duration, downstream nodes execute++When used as AI tool:+1. Agent decides to set timer+2. Timer is scheduled+3. Agent can proceed with other work+4. Notification when timer triggers++## Best Practices++1. **Use appropriate units**: Don't use 3600 seconds when 1 hour is clearer+2. **Consider time zones**: Timers use server time+3. **Account for drift**: Long timers may have slight variance+4. **Test short first**: Start with seconds before days+5. **Chain timers carefully**: Avoid infinite loops++## Limitations++- Timers are not persistent across server restarts+- Maximum practical delay depends on server uptime+- Timers are one-time (use cron for recurring)++## Setup Requirements++1. Connect the **Timer** node to Zeenie's `input-tools` handle+2. For workflow triggers, connect Timer as the first node+3. Deploy workflow to activate timerdiff --git a/server/skills/travel_agent/geocoding-skill/SKILL.md b/server/skills/travel_agent/geocoding-skill/SKILL.mdnew file mode 100644index 00000000..86417520--- /dev/null+++ b/server/skills/travel_agent/geocoding-skill/SKILL.md@@ -0,0 +1,186 @@+---+name: geocoding-skill+description: Convert addresses to coordinates (geocoding) or coordinates to addresses (reverse geocoding) using Google Maps API.+allowed-tools: add_locations+metadata:+ author: machina+ version: "1.0"+ category: location+ icon: "📍"+ color: "#4285F4"+---++# Geocoding Tool++Convert addresses to GPS coordinates or coordinates to addresses using Google Maps Geocoding API.++## How It Works++This skill provides instructions for the **Add Locations** (gmaps_locations) tool node. Connect the **Add Locations** node to Zeenie's `input-tools` handle to enable geocoding operations.++## add_locations Tool++Geocode addresses or reverse geocode coordinates.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| service_type | string | Yes | `"geocode"` (address to coordinates) or `"reverse_geocode"` (coordinates to address) |+| address | string | If geocode | Address to convert to coordinates |+| lat | float | If reverse_geocode | Latitude coordinate |+| lng | float | If reverse_geocode | Longitude coordinate |++### Operations++| Service Type | Input | Output |+|--------------|-------|--------|+| `geocode` | Address string | Coordinates (lat, lng) |+| `reverse_geocode` | Coordinates (lat, lng) | Formatted address |++### Examples++**Geocode an address:**+```json+{+ "service_type": "geocode",+ "address": "1600 Amphitheatre Parkway, Mountain View, CA"+}+```++**Geocode a landmark:**+```json+{+ "service_type": "geocode",+ "address": "Eiffel Tower, Paris"+}+```++**Geocode a city:**+```json+{+ "service_type": "geocode",+ "address": "New York City, USA"+}+```++**Reverse geocode (coordinates to address):**+```json+{+ "service_type": "reverse_geocode",+ "lat": 48.8584,+ "lng": 2.2945+}+```++### Response Format++**Geocode response:**+```json+{+ "success": true,+ "service_type": "geocoding",+ "input": {"address": "Eiffel Tower, Paris"},+ "results": [+ {+ "formatted_address": "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",+ "geometry": {+ "location": {"lat": 48.8583701, "lng": 2.2944813}+ },+ "address_components": [+ {"long_name": "5", "short_name": "5", "types": ["street_number"]},+ {"long_name": "Avenue Anatole France", "short_name": "Av. Anatole France", "types": ["route"]},+ {"long_name": "Paris", "short_name": "Paris", "types": ["locality"]}+ ]+ }+ ],+ "status": "OK"+}+```++**Reverse geocode response:**+```json+{+ "success": true,+ "service_type": "reverse_geocoding",+ "input": {"lat": 48.8584, "lng": 2.2945},+ "results": [+ {+ "formatted_address": "Champ de Mars, 5 Av. Anatole France, 75007 Paris, France",+ "geometry": {+ "location": {"lat": 48.8583701, "lng": 2.2944813}+ },+ "address_components": [...]+ }+ ],+ "status": "OK"+}+```++### Error Response++```json+{+ "error": "address is required for geocoding"+}+```++```json+{+ "error": "Geocoding failed: ZERO_RESULTS"+}+```++## Use Cases++| Use Case | Service Type | Description |+|----------|--------------|-------------|+| Find location | geocode | Get coordinates for an address |+| Validate address | geocode | Get standardized address format |+| Get address | reverse_geocode | Find address from GPS coordinates |+| Location lookup | geocode | Search for landmarks, POIs |++## Common Workflows++### Get coordinates for sending location via WhatsApp++1. Use `geocode` to convert address to coordinates+2. Extract `lat` and `lng` from response+3. Use `whatsapp_send` with message_type="location"++### Identify a GPS location++1. Use `reverse_geocode` with lat/lng coordinates+2. Get formatted address from response++### Search for nearby places++1. Use `geocode` to get coordinates from address+2. Use `nearby_places` tool with those coordinates++## Address Format Guidelines++**Good address formats:**+- `"123 Main Street, New York, NY 10001"`+- `"Eiffel Tower, Paris, France"`+- `"Times Square, NYC"`+- `"Tokyo Station, Japan"`++**Tips:**+- Include city and country for better accuracy+- Landmarks and POIs work well+- Postal codes improve precision+- Use local language or English++## Coordinate Guidelines++- Latitude range: -90 to 90+- Longitude range: -180 to 180+- More decimal places = higher precision+- Standard precision: 6 decimal places++## Setup Requirements++1. Connect the **Add Locations** (gmaps_locations) node to Zeenie's `input-tools` handle+2. Google Maps API key must be configured in Credentials+3. Geocoding API must be enabled in Google Cloud Consolediff --git a/server/skills/travel_agent/nearby-places-skill/SKILL.md b/server/skills/travel_agent/nearby-places-skill/SKILL.mdnew file mode 100644index 00000000..ede48929--- /dev/null+++ b/server/skills/travel_agent/nearby-places-skill/SKILL.md@@ -0,0 +1,234 @@+---+name: nearby-places-skill+description: Search for nearby places like restaurants, cafes, stores, and services using Google Places API. Find places by type and location.+allowed-tools: show_nearby_places+metadata:+ author: machina+ version: "1.0"+ category: location+ icon: "🗺️"+ color: "#34A853"+---++# Nearby Places Tool++Search for places near a location using Google Places API.++## How It Works++This skill provides instructions for the **Show Nearby Places** (gmaps_nearby_places) tool node. Connect the **Show Nearby Places** node to Zeenie's `input-tools` handle to enable place search.++## show_nearby_places Tool++Search for places near GPS coordinates.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| lat | float | Yes | Center latitude for search |+| lng | float | Yes | Center longitude for search |+| radius | int | No | Search radius in meters (default: 500, max: 50000) |+| type | string | No | Place type to search for (default: "restaurant") |+| keyword | string | No | Keyword to filter results |++### Place Types++**Food & Drink:**+- `restaurant` - Restaurants+- `cafe` - Coffee shops+- `bar` - Bars and pubs+- `bakery` - Bakeries+- `meal_takeaway` - Takeout restaurants++**Shopping:**+- `store` - General stores+- `supermarket` - Grocery stores+- `shopping_mall` - Shopping centers+- `clothing_store` - Clothing shops+- `convenience_store` - Convenience stores++**Services:**+- `bank` - Banks+- `atm` - ATMs+- `gas_station` - Gas/petrol stations+- `pharmacy` - Pharmacies+- `post_office` - Post offices++**Health:**+- `hospital` - Hospitals+- `doctor` - Doctor's offices+- `dentist` - Dental clinics++**Transport:**+- `bus_station` - Bus stations+- `train_station` - Train stations+- `airport` - Airports+- `taxi_stand` - Taxi stands+- `parking` - Parking lots++**Entertainment:**+- `movie_theater` - Cinemas+- `gym` - Fitness centers+- `park` - Parks+- `museum` - Museums+- `zoo` - Zoos++**Accommodation:**+- `hotel` - Hotels+- `lodging` - All lodging types++### Examples++**Find nearby restaurants:**+```json+{+ "lat": 40.7484,+ "lng": -73.9857,+ "radius": 500,+ "type": "restaurant"+}+```++**Find coffee shops:**+```json+{+ "lat": 37.7749,+ "lng": -122.4194,+ "type": "cafe",+ "radius": 1000+}+```++**Find specific chain:**+```json+{+ "lat": 37.7749,+ "lng": -122.4194,+ "type": "cafe",+ "keyword": "starbucks"+}+```++**Find gas stations:**+```json+{+ "lat": 34.0522,+ "lng": -118.2437,+ "type": "gas_station",+ "radius": 2000+}+```++**Find hotels:**+```json+{+ "lat": 51.5074,+ "lng": -0.1278,+ "type": "hotel",+ "radius": 1000+}+```++### Response Format++```json+{+ "success": true,+ "type": "restaurant",+ "search_parameters": {+ "location": {"lat": 40.7484, "lng": -73.9857},+ "radius": 500,+ "type": "restaurant"+ },+ "results": [+ {+ "name": "Example Restaurant",+ "vicinity": "123 Main St, New York",+ "rating": 4.5,+ "user_ratings_total": 150,+ "price_level": 2,+ "geometry": {+ "location": {"lat": 40.7485, "lng": -73.9860}+ },+ "types": ["restaurant", "food", "establishment"],+ "opening_hours": {"open_now": true}+ }+ ],+ "total_results": 10,+ "status": "OK"+}+```++### Response Fields++| Field | Description |+|-------|-------------|+| name | Place name |+| vicinity | Address or location description |+| rating | Average rating (1-5) |+| user_ratings_total | Number of reviews |+| price_level | Price level (0-4, 0=free, 4=very expensive) |+| geometry.location | Place coordinates |+| types | Place type categories |+| opening_hours.open_now | Whether currently open |++### Error Response++```json+{+ "error": "lat and lng are required for nearby places search"+}+```++## Price Level Guide++| Level | Meaning |+|-------|---------|+| 0 | Free |+| 1 | Inexpensive ($) |+| 2 | Moderate ($$) |+| 3 | Expensive ($$$) |+| 4 | Very Expensive ($$$$) |++## Common Workflows++### Find places near an address++1. Use `geocoding` tool to convert address to coordinates+2. Use `nearby_places` with the lat/lng from step 1++### Find best-rated places++1. Search with appropriate type and radius+2. Sort results by rating in response+3. Filter by minimum rating threshold++### Find open places now++1. Search with desired type+2. Check `opening_hours.open_now` in results++## Radius Guidelines++| Radius | Use Case |+|--------|----------|+| 100-500m | Walking distance |+| 500-1000m | Short walk |+| 1000-2000m | 5-10 min walk |+| 2000-5000m | Driving distance |+| 5000-50000m | City-wide search |++## Tips++1. **Use specific types**: "cafe" not "coffee"+2. **Add keywords**: Filter by chain name or cuisine+3. **Adjust radius**: Start small, expand if needed+4. **Check ratings**: Higher ratings usually mean better quality+5. **Verify open_now**: Important for time-sensitive searches++## Setup Requirements++1. Connect the **Show Nearby Places** (gmaps_nearby_places) node to Zeenie's `input-tools` handle+2. Google Maps API key must be configured in Credentials+3. Places API must be enabled in Google Cloud Consolediff --git a/server/skills/web_agent/http-request-skill/SKILL.md b/server/skills/web_agent/http-request-skill/SKILL.mdnew file mode 100644index 00000000..a9876b44--- /dev/null+++ b/server/skills/web_agent/http-request-skill/SKILL.md@@ -0,0 +1,211 @@+---+name: http-request-skill+description: Make HTTP requests to external APIs and web services. Supports GET, POST, PUT, DELETE, PATCH methods with headers and JSON body.+allowed-tools: http_request+metadata:+ author: machina+ version: "1.0"+ category: integration+ icon: "🌐"+ color: "#EF4444"+---++# HTTP Request Tool++Make HTTP requests to external APIs and web services.++## How It Works++This skill provides instructions for the **HTTP Request** tool node. Connect the **HTTP Request** node to Zeenie's `input-tools` handle to enable API calls.++## http_request Tool++Make an HTTP request to any URL.++### Schema Fields++| Field | Type | Required | Description |+|-------|------|----------|-------------|+| url | string | Yes | Full URL to request (e.g., `https://api.example.com/data`) |+| method | string | No | HTTP method: `GET`, `POST`, `PUT`, `DELETE`, `PATCH` (default: `GET`) |+| body | object | No | Request body as JSON object (for POST/PUT/PATCH) |++### Node Parameters++Additional options can be configured on the node:++| Parameter | Description |+|-----------|-------------|+| headers | Custom headers as JSON (e.g., `{"Authorization": "Bearer token"}`) |+| base_url | Base URL prepended to the url parameter |++### Response Format++```json+{+ "status": 200,+ "data": { "key": "value" },+ "url": "https://api.example.com/data",+ "method": "GET"+}+```++### Examples++**GET request (fetch data):**+```json+{+ "url": "https://api.example.com/users/123",+ "method": "GET"+}+```++**POST request (create resource):**+```json+{+ "url": "https://api.example.com/users",+ "method": "POST",+ "body": {+ "name": "John Doe",+ "email": "[email protected]"+ }+}+```++**PUT request (update resource):**+```json+{+ "url": "https://api.example.com/users/123",+ "method": "PUT",+ "body": {+ "name": "John Updated"+ }+}+```++**DELETE request:**+```json+{+ "url": "https://api.example.com/users/123",+ "method": "DELETE"+}+```++**PATCH request (partial update):**+```json+{+ "url": "https://api.example.com/users/123",+ "method": "PATCH",+ "body": {+ "status": "active"+ }+}+```++### Real-World Examples++**Get Bitcoin price:**+```json+{+ "url": "https://api.coindesk.com/v1/bpi/currentprice.json",+ "method": "GET"+}+```++**Get weather:**+```json+{+ "url": "https://api.openweathermap.org/data/2.5/weather?q=London&appid=YOUR_KEY",+ "method": "GET"+}+```++**Post to webhook:**+```json+{+ "url": "https://hooks.slack.com/services/xxx",+ "method": "POST",+ "body": {+ "text": "Hello from MachinaOS!"+ }+}+```++**Check website status:**+```json+{+ "url": "https://example.com",+ "method": "GET"+}+```++### Error Responses++**Timeout:**+```json+{+ "error": "Request timed out"+}+```++**Connection failed:**+```json+{+ "error": "Connection failed: Unable to reach host"+}+```++**HTTP error:**+```json+{+ "status": 404,+ "data": "Not Found",+ "url": "https://api.example.com/missing",+ "method": "GET"+}+```++## HTTP Status Codes++| Status | Meaning | Action |+|--------|---------|--------|+| 200-299 | Success | Process the response data |+| 400 | Bad Request | Check request parameters |+| 401 | Unauthorized | Check API key/authentication |+| 403 | Forbidden | Insufficient permissions |+| 404 | Not Found | Check URL path |+| 429 | Too Many Requests | Rate limited, wait and retry |+| 500-599 | Server Error | External service issue |++## Use Cases++| Use Case | Method | Description |+|----------|--------|-------------|+| Fetch data | GET | Retrieve resources |+| Create resource | POST | Add new data |+| Update resource | PUT/PATCH | Modify existing data |+| Delete resource | DELETE | Remove data |+| Health check | GET | Verify service availability |+| Webhook trigger | POST | Send events to services |++## Guidelines++1. **URLs**: Must be fully qualified with protocol (https://)+2. **Authentication**: Use node headers for API keys/tokens+3. **Timeout**: Default 30 seconds+4. **JSON body**: Automatically serialized for POST/PUT/PATCH+5. **Response**: JSON responses are automatically parsed++## Security Notes++1. Never expose API keys in responses to users+2. Validate URLs before making requests+3. Avoid internal/private network addresses (localhost, 192.168.x.x)+4. Respect rate limits of external services+5. Don't store sensitive data from API responses++## Setup Requirements++1. Connect the **HTTP Request** node to Zeenie's `input-tools` handle+2. Configure authentication headers on the node if needed+3. Ensure network access to target APIsdiff --git a/server/skills/assistant/web-search-skill/SKILL.md b/server/skills/web_agent/web-search-skill/SKILL.mdsimilarity index 100%rename from server/skills/assistant/web-search-skill/SKILL.mdrename to server/skills/web_agent/web-search-skill/SKILL.md