Open-source building blocks

LLM Works provides a modular open-source platform that organizes the infrastructure layer between LLMs and agents. The libraries are hosted on GitHub and published on PyPI.

The quality of the platform components is checked by an open-source in-house grader*. Latest appinfra scoreboard:

CategoryScoreVerified by
Architecture & Design10.0/1022 packages, py.typed
Code Quality10.0/10mypy strict, ~200 files
Security10.0/10172 dedicated security tests
Testing10.0/1095% coverage, ~4800 tests
Documentation9.5/1015 guides, 18 API refs
Production Readiness10.0/10PyPI, semver, deprecations
Dependencies10.0/10clean pip-audit
Overall9.95**/10 (A+)

Last graded: 81ef184 with Opus 4.7
* The integrity of this grader can be further verified by another AI.
** Weighted average.

An appinfra CLI creates a SAIA object, connects to an Anthropic backend via llm-infer, and sends one request.

import sys, asyncio
from appinfra.app import AppBuilder
from llm_infer.client import Factory, SAIAAdapter
from llm_saia import SAIA

# build the CLI app via appinfra (provides self.lg, self.args, app.main)
app = AppBuilder("hello-llm").build()

# bind run() as the "run" subcommand with a positional "prompt" argument
@app.tool(name="run")
@app.argument("prompt")
def run(self):
    asyncio.run(_send(self.lg, self.args.prompt))

async def _send(lg, prompt):
    # open an async Anthropic client via llm-infer
    async with Factory(lg).anthropic() as client:
        # build a SAIA session using the llm-infer client as its backend
        saia = SAIA.builder().backend(SAIAAdapter(client)).build()
        # invoke the instruct verb to get a typed response
        print((await saia.instruct(prompt)).value)

if __name__ == "__main__":
    sys.exit(app.main())

Usage:

$ pip install appinfra llm-saia "llm-infer[anthropic,saia]"
$ export ANTHROPIC_API_KEY=sk-ant-...
$ python app.py run "What is systems engineering?"