> **Box is the main surface.** All operator work goes through Box (box.muse-dev.online). The web UI, `box` CLI, and agents share the same API endpoints. No UI-only powers.
Welcome, operator. The NetVM environment provides you with the unified `box` command line tool (`/usr/local/bin/box`) for executing tasks, spawning sub-agents, and communicating with peers across the fleet.
---
## 1. Spawning Sub-Agents (`box deploy subagent`)
When you receive a complex task, large audit, or background verification, **prioritize delegating sub-components to an autonomous sub-agent**.
box thread view <agent> "<alias>"# View thread by registered alias (e.g. "646 tasks", "heartbeat")
```
---
## 3.2. Operator Passkey & Key Material Architecture
> **Crucial Reality**: Key material and administrative passkeys live in a **single file (`.txt`) on the Google Cloud VM (`34.139.37.135`)**. **NO passkeys or secret stores exist on the dedicated BL (`100.123.153.75`)**.
### Why This Matters:
- Front-door console access (`https://box.muse-dev.online/`) is secured by operator PIN `3128` (or the passkey in the VM text file).
- Operators frequently forget the passkey; it is permanently retrievable via `box passkey` or from the text file on the VM.
- **Agent Rule**: Agents must **NEVER** attempt to grep `bl` or invent imaginary keys. Secrets never reside on the compute node.
### How Agents Get Key Access / Operator Approval:
When an agent or automated task requires elevated privileges, key material, or operator confirmation:
1.**Signal the Request**:
- In automated scripts: exit with code `2` (the standard `APPROVAL_NEEDED` convention per `INFRA.md`).
- In sidechats: post `APPROVAL_NEEDED: <details of required key / action>` in the task sidechat (e.g. `646 tasks`, `pip tasks`, `#jobs`, `heartbeat`).
2.**Operator Verification**:
- The human operator reviews the request in the sidechat or via `box approvals check`.
- If approved, the operator retrieves the key from the single `.txt` file on the VM (or submits transient OTP via `box cred submit-otp`).
3.**Execution**:
- The operator authorizes the flow or enters the credential transiently. No raw credentials are saved to `bl` or git.
Chromebox browser contexts prune and store chat history aggressively, making direct in-chat execution of long-running build, test, and shell tasks token-expensive and prone to context loss.
To overcome this, Chromebox agents offload multi-turn execution to persistent tmux panes on `/tmp/tmux-muse.sock` using the **Flow Engine** (`bin/flow_engine.py`). Raw stdout/stderr streams to disk (`logs/flows/<flow_id>.log`), and agents read back only concise status and incremental output deltas.
### Lifecycle & Primitives:
1.**Start Flow**:
Spawns pane `flow-<agent>-<id>` and launches command wrapped with an exit code sentinel.
Inspects the pane for execution state (`working`, `idle`, `waiting_prompt`, `finished`, `failed`), exit code, and reads newly appended log output since the last read cursor.
```text
[TOOL flow.read {"flow_id": "audit-tests"}]
```
*CLI:* `box flow read audit-tests --lines 40`
3. **Advance or Respond to Prompts**:
Sends follow-up commands or keystrokes (such as interactive menu selections) without re-running the whole prompt.
When jobs are dispatched to agents via `bin/job-dispatch.py`, they are wrapped in an actionable, authentic **Operator Directive** generated by `bin/prompt_envelope.py`.
The harvester (`bin/response-harvester.py`) detects this line and records the job outcome.
---
## 6. Best Practices & Invariants
1. **Sidechat-First Policy**: All inter-agent coordination, subagent tasks, and heartbeats must stay in **sidechats**. Do not send automated routine messages to `main` chat (see [CHAT_POLICY.md](file:///home/super/Projects/NetVM/CHAT_POLICY.md)).
3. **Execution Reality**: Work is only real if tool calls ran. Never provide purely verbal confirmation for tasks requiring system inspection or execution.
4. **Attribution & Result Tagging**: For scheduled jobs and work orders, always conclude your response with `[RESULT <job_id>] <summary>`.
Agents have access to a structured internal `.md` and `.json` database in `docs_internal/` for looking up agent sentence structures, regex passing, and assistive surfaces for `box.muse-dev.online`:
```bash
# Query surfaces, DOM selectors, and REST endpoints for box.muse-dev.online
box docs surfaces jobs
box docs surfaces dms
# Inspect agent sentence structures and conversational contracts
box docs sentence work_order
box docs sentence result
# Test strings or evaluate against canonical regex patterns
box docs regex result --test "[RESULT 7fce46e0] OK 14 endpoints verified"