Skip to main content

lamellar

lamellar

Armor for small local models: a small, readable, fully offline agent toolkit that checks its work before handing it to you.

Website: https://lamellar.org

Status: in development (alpha). Provided as is, with no guarantee of support.

How lamellar works: you give a task and your rules, the local model drafts an answer, the armor checks the draft against every stored rule, and only a passing answer reaches you. A failing draft is sent back with the reason for a rewrite. Risky commands ask you first. Everything runs on your machine.

How it works. You give a task and your rules. The local model writes a draft. Before you see it, the armor checks the draft against every rule you stored. If it passes, you get the answer. If it fails, it goes back to the model with the reason and is rewritten, up to 3 times. If it still fails, you get it with a note saying which rule was missed. Risky commands stop and ask you first. All of it runs on your machine.

Install

curl -fsSL https://lamellar.org/install.sh | sh        # Linux, macOS

No curl? wget -qO- https://lamellar.org/install.sh | sh. Windows is not supported yet.

Already have Ollama and a model? Name it, and nothing is downloaded or reinstalled:

curl -fsSL https://lamellar.org/install.sh | LAMELLAR_MODEL=qwen3.8:27b-96k sh

Prefer pip? It installs the same thing in two steps:

pip install lamellar
lamellar setup

Either way, it installs Ollama if needed, picks a model for your GPU, opens http://localhost:8102/ and runs lamellar doctor. Details: docs/INSTALL.md.

With and without lamellar

Comparison table. Without lamellar: you repeat your rules in every prompt, read every answer yourself, mistakes reach you, nothing stops a bad command, long tasks overflow the context, and there is no record of whether rules were followed. With lamellar: rules are said once and stored, code checks every answer, failures are rewritten, risky commands ask first, long conversations are compacted, and there are stats per rule.

Same model, same machine. The difference is what happens around the model:

  • Rules are said once. Say "from now on, never write ..." and lamellar reads the rule back to you, stores it after you confirm, and applies it to every later answer.
  • Checked by code, not by the model. Forbidden words, required text, a length limit (in characters) and regex patterns are tested by plain code on every answer, or on the file it delivers. Rules that code cannot test (for example "sound friendly") are passed to the model as a reminder only.
  • Failures go back, not to you. A failing answer is returned with the reason and rewritten, up to 3 times. If it still fails, it is delivered with a note saying which rule was not met.
  • Proof. Each rule keeps a record: passed first time, fixed after a bounce, still failing.

What it is

  • An agent that runs on your own machine. It talks to a local model through Ollama, runs shell commands and edits files in its working directory. Nothing leaves your computer.
  • Armor. A lamellar is armor made of many small plates. Here the plates are rules: your requirements are stored, every answer is checked against them before delivery, and failed answers are sent back for a rewrite.
  • Guard rails. Commands that touch credentials, system config, scheduling or services stop and ask a human first. Each command has a time and memory limit.
  • Small and readable. About two thousand lines of Python, standard library only. Long conversations are compacted inside the core, so it keeps working on a 16 GB card.
  • A web interface included. Open http://localhost:8102/, or connect Open WebUI or any OpenAI-compatible client to /v1.

Which model you get

GPU memory       model          context
16 GB or more    qwen3.8 27B    96k
8 to 15 GB       qwen3.5 9B     32k
4 to 7 GB        qwen3.5 4B     32k
no GPU           qwen3.5 2B     16k, slow

Provisional; it will be replaced by measured results. Apple Silicon is picked by unified memory. Override with ... | LAMELLAR_MODEL=qwen3.5:9b sh.

After installing

lamellar start | stop | status | logs
lamellar doctor
lamellar run "summarise the CSV files in this folder"

Layout

  • lamellar/core/ loop, tools, command execution
  • lamellar/armor/ requirements store, checks, bounce-back, guard
  • lamellar/entry/ web interface, queueing, conversations
  • lamellar/doctor.py lamellar doctor: checks the install and says how to fix what is wrong
  • cli.py command-line entry point
  • EVENTS.md event format between the layers
  • site/ the lamellar.org landing page

Hard rule: core and armor must not import entry.

Configuration uses JSON (config.example.json): the core supports Python 3.10, which has no built-in TOML reader, and avoids any external dependency.

License

Apache-2.0. Copyright 2026 The lamellar Authors. See LICENSE.

Metadata

Release files for lamellar 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lamellar 0.2.1
File Size Uploaded Provenance Actions
lamellar-0.2.1.tar.gz 69.5 kB With provenance Details for lamellar-0.2.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lamellar 0.2.1
File Interpreter ABI Platform Actions
lamellar-0.2.1-py3-none-any.whl Python 3 none any Details for lamellar-0.2.1-py3-none-any.whl

Total release size: 133.7 kB

Release files / lamellar-0.2.1.tar.gz

Download URL lamellar-0.2.1.tar.gz
Size 69.5 kB
Tags Source
SHA-256 checksum
How to use checksums
27b0f18323b862bb71a6b745707217dffc1813516bf152d9563ce1f7e30a3632
BLAKE2b-256 checksum
How to use checksums
f79d412a011fa48fe24703e98409d6e3a590cc82275dd0d86ef8f71edbc8a496
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Release files / lamellar-0.2.1-py3-none-any.whl

Download URL lamellar-0.2.1-py3-none-any.whl
Size 64.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4d8b7e285aa4d5686cff552b7d7ffcef7dc71d7478d1b6666671e0777f25a4f1
BLAKE2b-256 checksum
How to use checksums
43f3e71feb9056630162b92f724229686c36667ab59f674371f61c7d8d687ae4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

Security for lamellar 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for lamellar-0.2.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 16, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page