API & MCP

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

HTTP API

Twinworks Line Balancing

Solves the simple assembly line balancing problem (type 1) with the Ranked Positional Weight (Helgeson–Birnie) and Largest Candidate rules: tasks with times and precedence relations are assigned to as few stations as possible without exceeding the takt time. Returns the station assignment, line efficiency, balance delay, smoothness index and a ready-to-simulate Twinworks model of the balanced line.

Inputs of Twinworks Line Balancing
FieldTypeDefaultDescription
tasks (required)table—Tasks
taktTimenumber—Takt time. Leave empty to compute it from available time ÷ demand.
availableMinutesnumber—Available production time. Per period, e.g. 450 min per shift.
demandnumber—Demand in that period
methodselect (best, rpw, lcr)"best"Heuristic

Example request

Wheelbarrow-style example: 8 tasks, 450 min shift, demand 270

curl -X POST https://twinworkslinebalance.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"tasks":[{"id":"A","name":"Fit frame","time":60,"predecessors":""},{"id":"B","name":"Mount axle","time":40,"predecessors":"A"},{"id":"C","name":"Fit wheel","time":55,"predecessors":"B"},{"id":"D","name":"Attach tray","time":50,"predecessors":"A"},{"id":"E","name":"Fit legs","time":30,"predecessors":"D"},{"id":"F","name":"Attach handles","time":45,"predecessors":"D"},{"id":"G","name":"Grips","time":20,"predecessors":"F"},{"id":"H","name":"Final check","time":35,"predecessors":"C,E,G"}],"availableMinutes":450,"demand":270,"method":"best"}'

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-line-balance": { "type": "http", "url": "https://twinworkslinebalance.usefulweb.site/mcp" }
  }
}