Skip to content
Projetos

Sobre

A light-weight, modular, and high-performance framework for building llm agentic systems.

IA e aprendizado de máquina

Como estes números são medidos

Crescimento medido de estrelas

em 24 h
0
em 7 dias
0
em 15 dias
0
em 1 mês
Coletando histórico

Variações líquidas em períodos sobrepostos, não totais diários. Medições ausentes ficam em branco. Estrelas indicam interesse, não qualidade.

README.md

Original

Low-Level Language Models (LLLM)

LLLM

LLLM is a lightweight framework for building advanced agentic systems: the kind that decompose hard questions, call many tools, write and run code, and need to be inspected turn by turn. It is low-level on purpose: instead of hiding the agent loop, it gives you small, plain abstractions for every part of it, so research and production systems can be customised without fighting the framework.

Docs: lllm.one · Packages: lllm.one/hub

pip install "lllm-core[native]"
from lllm import Tactic

print(Tactic.quick("What is the capital of France?").content)

Design

An agentic system is a program:

  • Tactic is the program. It owns a typed task interface and orchestrates agents; tactics compose, and a whole tactic can be handed to an agent as a tool.
  • Agent is the caller. A model plus a call loop that handles retries, parse failures, and tool calls.
  • Prompt is the function. A template with a parser, tools, and exception/interrupt handlers: the full specification of one turn.
  • Dialog is the mental state. Each agent's own history, as a tree you can fork, replay, and inspect.

Configuration is declaration (prompts, tools, proxies, and agents are discovered from lllm.toml and YAML configs and referenced by key), proxies give agents an API surface they can program against (run_python, CALL_API), and everything is typed with Pydantic.

from pydantic import BaseModel
from lllm import Prompt, Tactic

TASK = Prompt(path="brief/task", prompt="Write three bullets about {topic}.")


class Topic(BaseModel):
    topic: str


class BriefTactic(Tactic):
    name = "brief"
    agent_group = ["writer", "editor"]
    input_model = Topic

    def call(self, task: Topic) -> str:
        writer, editor = self.agents["writer"], self.agents["editor"]
        writer.open("draft")
        writer.receive_prompt(TASK, {"topic": task.topic})
        editor.open("edit")
        editor.receive(f"Tighten this:\n{writer.respond().content}")
        return editor.respond().content


brief = BriefTactic({
    "global": {"model_name": "gpt-4o-mini"},
    "agent_configs": [
        {"name": "writer", "system_prompt": "You write crisp technical briefs."},
        {"name": "editor", "system_prompt": "You cut every unnecessary word."},
    ],
})
print(brief({"topic": "KV caches"}))

One boundary for every runtime

Tactic is also a typed service boundary. Native programs, protocol-style tactics (_run), Pydantic AI agents (PydanticAITactic), and plain functions (lllm.as_tactic) are all validated, streamed, and served the same way:

lllm serve tactics:brief --port 8000     # POST /run, POST /stream, GET /info

RemoteTactic calls a served tactic as if it were local, lllm:// refs and lllm.Resolver wire systems together by name, and native agents can send inference hints (session identity from dialogs, priorities, expected output length) to KV-cache-aware serving stacks such as NVIDIA Dynamo, vLLM, and SGLang.

Packages and the hub

lllm create my-app        # lllm.toml, prompts/, configs/, tactics/, main.py, tests
cd my-app
lllm hub validate .
lllm serve .              # serve the package's primary tactic
lllm hub publish . --local

One lllm.toml tells the native runtime what to discover and tells the hub what the package is. Browse and download packages at lllm.one/hub.

Modules

Module Status
lllm Tactics, the native runtime (agents, prompts, dialogs, proxies, sandbox), runtimes, services Stable
lllm.hub The lllm.toml package format, validation, local hub, cards, static catalogs Stable
sssn (SSSN) Channels, events, artifacts, snapshots; TacticProcessor runs tactics over channels. A separate package: pip install sssn or lllm-core[network] Experimental
aaax (AAAX) Strategies that mount packages, tactics, and channels into one served API. A separate package: pip install aaax or lllm-core[shell] Experimental

SSSN and AAAX build on LLLM's protocol, refs, hub, and services, and plug into the lllm command: installing sssn adds lllm network, and installing aaax adds lllm shell. One command covers them all: lllm create | init | setup | inspect | serve | hub | network | shell.

Install options

Extra Adds
native LiteLLM and YAML configs for native agents
server FastAPI and Uvicorn
client httpx for remote tactics and stores
pydantic-ai the Pydantic AI adapter
sandbox the Jupyter sandbox
secure OS keyring for lllm setup
network the sssn package: channels and lllm network
shell the aaax package: strategies and lllm shell
all everything

For development: pip install -e ".[dev,docs]" and pytest.

Where it comes from

LLLM's tactic design grew out of the reusable reasoning units of Analytica, which decomposes complex questions into grounded subpropositions, runs specialised agents over them, and synthesises a robust analysis; it has since served autonomous software development in Apeiron.

  • Cheng, Junyan, Kyle Richardson, and Peter Chin. "Analytica: Soft Propositional Reasoning for Robust and Scalable LLM-Driven Analysis." ICLR, 2026.
  • Cheng, Junyan, Ankit Srivastava, Jessie Zeng, Milenko Drinic, and Jack W. Stokes. "Apeiron: A Scalable LLM-agentic Framework for Autonomous Full-lifecycle Demand-optimized Application Synthesis." Findings of ACL, 2026, pp. 3868-3899.

License

Apache-2.0

Explore projetos relacionados

Carregando…