Garry's Opinionated OpenClaw/Hermes Agent Brain
TypeScript
{
"content": [
{
"type": "text",
"text": "{\n \"status\": \"unavailable\",\n \"reason\": \"lock_held\",\n \"why\": \"This brain ({{HOME}}/.gbrain/brain.pglite) is open in another `gbrain serve` (PID {{PID}}), usually started by another agent session, so this server cannot open it.\",\n \"brain_path\": \"{{HOME}}/.gbrain/brain.pglite\",\n \"config_path\": \"{{HOME}}/.gbrain/config.json\",\n \"lock_owner\": {\n \"pid\": \"{{PID}}\",\n \"transport\": \"stdio\",\n \"serve\": true\n },\n \"fix\": {\n \"mcp\": {\n \"tool\": \"gbrain_status\",\n \"arguments\": {}\n },\n \"consent\": [],\n \"actor\": \"user\",\n \"why\": \"Close the session that owns the brain (another `gbrain serve` (PID {{PID}}), usually started by another agent session); then call gbrain_status again and this server opens the brain in place (re-checked at most every 5 s). If your client does not refresh its tool list after recovery, restart this MCP server.\",\n \"user_message\": \"Your gbrain brain is already open in another gbrain serve (PID {{PID}}), usually started by another agent session, so this session can't use memory right now. Close that session and I'll reconnect, or I can set up one shared gbrain server so both sessions work at once. Which do you prefer?\",\n \"requires_exclusive\": false\n },\n \"user_message\": \"Your gbrain brain is already open in another gbrain serve (PID {{PID}}), usually started by another agent session, so this session can't use memory right now. Close that session and I'll reconnect, or I can set up one shared gbrain server so both sessions work at once. Which do you prefer?\",\n \"decisions\": [\n {\n \"id\": \"lock_recovery\",\n \"question\": \"Two agent sessions want the same brain. Close the other session, or share one HTTP server?\",\n \"options\": [\n {\n \"id\": \"close_owner\",\n \"label\": \"Close another gbrain serve (PID {{PID}}), usually started by another agent session; this server recovers on the next gbrain_status call.\"\n },\n {\n \"id\": \"share_http\",\n \"label\": \"Run one shared `gbrain serve --http` and connect every harness to it (writes harness config, mints tokens); the full plan is share_http_plan.\",\n \"argv\": [\n \"kill\",\n \"{{PID}}\"\n ]\n }\n ],\n \"default\": \"close_owner\",\n \"default_reason\": \"Nothing is installed or reconfigured; the brain comes back as soon as the other session ends.\"\n }\n ],\n \"share_http_plan\": {\n \"argv\": [\n \"kill\",\n \"{{PID}}\"\n ],\n \"command\": \"kill {{PID}}\",\n \"consent\": [],\n \"actor\": \"user\",\n \"why\": \"Stop another `gbrain serve` (PID {{PID}}), usually started by another agent session first (or quit that session); the shared server needs the brain's single-writer lock.\",\n \"requires_exclusive\": false,\n \"then\": {\n \"argv\": [\n \"gbrain\",\n \"serve\",\n \"--http\"\n ],\n \"command\": \"gbrain serve --http\",\n \"consent\": [\n \"persistent_install\"\n ],\n \"actor\": \"user\",\n \"why\": \"Run ONE shared HTTP server for every agent session on this machine (keep it running, e.g. under autopilot or a terminal).\",\n \"requires_exclusive\": true,\n \"then\": {\n \"argv\": [\n \"gbrain\",\n \"bootstrap\",\n \"harness\",\n \"--harness\",\n \"all\",\n \"--yes\"\n ],\n \"command\": \"gbrain bootstrap harness --harness all --yes\",\n \"consent\": [\n \"persistent_install\",\n \"credentials\"\n ],\n \"actor\": \"user\",\n \"why\": \"Mints one bearer token per detected harness through the running HTTP server and rewrites each harness MCP entry to it (each stdio entry keeps working until its harness is rewired).\",\n \"user_message\": \"I can connect your agent apps to the shared gbrain server so every session uses memory at once. That stores an access token in each app's config and pre-approves gbrain's tools. OK?\",\n \"verify\": {\n \"argv\": [\n \"gbrain\",\n \"doctor\",\n \"--only\",\n \"harness_wiring\",\n \"--json\"\n ]\n },\n \"docs\": \"{{DOCS_BASE}}/docs/guides/remote-mcp.md\",\n \"requires_exclusive\": false\n }\n }\n },\n \"checked_at\": \"{{TIME}}\",\n \"contract_version\": 1,\n \"surface\": \"full\",\n \"surface_source\": \"default\"\n}"
}
]
}