Skip to content

Workers

A worker is a process that connects to the ModelReins coordinator, pulls jobs from the queue, and processes them using a configured provider.

Terminal window
modelreins worker start --name my-laptop --provider ollama
  1. Register — worker announces itself to the coordinator with its name, provider, and capabilities.
  2. Poll — worker checks the queue for jobs matching its provider.
  3. Process — worker sends the job to its provider and streams the result back.
  4. Report — worker marks the job complete and updates cost/token metrics.
{
"worker": {
"name": "my-laptop",
"provider": "ollama",
"concurrency": 2,
"tags": ["local", "code-review"]
}
}
Terminal window
modelreins worker list # See all workers
modelreins worker info <id> # Details on one worker
modelreins worker pause <id> # Stop picking up jobs
modelreins worker resume <id> # Resume picking up jobs
modelreins worker stop <id> # Disconnect and shut down

Workers can have tags that routing rules match against. This lets you send specific job types to specific machines. See Routing for details.