API & MCP

Everything a person can do on Twinworks Bottleneck Analysis, a program or AI agent can do with the same inputs and get the identical result.

HTTP API

Twinworks Bottleneck Analysis

Ranks the stations of a Twinworks factory model by how often they constrain the line (active-period method: sole and shifting bottleneck shares), explains the dominant loss (working, breakdowns, setups, waiting for operators) and simulates typical improvements of the top bottleneck — an extra server, a 10 % faster cycle, faster repairs, shorter setups, more operators or a bigger buffer — with paired confidence intervals.

Inputs of Twinworks Bottleneck Analysis
FieldTypeDefaultDescription
modeltextarea—Model or project JSON. A Twinworks project (.twinworks.json, format "twinworks-project") or a bare model with "nodes" and "links". Times in seconds, lengths in metres. Leave empty and pick a template instead.
templateselect (, three-station-line, line-with-failures, assembly-two-feeders, job-shop-routings, bottleneck-buffer-sizing, conveyor-packaging, mm1-validation, shared-forklifts, plc-control)—Or start from a template
replicationsinteger5Replications
horizonHoursnumber—Run length per replication. Overrides the model setting.
whatIfbooleantrueSimulate improvement options for the top bottleneck

Example request

Bottleneck demo (5 stations, tiny buffers)

curl -X POST https://twinworksbottleneckanalysis.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"template":"bottleneck-buffer-sizing","replications":5,"horizonHours":8}'

Every result contains

inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.

MCP (Model Context Protocol)

{
  "mcpServers": {
    "twinworks-bottleneck-analysis": { "type": "http", "url": "https://twinworksbottleneckanalysis.usefulweb.site/mcp" }
  }
}