Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
refactor: Extract shared utilities and initialize credentials DB on startup
trohitg41ed4d8e66a7
diff --git a/scripts/clean.js b/scripts/clean.jsindex dfad4815..d3c2cc09 100755--- a/scripts/clean.js+++ b/scripts/clean.js@@ -2,13 +2,19 @@/*** Cross-platform clean script using Node.js native APIs.* Works on: Windows, macOS, Linux, WSL, Git Bash+ *+ * Kills running processes on configured ports before cleaning to avoid+ * locked files (especially .venv on Windows).*/import { rmSync, existsSync } from 'fs';-import { resolve, dirname } from 'path';-import { fileURLToPath } from 'url';--const __dirname = dirname(fileURLToPath(import.meta.url));-const ROOT = resolve(__dirname, '..');+import { resolve } from 'path';+import {+ ROOT,+ loadEnvConfig,+ killPort,+ killMachinaProcesses,+ sleep,+} from './utils.js';const targets = ['node_modules',@@ -17,22 +23,56 @@ const targets = ['client/.vite','server/data','server/.venv',+ 'server/credentials.db', // Encrypted credentials database+ '.venv', // Root venv (stale, should not exist)];-// Note: whatsapp-rpc is now an npm dependency, not a local directory--console.log('Cleaning...');--for (const target of targets) {- const fullPath = resolve(ROOT, target);- if (existsSync(fullPath)) {- console.log(` Removing: ${target}`);- try {- // Node.js native rmSync - works cross-platform- rmSync(fullPath, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });- } catch (err) {- console.log(` Warning: Could not remove ${target}: ${err.message}`);++async function main() {+ console.log('Cleaning MachinaOS...\n');++ // Step 1: Kill processes on configured ports+ const config = loadEnvConfig();+ console.log('Stopping running processes...');++ let killedPorts = 0;+ for (const port of config.allPorts) {+ const result = await killPort(port);+ if (result.killed.length > 0) {+ console.log(` Port ${port}: Killed ${result.killed.length} process(es)`);+ killedPorts += result.killed.length;}}++ // Step 2: Kill any remaining MachinaOs processes (orphans holding file locks)+ const orphaned = await killMachinaProcesses('clean.js');+ if (orphaned.length > 0) {+ console.log(` Orphaned: Killed ${orphaned.length} process(es)`);+ }++ if (killedPorts > 0 || orphaned.length > 0) {+ // Wait for processes to fully terminate and release file handles+ console.log(' Waiting for processes to release file locks...');+ await sleep(1000);+ } else {+ console.log(' No running processes found.');+ }++ // Step 3: Remove directories+ console.log('\nRemoving directories...');++ for (const target of targets) {+ const fullPath = resolve(ROOT, target);+ if (existsSync(fullPath)) {+ console.log(` Removing: ${target}`);+ try {+ rmSync(fullPath, { recursive: true, force: true, maxRetries: 3, retryDelay: 100 });+ } catch (err) {+ console.log(` Warning: Could not remove ${target}: ${err.message}`);+ }+ }+ }++ console.log('\nDone.');}-console.log('Done.');+main().catch(console.error);diff --git a/scripts/docker.js b/scripts/docker.jsindex 51993df1..df245e9e 100755--- a/scripts/docker.js+++ b/scripts/docker.js@@ -4,43 +4,12 @@* Usage: node scripts/docker.js <command> [args...]* Commands: up, down, build, logs, restart*/-import { spawn } from 'child_process';-import { readFileSync, existsSync, copyFileSync } from 'fs';-import { fileURLToPath } from 'url';-import { dirname, resolve } from 'path';--const __dirname = dirname(fileURLToPath(import.meta.url));-const ROOT = resolve(__dirname, '..');--// Create .env from template if it doesn't exist-function ensureEnvFile() {- const envPath = resolve(ROOT, '.env');- if (existsSync(envPath)) return true;-- const templatePath = resolve(ROOT, '.env.template');- if (existsSync(templatePath)) {- console.log('[Docker] Creating .env from .env.template');- copyFileSync(templatePath, envPath);- return true;- }-- console.warn('[Docker] Warning: No .env or .env.template found');- return false;-}--// Read .env file and check REDIS_ENABLED-function isRedisEnabled() {- const envPath = resolve(ROOT, '.env');- if (!existsSync(envPath)) return false;-- const content = readFileSync(envPath, 'utf8');- const match = content.match(/^REDIS_ENABLED\s*=\s*(.+)$/m);- if (!match) return false;-- const value = match[1].trim().toLowerCase();- return value === 'true' || value === '1' || value === 'yes';-}+import {+ ROOT,+ loadEnvConfig,+ ensureEnvFile,+} from './utils.js';// Get command and argsconst [,, command, ...args] = process.argv;@@ -52,13 +21,18 @@ if (!command) {}// Ensure .env exists (create from template if needed)-ensureEnvFile();+if (ensureEnvFile()) {+ console.log('[Docker] Ensured .env file exists');+}++// Load config+const config = loadEnvConfig();// Build docker-compose commandconst composeArgs = [];// Add Redis profile if enabled in .env-if (isRedisEnabled()) {+if (config.redisEnabled) {composeArgs.push('--profile', 'redis');console.log('[Docker] Redis profile enabled (REDIS_ENABLED=true in .env)');} else {diff --git a/scripts/start.js b/scripts/start.jsindex 66f8a6e0..89b65bb0 100755--- a/scripts/start.js+++ b/scripts/start.js@@ -4,83 +4,25 @@* Works on: Windows, macOS, Linux, WSL, Git Bash*/import { spawn } from 'child_process';-import { readFileSync, existsSync, copyFileSync, rmSync } from 'fs';-import { resolve, dirname } from 'path';-import { fileURLToPath } from 'url';-import findProcess from 'find-process';+import { existsSync, rmSync } from 'fs';+import { resolve } from 'path';+import {+ ROOT,+ getPlatformName,+ loadEnvConfig,+ ensureEnvFile,+ killPort,+ createLogger,+} from './utils.js';-const __dirname = dirname(fileURLToPath(import.meta.url));-const ROOT = resolve(__dirname, '..');const START_TIME = Date.now();+const log = createLogger(START_TIME);// Parse command line argumentsconst args = process.argv.slice(2);const isDaemonMode = args.includes('--daemon');const skipWhatsApp = args.includes('--skip-whatsapp');-// Platform detection-const isWindows = process.platform === 'win32';-const isGitBash = isWindows && (process.env.MSYSTEM || process.env.SHELL?.includes('bash'));--function getPlatformName() {- if (isGitBash) return 'Git Bash';- if (isWindows) return 'Windows';- if (process.platform === 'darwin') return 'macOS';- return 'Linux';-}--// Utilities-const elapsed = () => `${((Date.now() - START_TIME) / 1000).toFixed(2)}s`;-const log = (msg) => console.log(`[${elapsed()}] ${msg}`);-const sleep = (ms) => new Promise(r => setTimeout(r, ms));--function loadConfig() {- const envPath = existsSync(resolve(ROOT, '.env'))- ? resolve(ROOT, '.env')- : resolve(ROOT, '.env.template');-- const env = {};- if (existsSync(envPath)) {- for (const line of readFileSync(envPath, 'utf-8').split('\n')) {- const match = line.match(/^([^#=]+)=(.*)$/);- if (match) {- env[match[1].trim()] = match[2].trim().replace(/^["']|["']$/g, '');- }- }- }-- return {- ports: [- parseInt(env.VITE_CLIENT_PORT) || 3000,- parseInt(env.PYTHON_BACKEND_PORT) || 3010,- parseInt(env.WHATSAPP_RPC_PORT) || 9400- ],- temporalEnabled: env.TEMPORAL_ENABLED?.toLowerCase() === 'true'- };-}--// Port Management using find-process (cross-platform)-async function freePort(port) {- const procs = await findProcess('port', port);- if (procs.length === 0) return { freed: true, pids: [] };-- const pids = procs.map(p => p.pid);- for (const pid of pids) {- try { process.kill(pid, 'SIGTERM'); } catch {}- }- await sleep(300);-- // Force kill if still running- for (const pid of pids) {- try { process.kill(pid, 'SIGKILL'); } catch {}- }- await sleep(200);-- const remaining = await findProcess('port', port);- return { freed: remaining.length === 0, pids };-}--// Mainasync function main() {// Check if build has been runconst rootNodeModules = resolve(ROOT, 'node_modules');@@ -90,30 +32,27 @@ async function main() {process.exit(1);}- const config = loadConfig();+ const config = loadEnvConfig();process.env.PYTHONUTF8 = '1';console.log('\n=== MachinaOS Starting ===\n');log(`Platform: ${getPlatformName()}`);log(`Mode: ${isDaemonMode ? 'Daemon (Gunicorn)' : 'Development (uvicorn)'}`);- log(`Ports: ${config.ports.join(', ')}`);+ log(`Ports: ${config.allPorts.join(', ')}`);log(`Temporal: ${config.temporalEnabled ? 'enabled' : 'disabled'}`);log(`WhatsApp: ${skipWhatsApp ? 'skipped' : 'enabled'}`);// Create .env if not exists- const envPath = resolve(ROOT, '.env');- const templatePath = resolve(ROOT, '.env.template');- if (!existsSync(envPath) && existsSync(templatePath)) {- copyFileSync(templatePath, envPath);- log('Created .env from template');+ if (ensureEnvFile()) {+ log('Ensured .env file exists');}- // Free ports using find-process (cross-platform)+ // Free portslog('Freeing ports...');- for (const port of config.ports) {- const result = await freePort(port);- if (result.pids.length > 0) {- log(` Port ${port}: ${result.freed ? 'Freed' : 'Warning - could not free'} (PIDs: ${result.pids.join(', ')})`);+ for (const port of config.allPorts) {+ const result = await killPort(port);+ if (result.killed.length > 0) {+ log(` Port ${port}: ${result.portFree ? 'Freed' : 'Warning - could not free'} (PIDs: ${result.killed.join(', ')})`);} else {log(` Port ${port}: Already free`);}diff --git a/scripts/stop.js b/scripts/stop.jsindex 60e46489..152b3f00 100755--- a/scripts/stop.js+++ b/scripts/stop.js@@ -1,135 +1,28 @@#!/usr/bin/env node/*** Cross-platform stop script for MachinaOS services.- * Uses find-process npm package for reliable cross-platform port detection.+ * Works on: Windows, macOS, Linux, WSL, Git Bash*/-import { readFileSync, existsSync } from 'fs';-import { resolve, dirname } from 'path';-import { fileURLToPath } from 'url';-import findProcess from 'find-process';--const __dirname = dirname(fileURLToPath(import.meta.url));-const ROOT = resolve(__dirname, '..');--const isWindows = process.platform === 'win32';-const isGitBash = isWindows && (process.env.MSYSTEM || process.env.SHELL?.includes('bash'));--function getPlatformName() {- if (isGitBash) return 'Git Bash';- if (isWindows) return 'Windows';- if (process.platform === 'darwin') return 'macOS';- return 'Linux';-}--const sleep = (ms) => new Promise(r => setTimeout(r, ms));--function loadConfig() {- const envPath = existsSync(resolve(ROOT, '.env'))- ? resolve(ROOT, '.env')- : resolve(ROOT, '.env.template');-- const env = {};- if (existsSync(envPath)) {- for (const line of readFileSync(envPath, 'utf-8').split('\n')) {- const match = line.match(/^([^#=]+)=(.*)$/);- if (match) {- env[match[1].trim()] = match[2].trim().replace(/^["']|["']$/g, '');- }- }- }-- return {- ports: [- parseInt(env.VITE_CLIENT_PORT) || 3000,- parseInt(env.PYTHON_BACKEND_PORT) || 3010,- parseInt(env.WHATSAPP_RPC_PORT) || 9400- ],- temporalEnabled: env.TEMPORAL_ENABLED?.toLowerCase() === 'true'- };-}--async function killPort(port) {- const procs = await findProcess('port', port);- if (procs.length === 0) return { killed: [], portFree: true };-- const pids = procs.map(p => p.pid);-- // SIGTERM first- for (const pid of pids) {- try { process.kill(pid, 'SIGTERM'); } catch {}- }- await sleep(300);-- // SIGKILL for stubborn processes- for (const pid of pids) {- try { process.kill(pid, 'SIGKILL'); } catch {}- }- await sleep(200);-- const remaining = await findProcess('port', port);- return { killed: pids, portFree: remaining.length === 0 };-}--async function killByPattern(pattern) {- const procs = await findProcess('name', pattern);- const pids = procs.map(p => p.pid);-- for (const pid of pids) {- try { process.kill(pid, 'SIGKILL'); } catch {}- }- return pids;-}--// Normalize path for cross-platform comparison-function normalizePath(p) {- return p?.toLowerCase().replace(/\\/g, '/') || '';-}--// Kill orphaned MachinaOs processes that may hold database locks-async function killOrphanedMachinaProcesses() {- const killed = [];- const rootNorm = normalizePath(ROOT);-- // Find Python processes running from MachinaOs directory- const pythonProcs = await findProcess('name', 'python');- for (const proc of pythonProcs) {- const cmd = normalizePath(proc.cmd);- // Only kill if command includes our project path AND is uvicorn/main:app- if (cmd.includes(rootNorm) && (cmd.includes('uvicorn') || cmd.includes('main:app'))) {- try {- process.kill(proc.pid, 'SIGKILL');- killed.push(proc.pid);- } catch {}- }- }-- // Find Node processes running from MachinaOs directory (vite, nodejs executor)- const nodeProcs = await findProcess('name', 'node');- for (const proc of nodeProcs) {- const cmd = normalizePath(proc.cmd);- // Only kill if command includes our project path AND is vite or nodejs executor- if (cmd.includes(rootNorm) && (cmd.includes('vite') || cmd.includes('nodejs/src'))) {- try {- process.kill(proc.pid, 'SIGKILL');- killed.push(proc.pid);- } catch {}- }- }-- return killed;-}+import {+ getPlatformName,+ loadEnvConfig,+ killPort,+ killByPattern,+ killOrphanedProcesses,+ sleep,+} from './utils.js';async function main() {- const config = loadConfig();+ const config = loadEnvConfig();console.log('Stopping MachinaOS services...\n');console.log(`Platform: ${getPlatformName()}`);- console.log(`Ports: ${config.ports.join(', ')}`);+ console.log(`Ports: ${config.allPorts.join(', ')}`);console.log(`Temporal: ${config.temporalEnabled ? 'enabled' : 'disabled'}\n`);let allStopped = true;- for (const port of config.ports) {+ for (const port of config.allPorts) {const result = await killPort(port);const status = result.portFree ? '[OK]' : '[!!]';const message = result.portFree@@ -151,7 +44,7 @@ async function main() {}// Kill orphaned MachinaOs processes (may hold DB locks after crash)- const orphanedPids = await killOrphanedMachinaProcesses();+ const orphanedPids = await killOrphanedProcesses();if (orphanedPids.length > 0) {await sleep(200);console.log(`[OK] Orphaned: Killed ${orphanedPids.length} MachinaOs process(es)`);diff --git a/scripts/utils.js b/scripts/utils.jsnew file mode 100644index 00000000..77425a6e--- /dev/null+++ b/scripts/utils.js@@ -0,0 +1,298 @@+#!/usr/bin/env node+/**+ * Common utilities for MachinaOS scripts.+ * Shared across: start.js, stop.js, clean.js, docker.js, build.js+ */+import { readFileSync, existsSync, copyFileSync } from 'fs';+import { resolve, dirname } from 'path';+import { fileURLToPath } from 'url';+import { execSync } from 'child_process';++// Root directory (parent of scripts/)+const __dirname = dirname(fileURLToPath(import.meta.url));+export const ROOT = resolve(__dirname, '..');++// Platform detection+export const isWindows = process.platform === 'win32';+export const isGitBash = isWindows && (process.env.MSYSTEM || process.env.SHELL?.includes('bash'));++// Lazy-loaded find-process (may not be available during clean)+let _findProcess = null;++/**+ * Get find-process module, loading it lazily.+ * Returns null if not available (e.g., during clean when node_modules is missing).+ */+async function getFindProcess() {+ if (_findProcess !== null) return _findProcess;+ try {+ const module = await import('find-process');+ _findProcess = module.default;+ return _findProcess;+ } catch {+ _findProcess = false; // Mark as unavailable+ return null;+ }+}++/**+ * Get human-readable platform name.+ */+export function getPlatformName() {+ if (isGitBash) return 'Git Bash';+ if (isWindows) return 'Windows';+ if (process.platform === 'darwin') return 'macOS';+ return 'Linux';+}++/**+ * Sleep for specified milliseconds.+ */+export const sleep = (ms) => new Promise(r => setTimeout(r, ms));++/**+ * Normalize path for cross-platform comparison.+ */+export function normalizePath(p) {+ return p?.toLowerCase().replace(/\\/g, '/') || '';+}++/**+ * Load configuration from .env file.+ * Falls back to .env.template if .env doesn't exist.+ */+export function loadEnvConfig() {+ const envPath = existsSync(resolve(ROOT, '.env'))+ ? resolve(ROOT, '.env')+ : resolve(ROOT, '.env.template');++ const env = {};+ if (existsSync(envPath)) {+ for (const line of readFileSync(envPath, 'utf-8').split('\n')) {+ const match = line.match(/^([^#=]+)=(.*)$/);+ if (match) {+ env[match[1].trim()] = match[2].trim().replace(/^["']|["']$/g, '');+ }+ }+ }++ return {+ raw: env,+ ports: {+ client: parseInt(env.VITE_CLIENT_PORT) || 3000,+ backend: parseInt(env.PYTHON_BACKEND_PORT) || 3010,+ whatsapp: parseInt(env.WHATSAPP_RPC_PORT) || 9400,+ nodejs: parseInt(env.NODEJS_EXECUTOR_PORT) || 3020,+ },+ allPorts: [+ parseInt(env.VITE_CLIENT_PORT) || 3000,+ parseInt(env.PYTHON_BACKEND_PORT) || 3010,+ parseInt(env.WHATSAPP_RPC_PORT) || 9400,+ parseInt(env.NODEJS_EXECUTOR_PORT) || 3020,+ ],+ temporalEnabled: env.TEMPORAL_ENABLED?.toLowerCase() === 'true',+ redisEnabled: ['true', '1', 'yes'].includes(env.REDIS_ENABLED?.toLowerCase()),+ };+}++/**+ * Ensure .env file exists, copying from .env.template if needed.+ * @returns {boolean} True if .env exists (or was created)+ */+export function ensureEnvFile() {+ const envPath = resolve(ROOT, '.env');+ if (existsSync(envPath)) return true;++ const templatePath = resolve(ROOT, '.env.template');+ if (existsSync(templatePath)) {+ copyFileSync(templatePath, envPath);+ return true;+ }++ return false;+}++/**+ * Kill process on port using native commands (fallback when find-process unavailable).+ * @returns {{ killed: boolean }}+ */+function killPortNative(port) {+ try {+ if (isWindows) {+ // Windows: use netstat + taskkill+ const output = execSync(`netstat -ano | findstr :${port}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });+ const lines = output.trim().split('\n');+ const pids = new Set();+ for (const line of lines) {+ const parts = line.trim().split(/\s+/);+ const pid = parts[parts.length - 1];+ if (pid && /^\d+$/.test(pid) && pid !== '0') {+ pids.add(pid);+ }+ }+ for (const pid of pids) {+ try {+ execSync(`taskkill /F /PID ${pid}`, { stdio: 'pipe' });+ } catch {}+ }+ return { killed: pids.size > 0 };+ } else {+ // Unix: use lsof + kill+ const output = execSync(`lsof -ti:${port}`, { encoding: 'utf-8', stdio: ['pipe', 'pipe', 'pipe'] });+ const pids = output.trim().split('\n').filter(Boolean);+ for (const pid of pids) {+ try {+ execSync(`kill -9 ${pid}`, { stdio: 'pipe' });+ } catch {}+ }+ return { killed: pids.length > 0 };+ }+ } catch {+ return { killed: false };+ }+}++/**+ * Kill all processes on a specific port.+ * Uses find-process if available, falls back to native commands.+ * @returns {Promise<{ killed: number[], portFree: boolean }>}+ */+export async function killPort(port) {+ const findProcess = await getFindProcess();++ if (!findProcess) {+ // Fallback to native commands+ const result = killPortNative(port);+ return { killed: result.killed ? [0] : [], portFree: result.killed };+ }++ const procs = await findProcess('port', port);+ if (procs.length === 0) return { killed: [], portFree: true };++ const pids = procs.map(p => p.pid);++ // SIGTERM first (graceful)+ for (const pid of pids) {+ try { process.kill(pid, 'SIGTERM'); } catch {}+ }+ await sleep(300);++ // SIGKILL for stubborn processes+ for (const pid of pids) {+ try { process.kill(pid, 'SIGKILL'); } catch {}+ }+ await sleep(200);++ const remaining = await findProcess('port', port);+ return { killed: pids, portFree: remaining.length === 0 };+}++/**+ * Kill processes matching a name pattern.+ * @returns {Promise<number[]>} Array of killed PIDs+ */+export async function killByPattern(pattern) {+ const findProcess = await getFindProcess();+ if (!findProcess) return [];++ const procs = await findProcess('name', pattern);+ const pids = procs.map(p => p.pid);++ for (const pid of pids) {+ try { process.kill(pid, 'SIGKILL'); } catch {}+ }+ return pids;+}++/**+ * Kill MachinaOS processes that may hold file locks.+ * Useful before cleaning directories.+ * @param {string} [excludeScript] - Script name to exclude from killing (e.g., 'clean.js')+ * @returns {Promise<Array<{pid: number, type: string}>>}+ */+export async function killMachinaProcesses(excludeScript = null) {+ const findProcess = await getFindProcess();+ if (!findProcess) {+ // Fallback: just kill by ports+ return [];+ }++ const killed = [];+ const rootNorm = normalizePath(ROOT);++ // Find Python processes running from MachinaOs directory+ const pythonProcs = await findProcess('name', 'python');+ for (const proc of pythonProcs) {+ const cmd = normalizePath(proc.cmd);+ if (cmd.includes(rootNorm)) {+ try {+ process.kill(proc.pid, 'SIGKILL');+ killed.push({ pid: proc.pid, type: 'python' });+ } catch {}+ }+ }++ // Find Node processes running from MachinaOs directory+ const nodeProcs = await findProcess('name', 'node');+ for (const proc of nodeProcs) {+ const cmd = normalizePath(proc.cmd);+ // Exclude the specified script from being killed+ const shouldExclude = excludeScript && cmd.includes(excludeScript);+ if (cmd.includes(rootNorm) && !shouldExclude) {+ try {+ process.kill(proc.pid, 'SIGKILL');+ killed.push({ pid: proc.pid, type: 'node' });+ } catch {}+ }+ }++ return killed;+}++/**+ * Kill orphaned MachinaOS processes (uvicorn, vite, nodejs executor).+ * More targeted than killMachinaProcesses - only kills specific known processes.+ * @returns {Promise<number[]>} Array of killed PIDs+ */+export async function killOrphanedProcesses() {+ const findProcess = await getFindProcess();+ if (!findProcess) return [];++ const killed = [];+ const rootNorm = normalizePath(ROOT);++ // Python processes (uvicorn/main:app)+ const pythonProcs = await findProcess('name', 'python');+ for (const proc of pythonProcs) {+ const cmd = normalizePath(proc.cmd);+ if (cmd.includes(rootNorm) && (cmd.includes('uvicorn') || cmd.includes('main:app'))) {+ try {+ process.kill(proc.pid, 'SIGKILL');+ killed.push(proc.pid);+ } catch {}+ }+ }++ // Node processes (vite, nodejs executor)+ const nodeProcs = await findProcess('name', 'node');+ for (const proc of nodeProcs) {+ const cmd = normalizePath(proc.cmd);+ if (cmd.includes(rootNorm) && (cmd.includes('vite') || cmd.includes('nodejs/src'))) {+ try {+ process.kill(proc.pid, 'SIGKILL');+ killed.push(proc.pid);+ } catch {}+ }+ }++ return killed;+}++/**+ * Create a timestamped logger.+ * @param {number} [startTime] - Start time for elapsed calculation (default: now)+ */+export function createLogger(startTime = Date.now()) {+ const elapsed = () => `${((Date.now() - startTime) / 1000).toFixed(2)}s`;+ return (msg) => console.log(`[${elapsed()}] ${msg}`);+}diff --git a/server/core/credentials_database.py b/server/core/credentials_database.pyindex bd585a1c..eedf176c 100644--- a/server/core/credentials_database.py+++ b/server/core/credentials_database.py@@ -41,7 +41,7 @@ class CredentialsMetadata(SQLModel, table=True):class EncryptedAPIKey(SQLModel, table=True):"""API keys with encrypted storage."""- __tablename__ = "api_keys"+ __tablename__ = "encrypted_api_keys"id: str = Field(primary_key=True, max_length=255) # {session_id}_{provider}provider: str = Field(max_length=50, index=True)diff --git a/server/main.py b/server/main.pyindex 8a94fe86..8fc9a346 100644--- a/server/main.py+++ b/server/main.py@@ -70,6 +70,10 @@ async def lifespan(app: FastAPI):await container.database().startup()await container.cache().startup()+ # Initialize credentials database (creates tables if not exist)+ await container.credentials_database().initialize()+ logger.info("Credentials database initialized")+# Initialize event waiter with cache service for Redis Streams supportfrom services import event_waiterevent_waiter.set_cache_service(container.cache())diff --git a/server/pyproject.toml b/server/pyproject.tomlindex 380ac4d5..9425045c 100644--- a/server/pyproject.toml+++ b/server/pyproject.toml@@ -44,6 +44,7 @@ dependencies = ["langchain-anthropic>=0.3.0","langchain-google-genai>=2.0.0","langchain-groq>=0.2.0",+ "langchain-cerebras>=0.1.0","langgraph>=0.2.0",# Dependency Injection@@ -76,9 +77,6 @@ dev = [temporal = ["temporalio>=1.7.0",]-extra-ai = [- "langchain-cerebras>=0.1.0",-]docs = ["beautifulsoup4>=4.12.0","pypdf>=5.0.0",diff --git a/workflows/Zeenie Agent.json b/workflows/Zeenie_Agent.jsonsimilarity index 100%rename from workflows/Zeenie Agent.jsonrename to workflows/Zeenie_Agent.jsondiff --git a/workflows/Zeenie Assistant.json b/workflows/Zeenie_Assistant.jsonsimilarity index 73%rename from workflows/Zeenie Assistant.jsonrename to workflows/Zeenie_Assistant.jsonindex 0f60216c..ae85e8f5 100644--- a/workflows/Zeenie Assistant.json+++ b/workflows/Zeenie_Assistant.json@@ -1,13 +1,13 @@{- "id": "workflow-1771487325910-aa3d3w8oe",+ "id": "example_workflow-1771487325910-aa3d3w8oe","name": "Zeenie Assistant","nodes": [{"id": "chatTrigger-1769755237666","type": "chatTrigger","position": {- "x": 980,- "y": 0+ "x": 1580,+ "y": 60},"data": {"label": "Chat Trigger"@@ -16,8 +16,8 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 980,- "y": 0+ "x": 1580,+ "y": 60},"dragging": false},@@ -25,7 +25,7 @@"id": "webSearchTool-1769755286327","type": "webSearchTool","position": {- "x": 1840,+ "x": 2100,"y": 880},"data": {@@ -35,16 +35,16 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 1840,+ "x": 2100,"y": 880},- "dragging": true+ "dragging": false},{"id": "httpRequest-1769755308753","type": "httpRequest","position": {- "x": 1700,+ "x": 2000,"y": 880},"data": {@@ -54,121 +54,7 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 1700,- "y": 880- },- "dragging": true- },- {- "id": "batteryMonitor-1769755671312",- "type": "batteryMonitor",- "position": {- "x": 880,- "y": 880- },- "data": {- "label": "Battery Monitor"- },- "width": 87,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 880,- "y": 880- },- "dragging": false- },- {- "id": "appLauncher-1769755673740",- "type": "appLauncher",- "position": {- "x": 1000,- "y": 880- },- "data": {- "label": "App Launcher"- },- "width": 75,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 1000,- "y": 880- },- "dragging": false- },- {- "id": "appList-1769755676665",- "type": "appList",- "position": {- "x": 1320,- "y": 880- },- "data": {- "label": "App List"- },- "width": 60,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 1320,- "y": 880- },- "dragging": false- },- {- "id": "location-1769884704270",- "type": "location",- "position": {- "x": 800,- "y": 880- },- "data": {- "label": "Location"- },- "width": 60,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 800,- "y": 880- },- "dragging": false- },- {- "id": "systemInfo-1769884739936",- "type": "systemInfo",- "position": {- "x": 1220,- "y": 880- },- "data": {- "label": "System Info"- },- "width": 64,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 1220,- "y": 880- },- "dragging": false- },- {- "id": "deviceStateAutomation-1769884748460",- "type": "deviceStateAutomation",- "position": {- "x": 1100,- "y": 880- },- "data": {- "label": "Device State"- },- "width": 67,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 1100,+ "x": 2000,"y": 880},"dragging": false@@ -177,7 +63,7 @@"id": "pythonExecutor-1769889650412","type": "pythonExecutor","position": {- "x": 2220,+ "x": 2580,"y": 880},"data": {@@ -187,7 +73,7 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 2220,+ "x": 2580,"y": 880},"dragging": false@@ -196,7 +82,7 @@"id": "javascriptExecutor-1769889652348","type": "javascriptExecutor","position": {- "x": 2360,+ "x": 2700,"y": 880},"data": {@@ -206,36 +92,17 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 2360,+ "x": 2700,"y": 880},"dragging": false},- {- "id": "whatsappSend-1770051996917",- "type": "whatsappSend",- "position": {- "x": 2540,- "y": -40- },- "data": {- "label": "WhatsApp Send"- },- "width": 87,- "height": 82,- "selected": false,- "positionAbsolute": {- "x": 2540,- "y": -40- },- "dragging": false- },{"id": "chatAgent-1770060581808","type": "chatAgent","position": {- "x": 1880,- "y": -100+ "x": 2320,+ "y": 20},"data": {"label": "Zeenie"@@ -244,8 +111,8 @@"height": 200,"selected": false,"positionAbsolute": {- "x": 1880,- "y": -100+ "x": 2320,+ "y": 20},"dragging": false},@@ -253,7 +120,7 @@"id": "gmaps_locations-1770070846926","type": "gmaps_locations","position": {- "x": 3620,+ "x": 3680,"y": 880},"data": {@@ -263,7 +130,7 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 3620,+ "x": 3680,"y": 880},"dragging": false@@ -272,7 +139,7 @@"id": "gmaps_nearby_places-1770070848430","type": "gmaps_nearby_places","position": {- "x": 3480,+ "x": 3540,"y": 880},"data": {@@ -282,16 +149,16 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 3480,+ "x": 3540,"y": 880},- "dragging": true+ "dragging": false},{"id": "coding_agent-1770070861999","type": "coding_agent","position": {- "x": 2020,+ "x": 2440,"y": 520},"data": {@@ -301,7 +168,7 @@"height": 200,"selected": false,"positionAbsolute": {- "x": 2020,+ "x": 2440,"y": 520},"dragging": false@@ -310,7 +177,7 @@"id": "web_agent-1770070863433","type": "web_agent","position": {- "x": 1540,+ "x": 1900,"y": 520},"data": {@@ -320,26 +187,7 @@"height": 200,"selected": false,"positionAbsolute": {- "x": 1540,- "y": 520- },- "dragging": false- },- {- "id": "task_agent-1770070864827",- "type": "task_agent",- "position": {- "x": 2580,- "y": 520- },- "data": {- "label": "Task Management Agent"- },- "width": 300,- "height": 200,- "selected": false,- "positionAbsolute": {- "x": 2580,+ "x": 1900,"y": 520},"dragging": false@@ -348,7 +196,7 @@"id": "whatsappDb-1770080085316","type": "whatsappDb","position": {- "x": 3080,+ "x": 3280,"y": 880},"data": {@@ -358,36 +206,17 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 3080,+ "x": 3280,"y": 880},"dragging": false},- {- "id": "android_agent-1770080279045",- "type": "android_agent",- "position": {- "x": 1000,- "y": 520- },- "data": {- "label": "Android Control Agent"- },- "width": 300,- "height": 200,- "selected": false,- "positionAbsolute": {- "x": 1000,- "y": 520- },- "dragging": false- },{"id": "masterSkill-1770080471262","type": "masterSkill","position": {- "x": 660,- "y": 880+ "x": 1200,+ "y": 680},"data": {"label": "Master Skill 1"@@ -396,8 +225,8 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 660,- "y": 880+ "x": 1200,+ "y": 680},"dragging": true},@@ -405,8 +234,8 @@"id": "masterSkill-1770193690331","type": "masterSkill","position": {- "x": 1940,- "y": 180+ "x": 2340,+ "y": 280},"data": {"label": "Master Skill 2"@@ -415,8 +244,8 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 1940,- "y": 180+ "x": 2340,+ "y": 280},"dragging": false},@@ -424,7 +253,7 @@"id": "masterSkill-1770193844078","type": "masterSkill","position": {- "x": 1500,+ "x": 1860,"y": 880},"data": {@@ -434,7 +263,7 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 1500,+ "x": 1860,"y": 880},"dragging": false@@ -443,7 +272,7 @@"id": "masterSkill-1770193849164","type": "masterSkill","position": {- "x": 2000,+ "x": 2400,"y": 880},"data": {@@ -453,7 +282,7 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 2000,+ "x": 2400,"y": 880},"dragging": false@@ -462,8 +291,8 @@"id": "console-1770195247780","type": "console","position": {- "x": 2240,- "y": -20+ "x": 3040,+ "y": 180},"data": {"label": "Console 1"@@ -472,529 +301,488 @@"height": 82,"selected": false,"positionAbsolute": {- "x": 2240,- "y": -20+ "x": 3040,+ "y": 180},"dragging": false},{- "id": "console-1770195249519",- "type": "console",+ "id": "social_agent-1770213991252",+ "type": "social_agent","position": {- "x": 1360,- "y": 540+ "x": 2960,+ "y": 520},"data": {- "label": "Console 2"+ "label": "Social Media Agent"},- "width": 60,- "height": 82,+ "width": 300,+ "height": 200,"selected": false,"positionAbsolute": {- "x": 1360,- "y": 540+ "x": 2960,+ "y": 520},- "dragging": true+ "dragging": false},{- "id": "console-1770195251903",- "type": "console",+ "id": "masterSkill-1770214062703",+ "type": "masterSkill","position": {- "x": 1900,- "y": 520+ "x": 2860,+ "y": 880},"data": {- "label": "Console 3"+ "label": "Master Skill 5"},- "width": 60,+ "width": 73,"height": 82,"selected": false,"positionAbsolute": {- "x": 1900,- "y": 520+ "x": 2860,+ "y": 880},"dragging": false},{- "id": "console-1770195252563",- "type": "console",+ "id": "travel_agent-1770223640970",+ "type": "travel_agent","position": {- "x": 2380,+ "x": 3460,"y": 520},"data": {- "label": "Console 4"+ "label": "Travel Agent"},- "width": 60,- "height": 82,+ "width": 300,+ "height": 200,"selected": false,"positionAbsolute": {- "x": 2380,+ "x": 3460,"y": 520},"dragging": false},{- "id": "masterSkill-1770213648261",+ "id": "masterSkill-1770223871841","type": "masterSkill","position": {- "x": 2560,+ "x": 3420,"y": 880},"data": {- "label": "Master Skill"+ "label": "Master Skill 6"},- "width": 63,+ "width": 73,"height": 82,"selected": false,"positionAbsolute": {- "x": 2560,+ "x": 3420,"y": 880},- "dragging": false+ "dragging": true},{- "id": "social_agent-1770213991252",- "type": "social_agent",+ "id": "taskTrigger-1770790175153",+ "type": "taskTrigger","position": {- "x": 3020,- "y": 520+ "x": 1580,+ "y": 180},"data": {- "label": "Social Media Agent"+ "label": "Task Completed"},- "width": 300,- "height": 200,+ "width": 86,+ "height": 82,"selected": false,"positionAbsolute": {- "x": 3020,- "y": 520+ "x": 1580,+ "y": 180},"dragging": false},{- "id": "whatsappSend-1770214044603",- "type": "whatsappSend",+ "id": "console-1770790185353",+ "type": "console","position": {- "x": 3180,- "y": 880+ "x": 1880,+ "y": 260},"data": {- "label": "WhatsApp Send 1"+ "label": "Console"},- "width": 95,+ "width": 60,"height": 82,"selected": false,"positionAbsolute": {- "x": 3180,- "y": 880+ "x": 1880,+ "y": 260},"dragging": false},{- "id": "masterSkill-1770214062703",- "type": "masterSkill",+ "id": "taskManager-1770801430177",+ "type": "taskManager","position": {- "x": 2960,- "y": 880+ "x": 2840,+ "y": 280},"data": {- "label": "Master Skill 5"+ "label": "Task Manager"},- "width": 73,+ "width": 75,"height": 82,"selected": false,"positionAbsolute": {- "x": 2960,- "y": 880+ "x": 2840,+ "y": 280},- "dragging": true+ "dragging": false},{- "id": "travel_agent-1770223640970",- "type": "travel_agent",+ "id": "simpleMemory-1770973684811",+ "type": "simpleMemory","position": {- "x": 3420,- "y": 520+ "x": 2180,+ "y": 260},"data": {- "label": "Travel Agent"+ "label": "Simple Memory"},- "width": 300,- "height": 200,+ "width": 87,+ "height": 82,"selected": false,"positionAbsolute": {- "x": 3420,- "y": 520+ "x": 2180,+ "y": 260},"dragging": false},{- "id": "console-1770223720480",- "type": "console",+ "id": "simpleMemory-1770973735815",+ "type": "simpleMemory","position": {- "x": 2940,- "y": 460+ "x": 1760,+ "y": 700},"data": {- "label": "Console 5"+ "label": "Simple Memory 2"},- "width": 60,+ "width": 97,"height": 82,"selected": false,"positionAbsolute": {- "x": 2940,- "y": 460+ "x": 1760,+ "y": 700},- "dragging": true+ "dragging": false},{- "id": "console-1770223743060",- "type": "console",+ "id": "simpleMemory-1770973759469",+ "type": "simpleMemory","position": {- "x": 3360,- "y": 440+ "x": 2300,+ "y": 700},"data": {- "label": "Console 6"+ "label": "Simple Memory 3"},- "width": 60,+ "width": 97,"height": 82,"selected": false,"positionAbsolute": {- "x": 3360,- "y": 440+ "x": 2300,+ "y": 700},- "dragging": true+ "dragging": false},{- "id": "console-1770223755245",- "type": "console",+ "id": "simpleMemory-1770973783506",+ "type": "simpleMemory","position": {- "x": 3760,- "y": 440+ "x": 2800,+ "y": 700},"data": {- "label": "Console 7"+ "label": "Simple Memory 5"},- "width": 60,+ "width": 97,"height": 82,"selected": false,"positionAbsolute": {- "x": 3760,- "y": 440+ "x": 2800,+ "y": 700},- "dragging": true+ "dragging": false},{- "id": "masterSkill-1770223871841",- "type": "masterSkill",+ "id": "simpleMemory-1770973798020",+ "type": "simpleMemory","position": {- "x": 3360,- "y": 880+ "x": 3340,+ "y": 700},"data": {- "label": "Master Skill 6"+ "label": "Simple Memory 6"},- "width": 73,+ "width": 97,"height": 82,"selected": false,"positionAbsolute": {- "x": 3360,- "y": 880+ "x": 3340,+ "y": 700},- "dragging": false+ "dragging": true},{- "id": "taskTrigger-1770790175153",- "type": "taskTrigger",+ "id": "productivity_agent-1771834433838",+ "type": "productivity_agent","position": {- "x": 980,- "y": 140+ "x": 1380,+ "y": 520},"data": {- "label": "Task Completed"+ "label": "Productivity Agent"},- "width": 86,- "height": 82,+ "width": 300,+ "height": 200,"selected": false,"positionAbsolute": {- "x": 980,- "y": 140+ "x": 1380,+ "y": 520},"dragging": false},{- "id": "console-1770790185353",- "type": "console",+ "id": "whatsappSend-1771834542643",+ "type": "whatsappSend","position": {- "x": 1600,- "y": 180+ "x": 3020,+ "y": 40},"data": {- "label": "Console"+ "label": "WhatsApp Send"},- "width": 60,+ "width": 87,"height": 82,"selected": false,"positionAbsolute": {- "x": 1600,- "y": 180+ "x": 3020,+ "y": 40},"dragging": true},{- "id": "taskManager-1770801430177",- "type": "taskManager",+ "id": "whatsappReceive-1771834543772",+ "type": "whatsappReceive","position": {- "x": 2280,- "y": 180+ "x": 1560,+ "y": -60},"data": {- "label": "Task Manager"+ "label": "WhatsApp Receive"},- "width": 75,+ "width": 101,"height": 82,"selected": false,"positionAbsolute": {- "x": 2280,- "y": 180+ "x": 1560,+ "y": -60},- "dragging": false+ "dragging": true},{- "id": "simpleMemory-1770973684811",- "type": "simpleMemory",+ "id": "calendarCreate-1771834551084",+ "type": "calendarCreate","position": {- "x": 1700,- "y": 180+ "x": 1380,+ "y": 880},"data": {- "label": "Simple Memory"+ "label": "Calendar Create"},"width": 87,"height": 82,"selected": false,"positionAbsolute": {- "x": 1700,- "y": 180+ "x": 1380,+ "y": 880},"dragging": false},{- "id": "simpleMemory-1770973718145",- "type": "simpleMemory",+ "id": "calendarList-1771834551934",+ "type": "calendarList","position": {- "x": 800,- "y": 680+ "x": 1280,+ "y": 880},"data": {- "label": "Simple Memory 1"+ "label": "Calendar List"},- "width": 95,+ "width": 70,"height": 82,"selected": false,"positionAbsolute": {- "x": 800,- "y": 680+ "x": 1280,+ "y": 880},"dragging": false},{- "id": "simpleMemory-1770973735815",- "type": "simpleMemory",+ "id": "gmailSearch-1771834571362",+ "type": "gmailSearch","position": {- "x": 1380,- "y": 680+ "x": 1180,+ "y": 880},"data": {- "label": "Simple Memory 2"+ "label": "Gmail Search"},- "width": 97,+ "width": 71,"height": 82,"selected": false,"positionAbsolute": {- "x": 1380,- "y": 680+ "x": 1180,+ "y": 880},"dragging": false},{- "id": "simpleMemory-1770973759469",- "type": "simpleMemory",+ "id": "gmailRead-1771834572537",+ "type": "gmailRead","position": {- "x": 1900,- "y": 680+ "x": 1080,+ "y": 880},"data": {- "label": "Simple Memory 3"+ "label": "Gmail Read"},- "width": 97,+ "width": 62,"height": 82,"selected": false,"positionAbsolute": {- "x": 1900,- "y": 680+ "x": 1080,+ "y": 880},"dragging": false},{- "id": "simpleMemory-1770973772769",- "type": "simpleMemory",+ "id": "twitterSearch-1771834599628",+ "type": "twitterSearch","position": {- "x": 2440,- "y": 680+ "x": 3040,+ "y": 880},"data": {- "label": "Simple Memory 4"+ "label": "Twitter Search"},- "width": 97,+ "width": 77,"height": 82,"selected": false,"positionAbsolute": {- "x": 2440,- "y": 680+ "x": 3040,+ "y": 880},- "dragging": false+ "dragging": true},{- "id": "simpleMemory-1770973783506",- "type": "simpleMemory",+ "id": "twitterUser-1771834600973",+ "type": "twitterUser","position": {- "x": 2880,- "y": 680+ "x": 3160,+ "y": 880},"data": {- "label": "Simple Memory 5"+ "label": "Twitter User"},- "width": 97,+ "width": 65,"height": 82,"selected": false,"positionAbsolute": {- "x": 2880,- "y": 680+ "x": 3160,+ "y": 880},"dragging": false},{- "id": "simpleMemory-1770973798020",+ "id": "simpleMemory-1771834793747","type": "simpleMemory","position": {- "x": 3280,- "y": 700+ "x": 1140,+ "y": 560},"data": {- "label": "Simple Memory 6"+ "label": "Simple Memory 1"},- "width": 97,+ "width": 95,"height": 82,"selected": false,"positionAbsolute": {- "x": 3280,- "y": 700+ "x": 1140,+ "y": 560},"dragging": false- }- ],- "edges": [- {- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3- },- "source": "masterSkill-1770080471262",- "sourceHandle": "output-main",- "target": "android_agent-1770080279045",- "targetHandle": "input-skill",- "id": "reactflow__edge-masterSkill-1770080471262output-main-android_agent-1770080279045input-skill",- "selected": false},{- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "id": "driveUpload-1771834887176",+ "type": "driveUpload",+ "position": {+ "x": 1700,+ "y": 880},- "source": "appLauncher-1769755673740",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-appLauncher-1769755673740output-tool-android_agent-1770080279045input-tools",- "selected": false- },- {- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "data": {+ "label": "Drive Upload"},- "source": "batteryMonitor-1769755671312",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-batteryMonitor-1769755671312output-tool-android_agent-1770080279045input-tools",- "selected": false- },- {- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "width": 71,+ "height": 82,+ "selected": false,+ "positionAbsolute": {+ "x": 1700,+ "y": 880},- "source": "deviceStateAutomation-1769884748460",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-deviceStateAutomation-1769884748460output-tool-android_agent-1770080279045input-tools",- "selected": false+ "dragging": false},{- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "id": "sheetsRead-1771834893665",+ "type": "sheetsRead",+ "position": {+ "x": 1540,+ "y": 880+ },+ "data": {+ "label": "Sheets Read"+ },+ "width": 66,+ "height": 82,+ "selected": false,+ "positionAbsolute": {+ "x": 1540,+ "y": 880},- "source": "systemInfo-1769884739936",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-systemInfo-1769884739936output-tool-android_agent-1770080279045input-tools",- "selected": false+ "dragging": false},{- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "id": "sheetsWrite-1771834895583",+ "type": "sheetsWrite",+ "position": {+ "x": 1620,+ "y": 880},- "source": "appList-1769755676665",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-appList-1769755676665output-tool-android_agent-1770080279045input-tools",- "selected": false- },- {- "type": "smoothstep",- "animated": true,- "style": {- "stroke": "#8be9fd",- "strokeWidth": 3+ "data": {+ "label": "Sheets Write"},- "source": "location-1769884704270",- "sourceHandle": "output-tool",- "target": "android_agent-1770080279045",- "targetHandle": "input-tools",- "id": "reactflow__edge-location-1769884704270output-tool-android_agent-1770080279045input-tools",- "selected": false- },+ "width": 69,+ "height": 82,+ "selected": false,+ "positionAbsolute": {+ "x": 1620,+ "y": 880+ },+ "dragging": false+ }+ ],+ "edges": [{"type": "smoothstep","animated": true,@@ -1128,11 +916,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "android_agent-1770080279045",- "sourceHandle": "output-main",- "target": "console-1770195249519",- "targetHandle": "input-main",- "id": "reactflow__edge-android_agent-1770080279045output-main-console-1770195249519input-main",+ "source": "social_agent-1770213991252",+ "sourceHandle": "output-top",+ "target": "chatAgent-1770060581808",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-social_agent-1770213991252output-top-chatAgent-1770060581808input-tools","selected": false},{@@ -1142,11 +930,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "web_agent-1770070863433",- "sourceHandle": "output-main",- "target": "console-1770195251903",- "targetHandle": "input-main",- "id": "reactflow__edge-web_agent-1770070863433output-main-console-1770195251903input-main",+ "source": "whatsappDb-1770080085316",+ "sourceHandle": "output-tool",+ "target": "social_agent-1770213991252",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-whatsappDb-1770080085316output-tool-social_agent-1770213991252input-tools","selected": false},{@@ -1156,11 +944,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "coding_agent-1770070861999",+ "source": "masterSkill-1770214062703","sourceHandle": "output-main",- "target": "console-1770195252563",- "targetHandle": "input-main",- "id": "reactflow__edge-coding_agent-1770070861999output-main-console-1770195252563input-main",+ "target": "social_agent-1770213991252",+ "targetHandle": "input-skill",+ "id": "reactflow__edge-masterSkill-1770214062703output-main-social_agent-1770213991252input-skill","selected": false},{@@ -1170,11 +958,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "android_agent-1770080279045",+ "source": "travel_agent-1770223640970","sourceHandle": "output-top","target": "chatAgent-1770060581808","targetHandle": "input-tools",- "id": "reactflow__edge-android_agent-1770080279045output-top-chatAgent-1770060581808input-tools",+ "id": "reactflow__edge-travel_agent-1770223640970output-top-chatAgent-1770060581808input-tools","selected": false},{@@ -1184,11 +972,25 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "task_agent-1770070864827",- "sourceHandle": "output-top",- "target": "chatAgent-1770060581808",+ "source": "gmaps_locations-1770070846926",+ "sourceHandle": "output-tool",+ "target": "travel_agent-1770223640970",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-gmaps_locations-1770070846926output-tool-travel_agent-1770223640970input-tools",+ "selected": false+ },+ {+ "type": "smoothstep",+ "animated": true,+ "style": {+ "stroke": "#8be9fd",+ "strokeWidth": 3+ },+ "source": "gmaps_nearby_places-1770070848430",+ "sourceHandle": "output-tool",+ "target": "travel_agent-1770223640970","targetHandle": "input-tools",- "id": "reactflow__edge-task_agent-1770070864827output-top-chatAgent-1770060581808input-tools",+ "id": "reactflow__edge-gmaps_nearby_places-1770070848430output-tool-travel_agent-1770223640970input-tools","selected": false},{@@ -1198,11 +1000,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "masterSkill-1770213648261",+ "source": "masterSkill-1770223871841","sourceHandle": "output-main",- "target": "task_agent-1770070864827",+ "target": "travel_agent-1770223640970","targetHandle": "input-skill",- "id": "reactflow__edge-masterSkill-1770213648261output-main-task_agent-1770070864827input-skill",+ "id": "reactflow__edge-masterSkill-1770223871841output-main-travel_agent-1770223640970input-skill","selected": false},{@@ -1212,11 +1014,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "social_agent-1770213991252",- "sourceHandle": "output-top",+ "source": "chatTrigger-1769755237666",+ "sourceHandle": "output-main","target": "chatAgent-1770060581808",- "targetHandle": "input-tools",- "id": "reactflow__edge-social_agent-1770213991252output-top-chatAgent-1770060581808input-tools",+ "targetHandle": "input-main",+ "id": "reactflow__edge-chatTrigger-1769755237666output-main-chatAgent-1770060581808input-main","selected": false},{@@ -1226,11 +1028,25 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "whatsappDb-1770080085316",- "sourceHandle": "output-tool",- "target": "social_agent-1770213991252",- "targetHandle": "input-tools",- "id": "reactflow__edge-whatsappDb-1770080085316output-tool-social_agent-1770213991252input-tools",+ "source": "taskTrigger-1770790175153",+ "sourceHandle": "output-main",+ "target": "console-1770790185353",+ "targetHandle": "input-main",+ "id": "reactflow__edge-taskTrigger-1770790175153output-main-console-1770790185353input-main",+ "selected": false+ },+ {+ "type": "smoothstep",+ "animated": true,+ "style": {+ "stroke": "#8be9fd",+ "strokeWidth": 3+ },+ "source": "taskTrigger-1770790175153",+ "sourceHandle": "output-main",+ "target": "chatAgent-1770060581808",+ "targetHandle": "input-task",+ "id": "reactflow__edge-taskTrigger-1770790175153output-main-chatAgent-1770060581808input-task","selected": false},{@@ -1240,11 +1056,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "whatsappSend-1770214044603",+ "source": "taskManager-1770801430177","sourceHandle": "output-tool",- "target": "social_agent-1770213991252",+ "target": "chatAgent-1770060581808","targetHandle": "input-tools",- "id": "reactflow__edge-whatsappSend-1770214044603output-tool-social_agent-1770213991252input-tools",+ "id": "reactflow__edge-taskManager-1770801430177output-tool-chatAgent-1770060581808input-tools","selected": false},{@@ -1254,11 +1070,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "masterSkill-1770214062703",- "sourceHandle": "output-main",- "target": "social_agent-1770213991252",- "targetHandle": "input-skill",- "id": "reactflow__edge-masterSkill-1770214062703output-main-social_agent-1770213991252input-skill",+ "source": "simpleMemory-1770973684811",+ "sourceHandle": "output-memory",+ "target": "chatAgent-1770060581808",+ "targetHandle": "input-memory",+ "id": "reactflow__edge-simpleMemory-1770973684811output-memory-chatAgent-1770060581808input-memory","selected": false},{@@ -1268,11 +1084,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "travel_agent-1770223640970",- "sourceHandle": "output-top",- "target": "chatAgent-1770060581808",- "targetHandle": "input-tools",- "id": "reactflow__edge-travel_agent-1770223640970output-top-chatAgent-1770060581808input-tools",+ "source": "simpleMemory-1770973735815",+ "sourceHandle": "output-memory",+ "target": "web_agent-1770070863433",+ "targetHandle": "input-memory",+ "id": "reactflow__edge-simpleMemory-1770973735815output-memory-web_agent-1770070863433input-memory","selected": false},{@@ -1282,11 +1098,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "gmaps_locations-1770070846926",- "sourceHandle": "output-tool",- "target": "travel_agent-1770223640970",- "targetHandle": "input-tools",- "id": "reactflow__edge-gmaps_locations-1770070846926output-tool-travel_agent-1770223640970input-tools",+ "source": "simpleMemory-1770973759469",+ "sourceHandle": "output-memory",+ "target": "coding_agent-1770070861999",+ "targetHandle": "input-memory",+ "id": "reactflow__edge-simpleMemory-1770973759469output-memory-coding_agent-1770070861999input-memory","selected": false},{@@ -1296,11 +1112,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "gmaps_nearby_places-1770070848430",- "sourceHandle": "output-tool",- "target": "travel_agent-1770223640970",- "targetHandle": "input-tools",- "id": "reactflow__edge-gmaps_nearby_places-1770070848430output-tool-travel_agent-1770223640970input-tools",+ "source": "simpleMemory-1770973783506",+ "sourceHandle": "output-memory",+ "target": "social_agent-1770213991252",+ "targetHandle": "input-memory",+ "id": "reactflow__edge-simpleMemory-1770973783506output-memory-social_agent-1770213991252input-memory","selected": false},{@@ -1310,11 +1126,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "task_agent-1770070864827",- "sourceHandle": "output-main",- "target": "console-1770223720480",- "targetHandle": "input-main",- "id": "reactflow__edge-task_agent-1770070864827output-main-console-1770223720480input-main",+ "source": "simpleMemory-1770973798020",+ "sourceHandle": "output-memory",+ "target": "travel_agent-1770223640970",+ "targetHandle": "input-memory",+ "id": "reactflow__edge-simpleMemory-1770973798020output-memory-travel_agent-1770223640970input-memory","selected": false},{@@ -1324,11 +1140,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "social_agent-1770213991252",- "sourceHandle": "output-main",- "target": "console-1770223743060",- "targetHandle": "input-main",- "id": "reactflow__edge-social_agent-1770213991252output-main-console-1770223743060input-main",+ "source": "web_agent-1770070863433",+ "sourceHandle": "output-top",+ "target": "chatAgent-1770060581808",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-web_agent-1770070863433output-top-chatAgent-1770060581808input-tools","selected": false},{@@ -1338,11 +1154,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "travel_agent-1770223640970",- "sourceHandle": "output-main",- "target": "console-1770223755245",- "targetHandle": "input-main",- "id": "reactflow__edge-travel_agent-1770223640970output-main-console-1770223755245input-main",+ "source": "productivity_agent-1771834433838",+ "sourceHandle": "output-top",+ "target": "chatAgent-1770060581808",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-productivity_agent-1771834433838output-top-chatAgent-1770060581808input-tools","selected": false},{@@ -1352,11 +1168,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "masterSkill-1770223871841",+ "source": "masterSkill-1770080471262","sourceHandle": "output-main",- "target": "travel_agent-1770223640970",+ "target": "productivity_agent-1771834433838","targetHandle": "input-skill",- "id": "reactflow__edge-masterSkill-1770223871841output-main-travel_agent-1770223640970input-skill",+ "id": "reactflow__edge-masterSkill-1770080471262output-main-productivity_agent-1771834433838input-skill","selected": false},{@@ -1366,11 +1182,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "chatTrigger-1769755237666",- "sourceHandle": "output-main",- "target": "chatAgent-1770060581808",- "targetHandle": "input-main",- "id": "reactflow__edge-chatTrigger-1769755237666output-main-chatAgent-1770060581808input-main",+ "source": "gmailRead-1771834572537",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-gmailRead-1771834572537output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1380,11 +1196,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "taskTrigger-1770790175153",- "sourceHandle": "output-main",- "target": "console-1770790185353",- "targetHandle": "input-main",- "id": "reactflow__edge-taskTrigger-1770790175153output-main-console-1770790185353input-main",+ "source": "gmailSearch-1771834571362",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-gmailSearch-1771834571362output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1394,11 +1210,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "taskTrigger-1770790175153",- "sourceHandle": "output-main",- "target": "chatAgent-1770060581808",- "targetHandle": "input-task",- "id": "reactflow__edge-taskTrigger-1770790175153output-main-chatAgent-1770060581808input-task",+ "source": "twitterSearch-1771834599628",+ "sourceHandle": "output-tool",+ "target": "social_agent-1770213991252",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-twitterSearch-1771834599628output-tool-social_agent-1770213991252input-tools","selected": false},{@@ -1408,11 +1224,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "taskManager-1770801430177",+ "source": "twitterUser-1771834600973","sourceHandle": "output-tool",- "target": "chatAgent-1770060581808",+ "target": "social_agent-1770213991252","targetHandle": "input-tools",- "id": "reactflow__edge-taskManager-1770801430177output-tool-chatAgent-1770060581808input-tools",+ "id": "reactflow__edge-twitterUser-1771834600973output-tool-social_agent-1770213991252input-tools","selected": false},{@@ -1422,11 +1238,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973684811",- "sourceHandle": "output-memory",+ "source": "whatsappReceive-1771834543772",+ "sourceHandle": "output-main","target": "chatAgent-1770060581808",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973684811output-memory-chatAgent-1770060581808input-memory",+ "targetHandle": "input-main",+ "id": "reactflow__edge-whatsappReceive-1771834543772output-main-chatAgent-1770060581808input-main","selected": false},{@@ -1436,11 +1252,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973718145",+ "source": "simpleMemory-1771834793747","sourceHandle": "output-memory",- "target": "android_agent-1770080279045",+ "target": "productivity_agent-1771834433838","targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973718145output-memory-android_agent-1770080279045input-memory",+ "id": "reactflow__edge-simpleMemory-1771834793747output-memory-productivity_agent-1771834433838input-memory","selected": false},{@@ -1450,11 +1266,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973735815",- "sourceHandle": "output-memory",- "target": "web_agent-1770070863433",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973735815output-memory-web_agent-1770070863433input-memory",+ "source": "calendarList-1771834551934",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-calendarList-1771834551934output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1464,11 +1280,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973759469",- "sourceHandle": "output-memory",- "target": "coding_agent-1770070861999",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973759469output-memory-coding_agent-1770070861999input-memory",+ "source": "calendarCreate-1771834551084",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-calendarCreate-1771834551084output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1478,11 +1294,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973772769",- "sourceHandle": "output-memory",- "target": "task_agent-1770070864827",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973772769output-memory-task_agent-1770070864827input-memory",+ "source": "sheetsWrite-1771834895583",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-sheetsWrite-1771834895583output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1492,11 +1308,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973783506",- "sourceHandle": "output-memory",- "target": "social_agent-1770213991252",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973783506output-memory-social_agent-1770213991252input-memory",+ "source": "driveUpload-1771834887176",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-driveUpload-1771834887176output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1506,11 +1322,11 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "simpleMemory-1770973798020",- "sourceHandle": "output-memory",- "target": "travel_agent-1770223640970",- "targetHandle": "input-memory",- "id": "reactflow__edge-simpleMemory-1770973798020output-memory-travel_agent-1770223640970input-memory",+ "source": "sheetsRead-1771834893665",+ "sourceHandle": "output-tool",+ "target": "productivity_agent-1771834433838",+ "targetHandle": "input-tools",+ "id": "reactflow__edge-sheetsRead-1771834893665output-tool-productivity_agent-1771834433838input-tools","selected": false},{@@ -1520,15 +1336,15 @@"stroke": "#8be9fd","strokeWidth": 3},- "source": "web_agent-1770070863433",- "sourceHandle": "output-top",- "target": "chatAgent-1770060581808",- "targetHandle": "input-tools",- "id": "reactflow__edge-web_agent-1770070863433output-top-chatAgent-1770060581808input-tools",+ "source": "chatAgent-1770060581808",+ "sourceHandle": "output-main",+ "target": "whatsappSend-1771834542643",+ "targetHandle": "input-main",+ "id": "reactflow__edge-chatAgent-1770060581808output-main-whatsappSend-1771834542643input-main","selected": false}],- "createdAt": "2026-02-19T02:18:48.500Z",- "lastModified": "2026-02-19T08:57:46.000Z",- "version": "0.0.22"+ "createdAt": "2026-02-23T02:43:09.008Z",+ "lastModified": "2026-02-23T12:12:44.316Z",+ "version": "0.0.31"}\ No newline at end of file