The Web server, CLI and standalone remote worker detect their execution environment
at startup. Windows retains powershell -NoProfile -Command with the existing
UTF-8 wrapper and native exit-code propagation. Termux/Linux/macOS use the shell
from SHELL, or sh when SHELL is unset, with -c. The executable must exist;
POSIX shells supported here are sh, bash, dash, zsh and ksh.
Startup exports AGENTPARK_PLATFORM, AGENTPARK_SHELL,
AGENTPARK_SHELL_EXECUTABLE, PYTHONUTF8=1 and PYTHONIOENCODING=utf-8.
These variables describe the detected host and are inherited by child commands.
They are not overrides; set SHELL before startup to choose a POSIX shell.
Missing or unsupported shells produce an explicit error.
system_tools.execute_console_command and workspace_exec run commands in that
same shell. Local Agent environment context reports it as well; remote worker
shell metadata remains separate. Commands must use the reported shell syntax.
Reporting deadlines keep commands running. On POSIX, explicit Stop terminates the command's process group, including
ordinary child processes that keep output pipes open. Windows keeps its existing
process-tree cleanup. Windows GUI/desktop tools still require Windows.
Use the offline CLI when the WebUI is unavailable:
python -m src.cli doctor
python -m src.cli doctor --jsonDoctor checks Python, Node, npm, rg, workspace config, provider config, MCP server manifests, skill manifests, plugin manifests, graph config JSON files, and node config JSON files. JSON output uses checks[].name, checks[].status, checks[].detail, and optional checks[].path.
Common check prefixes:
providers:config/modelProvider.jsonand provider feature normalizationmcp_server:<name>: MCP transport and required fieldsskill:<id>:SKILL.md,skill.json, resources, andagents/*.yamlplugin:<id>:agentpark.plugin.jsonor adapted plugin manifestgraph_config:<graph>: persisted graph topology confignode_config:<graph>/<node>: persisted node config contract
Symptoms:
- WebUI config list returns an explicit JSON error.
- Apply fails with
node config contains invalid JSON. manage_agent_capabilitiesreturnsNodeConfigFormatError.
Commands:
python -m src.cli config validate --graph <graph_id> --node <node_id>
python -m src.cli doctor --jsonFix the reported memories/<graph_id>/<node_id>/config.json file as a JSON object. Do not replace it with {} unless the node is intentionally being rebuilt from scratch.
Symptoms:
- Graph list or graph load returns an explicit JSON error.
- Graph runner events include
graph_config_read_failed. doctorreportsgraph_config:<graph_id>.
Fix the reported memories/<graph_id>/config.json file as a JSON object. A damaged graph config is not treated as an empty topology because that can hide broken links and node references.
List available and selected capabilities without starting FastAPI:
python -m src.cli capabilities list --graph <graph_id> --node <node_id>Enable or disable a capability:
python -m src.cli capabilities enable --kind skill --name openai-docs --graph <graph_id> --node <node_id>
python -m src.cli capabilities disable --kind mcp --name docs --graph <graph_id> --node <node_id>Changes take effect on the next Agent run.
If a newly added tool, skill, or plugin does not appear immediately, refresh discovery caches:
python -m src.cli capabilities list --graph <graph_id> --node <node_id> --refresh --jsonStartup and runner recovery follow the state contract in docs/runtime-state-machine.md.
Useful signals:
startup_node_state_recoveredinmemories/<graph_id>/runner.events.jsonlnode_working_recoveredinmemories/<graph_id>/runner.events.jsonlpending_count,inflight,_stop_requested, andstatein the node config
If a node is stuck in working without inflight, start or wake the graph runner. It should return the node to idle and keep pending work queued. If a node is working with inflight, do not manually requeue it unless the process is known dead; use node stop/cancel first so the active operation has a chance to finish or observe cancellation.
The file API only resolves paths under the AgentPark workspace root. Relative paths are resolved from the workspace root, and absolute paths or file:// URLs outside that root return 403. The workspace root itself cannot be renamed or deleted through /api/files/*.
The Web API accepts requests from all browser origins. Chrome Private Network Access preflight requests are also accepted without additional environment configuration so remote WebUIs and devices on the local network can connect directly.
MCP materialization records lifecycle diagnostics. To inspect them through the shared descriptor model:
python -m src.cli capabilities list --graph <graph_id> --node <node_id> --jsonLook under capabilities.mcp.descriptors[].diagnostics.
Current states include starting, ready, failed, and stopped. A failed startup appears as status: error with the original exception text. The current runtime uses session-scoped MCP materialization; long-lived process supervision is not yet a separate daemon.
Packaged artifacts include the offline CLI in the same executable:
dist\AgentPark.exe doctor --json
dist\AgentPark.exe capabilities list --graph <graph_id> --node <node_id> --jsonThe package includes docs/, .agents/skills/, and plugins/ beside the executable. This keeps doctor checks and default capability discovery aligned with the runtime resources used by source checkout runs.