The unbloated AI stack. Minimal, zero-bloat inference and agent orchestration primitives for Python.
Status:
0.0.1— Initial package reservation. Core orchestration primitives are under active development.
Most LLM frameworks bury simple composition under deep class hierarchies, heavy transitive dependencies, and opaque abstractions. slimstack is designed to give you the useful primitives—composable runnables, prompts, OpenAI-compatible model clients, structured parsers, schema-typed tools, and local trace hooks—in a few hundred lines of readable, strictly typed Python.
- Minimal footprint: Only
httpx,pydantic, andpypdf(nolangchain*packages, no vendor SDK bloat, no mandatory telemetry servers). - Flat public API: Everything imported straight from
slimstack(Agent,Model,Tool,tool,TextLoader,MarkdownLoader,PDFLoader, etc.). - Sync, async, and streaming: First-class async model inference, streaming deltas, and autonomous multi-turn tool loops.
- OpenAI-compatible by default: Works out of the box with local servers (Ollama,
llama.cpp, vLLM) and hosted OpenAI-compatible endpoints. - Document Loaders: Built-in zero-bloat loaders (
TextLoader,MarkdownLoader,PDFLoader) supporting lazy generators and file safety limits.
pip install slimstackfrom slimstack import MarkdownLoader, PDFLoader, TextLoader
# Verbatim text & markdown loading
docs = TextLoader().load("notes.txt")
md_docs = MarkdownLoader().load("README.md")
# Page-by-page streaming PDF loading
pdf_loader = PDFLoader()
for page_doc in pdf_loader.lazy_load("report.pdf"):
print(f"Page {page_doc.metadata['page_number']}: {len(page_doc.content)} chars")MIT — see LICENSE.