Operations Runbook
This runbook focuses on day-to-day operation of the current runtime.
Daily Start
- Ensure Android emulator dependencies are available.
- Verify config and environment variables for the target agent.
- Run onboarding if first launch.
- Start emulator and verify booted device if the agent uses emulator.
- Start gateway or run tasks from CLI.
- Validate human-auth readiness if remote approvals are enabled.
Commands for the default agent:
openpocket config-show
openpocket onboard
openpocket emulator status
openpocket emulator start
openpocket gateway startCommands for a managed agent:
openpocket --agent review-bot config-show
openpocket --agent review-bot target show
openpocket --agent review-bot gateway startIf launcher is not in PATH yet, use node dist/cli.js <command>.
Multi-Agent Operational Pattern
Create and inspect agents:
openpocket create agent review-bot --type physical-phone --device R5CX123456A
openpocket create agent ops-bot --type emulator
openpocket agents list
openpocket agents show review-botRecommended long-running control surfaces:
openpocket dashboard manager
openpocket human-auth-relay startThis gives you:
- one install-level dashboard for all agents
- one shared relay hub / optional ngrok tunnel for all managed agents
- one per-agent gateway process per running agent
Runtime Prompt Context Check
Before production runs, validate prompt context injection:
/contextfor summary/context detailfor full report/context detail <fileName>for file snippet/context jsonfor raw JSON
Use this when investigating unexpected model behavior.
Remote Auth Validation (PermissionLab)
Use this playbook to verify remote authorization E2E.
openpocket channels whoami --channel telegram
openpocket test permission-app cases
openpocket test permission-app run --case camera --chat <channel_chat_id>Or for a managed agent:
openpocket --agent review-bot test permission-app run --case camera --chat <channel_chat_id>Expected outcome:
- PermissionLab deploys and launches.
- Agent taps scenario button in emulator or device.
- If scenario requires remote authorization, the configured channel receives a human-auth request with link.
- Phone approval/rejection resolves request.
- Agent resumes and reports final result.
Notes:
- in-emulator Android runtime permission dialogs are auto-handled locally (no remote auth required for those dialogs)
- if you need one public relay URL across many agents, start
openpocket human-auth-relay startbefore these tests
Monitoring
Per running agent, monitor:
- gateway logs for accepted task, progress narration decisions, and final status
- heartbeat logs in
state/heartbeat.log - cron execution state in
state/cron-state.json - task traces in
workspace/sessions/session-*.md - daily memory lines in
workspace/memory/YYYY-MM-DD.md - relay requests in
state/human-auth-relay/requests.json - uploaded auth artifacts in
state/human-auth-artifacts/
Install-level monitoring:
openpocket agents listopenpocket dashboard managermanager/registry.jsonmanager/ports.jsonmanager/locks/targets/*.json
Log tuning:
- use
gatewayLogging.levelto set baseline verbosity (error|warn|info|debug) - disable noisy domains with
gatewayLogging.modules.*(for exampleheartbeat=false,chat=false) - keep
gatewayLogging.includePayloads=falsein production to avoid task/input payload leakage
Safe Stop
- use
/stopin channel chat to request cancellation for the current agent task - runtime checks stop flag between steps and finalizes session as failed with stop reason
- for blocked auth requests, use
/auth pendingthen/auth approve|reject - stop per-agent gateways individually; deleting an agent requires that agent gateway to be stopped first
Debug Evidence Collection
When a run fails, collect artifacts from the relevant agent only:
- gateway lines containing
[OpenPocket][gateway]and[OpenPocket][human-auth] - latest session under that agent
workspace/sessions/ - relay state file
state/human-auth-relay/requests.json - artifact listing under
state/human-auth-artifacts/ /context jsonoutput when prompt diagnosis is needed
When the install-level manager layer fails, also collect:
manager/registry.jsonmanager/ports.json- output from
openpocket agents list - output from
openpocket dashboard manager
Data Retention
Per agent:
- screenshots: bounded by
screenshots.maxCount - sessions/memory/scripts: retained until manually cleaned
Install-level:
- manager registry, ports, and target locks remain until explicitly changed or cleaned
Model Switch
Use /model <name> in the selected chat or edit the selected agent's defaultModel in config.
CLI examples:
openpocket model set --name gpt-5.4
openpocket --agent review-bot model set --provider google --model gemini-3.1-pro-previewWhen changing model, verify:
- profile exists in
models - API key/env is valid
- model supports required tool-calling behavior
Script and Coding Safety
- keep
scriptExecutor.allowedCommandsandcodingTools.allowedCommandsminimal in production - disable tools when not needed (
scriptExecutor.enabled=false,codingTools.enabled=false) - review run artifacts under
workspace/scripts/runs - remember that each agent has its own workspace, so safety policies and generated scripts are isolated per agent
