Skip to content

LLLM

LLLM LLLM

lllm.one

LLLM is the protocol and service layer for reusable agentic tactics. It keeps the public contract small: wrap focused logic, expose it as a service, describe it for packages, and let the runtime underneath remain runtime-owned.

Tactic Typed unit of work with local, async, stream, and service-ready call paths.
Runtime Pydantic AI, native LLLM, plain Python, or another adapter owns execution.
Service FastAPI exposes tactics through predictable envelopes and error shapes.
Package PsiHub metadata makes tactics discoverable, configurable, and composable.

Fast Path

from pydantic import BaseModel
from lllm import Tactic


class EchoInput(BaseModel):
    text: str


class EchoOutput(BaseModel):
    text: str


class EchoTactic(Tactic[EchoInput, EchoOutput]):
    name = "echo"
    input_type = EchoInput
    output_type = EchoOutput

    def _run(self, input_value, *, context=None):
        return EchoOutput(text=input_value.text.upper())


assert EchoTactic().run({"text": "hello"}).text == "HELLO"

Shape

Caller
FastAPI service
Tactic
Runtime adapter
PsiHub metadata
flowchart LR A["App or coding agent"] --> B["LLLM service"] B --> C["Tactic"] C --> D["Pydantic AI / native / Python"] C --> E["PsiHub refs and cards"]

Next