Worker create
Register a retained worker configuration.
op_sys_command_worker_createOn this page
Use this capability
op-sys --output json tools call op_sys_command_worker_create \ --arguments '{"id":"<id>"}'Request template: replace placeholder identities and supply complete contract-specific objects before use. Required arguments are shown; optional arguments are listed below. MCP requests assume an initialized connection.
Named CLI command: op-sys worker create. Use --help for command-specific flag syntax; the CLI/SDK/MCP examples share arguments; HTTP uses the documented route and body.
Parameters
Arguments are a JSON object. The published schema does not permit unknown top-level fields. Some retained CLI JSON flags are strings containing JSON; follow the declared type.
actorstringOptionalActor recorded on writes and audit entries.
Schema default:
"operator"idstringRequiredmatch_entity_typearrayOptionalNested schema
match_entity_type schema · JSON{ "items": { "type": "string" }, "type": "array"}match_workflowarrayOptionalNested schema
match_workflow schema · JSON{ "items": { "type": "string" }, "type": "array"}metadatastringOptionalmodestringOptionalSchema default:
"passive"Allowed: "passive", "autonomous"
typestringOptionalworker_commandstringOptional
Complete input JSON Schema
{ "additionalProperties": false, "properties": { "actor": { "default": "operator", "description": "Actor recorded on writes and audit entries.", "type": "string" }, "id": { "type": "string" }, "match_entity_type": { "items": { "type": "string" }, "type": "array" }, "match_workflow": { "items": { "type": "string" }, "type": "array" }, "metadata": { "type": "string" }, "mode": { "default": "passive", "enum": [ "passive", "autonomous" ], "type": "string" }, "type": { "type": "string" }, "worker_command": { "type": "string" } }, "required": [ "id" ], "type": "object"}Behavior & authority
Process control requires verified native identity and custody, not simply a PID or a recorded session ID. This is separate from ledger-first record storage.
Rules shared by optional workers & sessions operations
- Worker and session views redact configured secrets. A redacted response is not a credential configuration round trip.
- A record-only stop changes recorded state without claiming process termination. Verified stop and restart require the full process-control contract.
- After uncertain lifecycle operations, inspect session status and provenance before retrying. Never treat pid_alive alone as control authority.
Response
Returns a payload under worker. See the output manual for field semantics and optional fields.
CLI tools/call result: payload.tool.result. Response envelopes across CLI, SDK and MCP ↗
The runtime does not publish a standalone response JSON Schema for this operation. Use the response description and linked output manual; the downloadable input schema is not a response contract.
Errors & retries
session_process_unverified- Use the documented recovery path; do not assume process control from a PID.
session_stop_required- Complete the supported stop flow before restart.
The family-level reasons above are representative, not an exhaustive operation error list.
For an uncertain write, preserve the original request and retry identity. On conflict, inspect current state before deciding what to change.