Skip to content
OAOpenAppPhysical Security as a Service
Login

LAN agent

The LAN agent tag backs local gateway / CLI provisioning: discover supported protocol versions (LanAgentMetaResponse), mint short-lived bootstrap keys (LanAgentBootstrapTokenRequest / LanAgentBootstrapTokenResponse), fetch a bash installer (text/x-shellscript), swap a browser/session credential for an agent JWT (LanAgentCliTokenResponse), and drive integration-scoped queues (post_integration_lan_agent_task_spec, get_integration_lan_agent_tasks).

Related: URLs under /integrations/{integration_id}/lan-agent/... are also summarized in Integrations.

ConcernHTTPoperationIdNotes
Agent metadataGET /lan-agent/metaget_lan_agent_metaLanAgentMetaResponse. Published bundle omits security (readable before auth in many deployments).
Bootstrap keyPOST /lan-agent/cli/bootstrap-tokenpost_lan_agent_cli_bootstrap_tokenJSON body; bearer_auth. 500 / 503 for signing or infra.
Bootstrap scriptGET /lan-agent/cli/bootstrap.sh?key=…get_lan_agent_cli_bootstrap_shQuery key (ULID) required. 200text/x-shellscript (not JSON).
Agent JWTPOST /lan-agent/cli/tokenpost_lan_agent_cli_tokenbearer_auth. LanAgentCliTokenResponse. Empty body on the wire unless your deployment extends it.
Task queue listGET .../integrations/{integration_id}/lan-agent/tasksget_integration_lan_agent_tasksX-Org header required; 200 body described as a JSON object with task_ids.
Task spec pushPOST .../integrations/{integration_id}/lan-agent/task-specpost_integration_lan_agent_task_specX-Org + LanAgentTaskSpecRequest (task_id, lan_protocol_version, payload). LanAgentTaskSpecResponse. 426 if the agent/protocol is too old.

Treat GET /lan-agent/cli/bootstrap.sh as a shell script download. Go’s LANAgentAPIService returns *http.Response — read Body as bytes/text. Python and Rust openapp_sdk JSON decoders do not treat text/x-shellscript as a success body; avoid LanAgentClient.bootstrap_script() for real downloads until a bytes/stream helper exists.

CapabilityPythonRust (openapp_sdk)GoTypeScript (AsyncClient)
/lan-agent/metaclient.lan_agent.meta()client.lan_agent().meta()LANAgentAPI.GetLanAgentMetaNot on façade
Bootstrap tokenlan_agent.bootstrap_token(...)lan_agent().bootstrap_token(...)PostLanAgentCliBootstrapTokenNot on façade
Bootstrap script (?key=)Prefer raw HTTP — JSON bridge cannot parse shell outputPrefer Transport::request_* streaming / raw bytesGetLanAgentCliBootstrapSh.KeyNot on façade
/lan-agent/cli/tokenlan_agent.token(**body) — often {}lan_agent().token(...)PostLanAgentCliTokenNot on façade
task-spec / taskssubmit_task_spec / list_tasksThin helpers (no explicit X-Org) — use transport + RequestSpec (extra_headers) for strict parityPostIntegrationLanAgentTaskSpec, GetIntegrationLanAgentTasks + .XOrg(...)Not on façade

401 on protected routes.post_integration_lan_agent_task_spec may return 426 (upgrade agent/protocol). post_lan_agent_cli_bootstrap_token may return 503 when JWKS / Redis / base URL is misconfigured.get_lan_agent_cli_bootstrap_sh returns 401 for bad/expired keys.

meta = await client.lan_agent.meta()

Mint bootstrap key (POST /lan-agent/cli/bootstrap-token)

Section titled “Mint bootstrap key (POST /lan-agent/cli/bootstrap-token)”

Replace task_id with the queued task ULID returned by get_integration_lan_agent_tasks (shape is deployment-specific).

out = await client.lan_agent.bootstrap_token(
api_base_url="https://app.example.com/api/v1",
task_id=task_ulid,
integration_id=integration_ulid,
)
ids = await client.lan_agent.list_tasks(integration_id)

Exchange session for agent JWT (POST /lan-agent/cli/token)

Section titled “Exchange session for agent JWT (POST /lan-agent/cli/token)”

Call with the same Bearer or session cookie you use for the dashboard API. The wire body is usually an empty JSON object ({}).

jwt_payload = await client.lan_agent.token()

Add keyword arguments to token(...) only if your deployment extends the request body.

Push task spec (POST /integrations/{integration_id}/lan-agent/task-spec)

Section titled “Push task spec (POST /integrations/{integration_id}/lan-agent/task-spec)”

LanAgentTaskSpecRequest requires task_id, lan_protocol_version, and payload. X-Org is required on the wire (Go .XOrg(...); Rust uses transport + RequestSpec with extra_headers, same pattern as List queued tasks above).

spec = await client.lan_agent.submit_task_spec(
integration_id,
lan_protocol_version=1,
task_id=task_ulid,
payload={"example": "opaque-to-server"},
)

HTTP contract: API reference · OpenAPI JSON