LabOpen source · Apache-2.0

The Lab.

Two systems that work at different levels. One makes an agent work; the other makes a model faster. Neither needs the other to be useful, and both are complete on your own machines.

What we build

FrameworkInferenceProtocolsDataDeploymentMeasurement

What it is for

AgentsModelsAppsMachines

01

Praecise Harness

Open source · Framework

The framework for AI agents. A folder is an app.

Write what an agent is for, what it knows and what it may act through. Which model runs, when to escalate, how to ground an answer, how to remember, how to resume a workflow that stopped for a person — derived, not configured.

my-app/ ├─ agents/support.ts ├─ workflows/refund.ts ├─ functions/lookup.ts ├─ memory/faq.md ├─ tools/ ├─ stores/ ├─ guard.ts └─ .env
// agents/support.ts
import { agent } from "praecise";

export default agent({
  role: "Customer support for Acme.",
  tools: ["refund"],
});
FrameworkProtocolsDataAgents
Language
TypeScript
Licence
Apache-2.0
Package
praecise on npm, 0.1.x
Runtime
Node 22 or newer, no dependencies
Serves
Chat UI, REST, MCP, A2A, AG-UI
Tools
Any MCP server; any OpenAPI document
Stores
SQL, document, time-series, vector
Source
github.com/Praecise/praecise-harness

Source on GitHub

praecise on npm

  1. 01

    One dial

    quality: fast, balanced or best. Each question goes to the cheapest model that can answer it and climbs only when that one is not confident enough.

  2. 02

    Workflows that stop and resume

    Seven step kinds, a durable approve gate, and a journal that can resume, recover or fork a run where it stopped.

  3. 03

    Tools by protocol

    Any MCP server, by URL or spawned. Any OpenAPI document becomes tools. OAuth 2.1 with resource indicators and PKCE.

  4. 04

    Served every way an agent is reached

    A chat UI, a REST endpoint, an MCP server, an A2A agent card and AG-UI streaming, from one file.

  5. 05

    Ingest

    PDF, Word, Excel, PowerPoint, CSV, images and source into a store, idempotently, with optional field extraction.

  6. 06

    A guard, in code

    guard.ts decides which tool calls the app actually makes. Refusals go back to the model as text. Effects are declared: read, write, destructive.

02

Praecise Engine

Open source · Inference

A backend-agnostic acceleration layer for large language models.

Sits between an application and an inference backend and makes token generation faster: speculation policy, drafter selection, request shaping, admission. llama.cpp is the first backend; served runtimes are reached over OpenAI-compatible HTTP.

        application / serving layer
        ┌──────────▼───────────┐
        │ Praecise Engine      │   speculation policy, drafter selection,
        │   uniform interface  │   request shaping, sampling, KV strategy
        └──────────┬───────────┘
                   │  pluggable backends
     ┌─────────────┴───────────────┐
     ▼                             ▼
  llama.cpp                vLLM · SGLang
  linked (FFI)             TensorRT-LLM · MLX
                           served (HTTP)

Measured on an RTX 5070 Ti with n-gram self-speculation: 3.5× on SQL, 1.5× on code, and no gain on prose. Speculation is worth something on structured text and nothing elsewhere. The decision of whether to speculate is where the value is.

InferenceMeasurementModelsMachines
Language
Rust, with a C ABI
Licence
Apache-2.0
Backend
llama.cpp, linked. vLLM, SGLang, TensorRT-LLM and MLX addressed as served backends
Hardware
Verified on NVIDIA GB10 (Grace Blackwell). One CUDA build, Turing through Blackwell
Drafters
Licence-checked catalogue; n-gram self-speculation needs no draft model
Source
github.com/Praecise/praecise-engine

Source on GitHub

The measurements

  1. 01

    Decides whether to speculate

    spec_policy returns a reason with every plan. A policy that cannot explain itself gets switched off. It refuses where speculation does not pay.

  2. 02

    Self-speculation without a draft model

    N-gram drafting that persists across requests, so an agent loop reuses its own patterns. No extra GPU memory.

  3. 03

    Refuses rather than substitutes

    An unknown backend name is an error listing the valid ones, never a quiet fallback. A drafter that fails its preflight is not used.

  4. 04

    Request shaping

    Batch-wide sampling flags handled so that one request with penalties does not drag the whole batch onto the expensive path.

  5. 05

    Admission

    An output-aware cost model and a queue-wait SLO, after a deadline-only model refused almost everything on a slow decoder.

  6. 06

    The negative results stay published

    Per-position block sizing was measured to change nothing and retired. The document is kept so the idea is not rebuilt.

03

How we work(5)

  1. 01

    Measure on hardware

    A simulation is only as right as its cost model, and the only test of a cost model is measurement. Numbers on this site are cited to the file they came from.

  2. 02

    Publish the negative result

    An idea that was measured to do nothing stays documented, so it is not rebuilt. Absence is not evidence.

  3. 03

    Refuse rather than substitute

    An unknown backend, an unlicensed drafter, a tool call outside the guard: each is an error that says what was valid, never a quiet fallback.

  4. 04

    Licences in code, not comments

    Which checkpoints an engine may load and which extensions a store may use are enforced where they are used. Both projects are Apache-2.0.

  5. 05

    Open source is complete on its own

    The Harness runs on your endpoints, your database and your storage. The Cloud is the managed side of the same app: the config gets shorter, the code does not change.

04

Run it on the Cloud, unchanged.

One key, and the models behind the ladder, the database and object storage are provisioned for you and reachable through the code you already wrote.

The Cloud