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
/opt/homebrew/bin/sshpass if sshpass is not in your PATH.-t flag in SSH to prevent TTY allocation hangs in agent environments./opt/homebrew/bin/sshpass -p "a6163484a" ssh -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 node_id, display_name, last_status, is_active FROM agent_nodes;
SELECT * FROM agent_nodes WHERE display_name = 'Media Windows Server';
SELECT email, preferences FROM users;
/app/data/ai-hub.db (with a hyphen).python3 -c with sqlite3 inside the container.sudo -S with echo 'password' | to handle remote authentication without a TTY.WHERE email = '...'), it MUST be nested inside double quotes in the Python string, which must be escaped for the shell.
cur.execute(\"SELECT ... WHERE email = 'jerxie.app@gmail.com'\")python3 -c '...'), the shell will break the command and HANG.ssh -t. It can cause the command to wait for a pseudo-terminal that doesn't exist.sshpass is found (check /opt/homebrew/bin/).[], check the database path and table name.192.168.68.113 is up.