A process is a stateful execution unit in MCI. When a client submits code, MCI creates a process with a unique process ID (PID). Process execution does not block the client request unless blocking is explicitly requested. See Architecture for how processes fit into the overall system: environments execute code, adapters perform service invocations, and pools manage module lifecycle.Documentation Index
Fetch the complete documentation index at: https://modelcontrolinterface.mintlify.app/llms.txt
Use this file to discover all available pages before exploring further.
Process Model
Each process contains:pid: unique process identifierref: optional reference labelstate: lifecycle phasestatus: execution outcome
Process States
idle: not executingqueued: waiting for executionrunning: currently executingterminating: shutting down after a kill signal
Process Status Values
null: no outcome yetsuccess: execution completed successfullyfailed: execution ended with an errortimeout: execution exceeded timeout limitcanceled: execution was canceled by a kill signal
Create a Process
Endpoint:POST /processes
Request body:
codeis requiredrefis optional and trimmedtimeoutmust be a positive integer ornullblockis optional and controls whether the request waits for completion
Blocking and Non-Blocking Behavior
- Non-blocking: create returns immediately with
pid; client polls for result later. - Blocking (
block: true): create waits until process returns toidleand then returns final process state.
ProcessService implementation schedules processes in a FIFO queue and executes them one at a time (single active execution). Clients may submit many processes concurrently, but they will be queued and executed serially by the server.
Timeout Behavior
- Default timeout is 30000 ms if not provided.
timeout: nulldisables timeout.- If execution exceeds timeout, process status becomes
timeout.
Process Signals
Run signal
Endpoint:POST /processes/:pid/signals/run
Optional body:
- Process must be
idlebefore run signal. - If process has existing outputs,
force: trueis required to overwrite. block: truewaits until process returns toidle.
Kill signal
Endpoint:POST /processes/:pid/signals/kill
- If process is
queued, it becomesidlewith statuscanceled. - If process is
running, it moves toterminating, then toidlewith statuscanceled.
Retrieve Process Data
GET /processeslist processes with optional filters:state,status,refGET /processes/:pidget process metadataGET /processes/:pid/codeget submitted codeGET /processes/:pid/outputget structured output (only whenstate = idle)GET /processes/:pid/stdoutget stdout (only whenstate = idle)GET /processes/:pid/stderrget stderr (only whenstate = idle)
Minimal Flow Example
POST /processeswith code- Receive
{ "pid": ... } - Poll
GET /processes/:piduntilstateisidle - Fetch
GET /processes/:pid/output,stdout, orstderr