llama-stack-client
The official Python library for the llama-stack-client API
What it is and what it does
llama-stack-client is a Python SDK generated by Stainless that wraps the Llama Stack REST API. It provides both synchronous and asynchronous clients powered by httpx, with full type hints for all request parameters and response objects. The library handles authentication via API keys, supports streaming responses using Server-Sent Events, and includes automatic pagination for list endpoints.
The package is designed for developers building applications that need to interact with a running Llama Stack server—querying available models, making chat completions, or accessing other inference capabilities. It includes a CLI tool for direct server interaction and supports optional aiohttp backend for improved async concurrency. Type definitions enable IDE autocomplete and early error detection, while Pydantic models provide helper methods for JSON serialization and dictionary conversion.
Use it for:
- Build a Python application that queries available models and makes chat completion requests to a Llama Stack server
- Stream inference responses in real-time from Llama models using Server-Sent Events within a web service
- Automate batch inference tasks asynchronously with the AsyncLlamaStackClient for concurrent model queries
- Integrate Llama Stack inference into a CLI tool using the bundled llama-stack-client command-line interface
- Paginate through large result sets automatically when listing models or other resources without manual page handling
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python client library for interacting with Llama Stack REST API, providing type-safe synchronous and asynchronous access to inference, chat, and model management endpoints.
Yes, if you are building against a Llama Stack server. The library is actively maintained, has low install friction, carries no known vulnerabilities, and provides a well-typed interface with both sync and async support. The Python 3.12+ requirement is a hard constraint; if your project targets earlier versions, you cannot use this package. The pre-release status (--pre flag required) suggests API stability may still be evolving.
Install
llama-stack-client on PyPI
pip
pip install llama-stack-clientuv
uv add llama-stack-clientpoetry
poetry add llama-stack-clientInstalling llama-stack-client
Before you install
Low install friction with a pure-Python wheel distribution. Active maintenance with recent releases (18 days since last update). Requires Python 3.12+, which narrows compatibility to modern environments.
License in practice
MIT license permits commercial and private use with minimal restrictions. You may use, modify, and distribute this library freely provided you include the license notice.
Quickstart
pip install --pre llama_stack_client
from llama_stack_client import LlamaStackClient
client = LlamaStackClient()
models = client.models.list()
Requires Python 3.12 or later. Llama Stack server must be running and accessible at the configured endpoint.
Verify before relying
- Whether the library works with Llama Stack server versions other than the current release
- Performance characteristics under high concurrency with the default httpx backend versus aiohttp
- Stability of the pre-release version tag (--pre flag required for installation)
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.12) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 15 — anyio, click, distro, fire, httpx, pandas, prompt-toolkit, pyaml, pydantic, requests, rich, sniffio, termcolor, tqdm, typing-extensions |
| Maintenance | actively maintained — 18 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 96,452/month — #13,211 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: llama_stack_client-0.7.5-py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
llama-api-clientProvides a typed Python client for the Llama…
permissive · top 15,000 on PyPI
llama-modelsProvides a CLI and Python interface to…
unclear · top 15,000 on PyPI
togetherA Python client library for the Together REST…
permissive · top 5,000 on PyPI
groqProvides a Python client library for accessing…
permissive · top 1,000 on PyPI
openaiProvides a Python client library for the OpenAI…
permissive · top 1,000 on PyPI
openlayerProvides a typed Python client for the…
permissive · top 15,000 on PyPI
composio-clientA Python client library for the Composio REST…
permissive · top 5,000 on PyPI
supermemoryProvides a Python client library for the…
permissive · top 15,000 on PyPI
sambanovaProvides a Python client library for accessing…
permissive · top 15,000 on PyPI
perplexityaiProvides a Python client library for the…
permissive · top 5,000 on PyPI