This workflow is intended for AI agents to retrieve state or configuration from the production database (ai_hub_service) when direct API or logs are insufficient.
192.168.68.113axieyangba6163484aai_hub_service/app/data/ai_hub.db// turbo
THE_SQL_QUERY with your specific query.sshpass -p "a6163484a" ssh -t -o ConnectTimeout=5 -o StrictHostKeyChecking=no axieyangb@192.168.68.113 "echo 'a6163484a' | sudo -S docker exec ai_hub_service python3 -c 'import sqlite3; conn = sqlite3.connect(\"/app/data/ai_hub.db\"); cur = conn.cursor(); cur.execute(\"THE_SQL_QUERY\"); print(cur.fetchall()); conn.close()'"
SELECT preferences FROM users WHERE email = 'jerxie.app@gmail.com';
SELECT settings_json FROM system_settings;
SELECT id, email, role FROM users;
UPDATE users SET role = 'admin' WHERE email = 'jerxie.app@gmail.com';
SELECT node_id, display_name, last_status, is_active FROM agent_nodes;
INSERT INTO agent_nodes (node_id, display_name, description, registered_by, skill_config, invite_token, last_status, is_active, created_at)
VALUES ('test-node-01', 'Test Node 01', 'Manual entry', 'ADMIN_USER_ID', '{}', 'manual-invite-token', 'offline', 1, CURRENT_TIMESTAMP);
python3 -c with sqlite3 to ensure compatibility inside the container.sudo -S with echo 'a6163484a' | to handle remote authentication properly.SELECT statements for inspection. Use UPDATE/INSERT only for manual maintenance or recovery.\\\" for double quotes inside the python command string.