---
type: Attested Computation
title: local
identifier: llm/local
description: One chat completion from a local, OpenAI-compatible model server (LM Studio, llama.cpp, Ollama) from a prompt file and an optional system prompt file, written to response.md; no key. With think=false a reasoning model is asked to answer at once (an empty think block is prefilled), and any think block left in the answer is removed. stdout is a one-line summary, never the completion.
pack: llm
tags:
- internet
runtime: fragletc
image: ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522
network: required
stdin: none
execution_class: environmental
procedure_hash: sha256:3dec4934f88e20a6e2ea6e9252c66d45483108fc856432f470f45243cb3a3431
parameters:
- name: prompt
  type: file
  required: false
  description: Prompt file (the user message)
- name: prompt_text
  type: string
  required: false
  description: Inline prompt, when there is no prompt file
- name: system
  type: file
  required: false
  description: System prompt file
- name: model
  type: string
  required: true
  description: The model's id on the server, e.g. qwen/qwen3.8-27b
- name: endpoint
  type: string
  required: false
  description: 'The server''s chat completions URL as the container reaches it; empty: LM Studio on this machine (host.docker.internal, port 11234)'
- name: temperature
  type: string
  required: false
  default: '0.7'
  description: Sampling temperature
- name: seed
  type: string
  required: false
  default: '42'
  description: Sampling seed
- name: max_tokens
  type: string
  required: false
  default: '400'
  description: Most tokens to generate
- name: think
  type: string
  required: false
  default: 'false'
  description: Let a reasoning model think before it answers
- name: timeout
  type: string
  required: false
  default: '900'
  description: 'Seconds to wait for the answer: a local server may be busy with another agent''s call, or loading the model'
computation: https://tools.ofthemachine.com/llm/local.py
executor:
  resource: https://github.com/ofthemachine/fraglet
  receipt:
  - schema
  - fragletc
  - procedure
  - procedure_hash
  - image
  - image_digest
  - network
  - stdin_mode
  - params
  - inputs
  - argv
  - env
  - memo_key
  - started
  - finished
  - exit_code
  - stdout
  - outputs
  format: fraglet-receipt/2 (fragletc --receipt <path>, or FRAGLETC_RECEIPT_DIR)
attester:
  resource: https://tools.ofthemachine.com/receipt/attest.py
  method: 'deterministic, no re-execution: procedure_hash equals sha256 of computation; memo_key recomputes from the receipt''s own fields; claimed params and any artifact hash match the receipt'
generated:
  by: process:tools/catalog/compile.py
  at: '2026-11-13T18:27:40Z'
outputs:
- response.md
---

# local

One chat completion from a local, OpenAI-compatible model server (LM Studio, llama.cpp, Ollama) from a prompt file and an optional system prompt file, written to response.md; no key. With think=false a reasoning model is asked to answer at once (an empty think block is prefilled), and any think block left in the answer is removed. stdout is a one-line summary, never the completion.

Use when a workflow step needs text from a language model running on this machine (LM Studio, llama.cpp, Ollama): no key, no cloud.

# Schema

## Parameters
- `prompt` (file, optional) — Prompt file (the user message)
- `prompt_text` (string, optional) — Inline prompt, when there is no prompt file
- `system` (file, optional) — System prompt file
- `model` (string, required) — The model's id on the server, e.g. qwen/qwen3.8-27b
- `endpoint` (string, optional) — The server's chat completions URL as the container reaches it; empty: LM Studio on this machine (host.docker.internal, port 11234)
- `temperature` (string, optional, default `0.7`) — Sampling temperature
- `seed` (string, optional, default `42`) — Sampling seed
- `max_tokens` (string, optional, default `400`) — Most tokens to generate
- `think` (string, optional, default `false`) — Let a reasoning model think before it answers
- `timeout` (string, optional, default `900`) — Seconds to wait for the answer: a local server may be busy with another agent's call, or loading the model

## Outputs
- `response.md` (declared file under /output)

# Execution

The computation is [`llm/local.py`](https://tools.ofthemachine.com/llm/local.py) (frontmatter `computation`; in `tools.tar.gz` the same file sits at `llm/local.py` beside this bundle), run by `fragletc` in `ofthemachine/python3@sha256:a015b4f9f0e7c1648f8fcd4164f6a296dd3c9189404f88f333a9764d08d13522` with network `required`. Its identity is `procedure_hash` = sha256 of that file, shebang included — the same value every receipt records. Parameters are passed as `-p name=value`; `--receipt run.json` (or `FRAGLETC_RECEIPT_DIR`) writes the receipt, a `fraglet-receipt/2` JSON document with the fields listed under `executor.receipt`.

# Attestation

A run's receipt is attested with [`receipt/attest.py`](https://tools.ofthemachine.com/receipt/attest.py): the computation that ran is this script (`procedure_hash`), the receipt is internally consistent (`memo_key` recomputes from its own fields), the claimed parameters are the ones that ran, and an artifact claimed as an output hashes to what the receipt recorded. No re-execution: attestation is provenance fidelity, not reproduction.

Environmental: the tool reaches the network, so outputs depend on state outside its inputs; the receipt records exactly what ran and what came out and makes no reproduction claim.

Skill: [SKILL.md](https://tools.ofthemachine.com/llm/SKILL.md)
