foundry-local-sdk
Foundry Local Manager Python SDK: Control-plane SDK for Foundry Local.
What it is and what it does
Foundry Local SDK is a Python control plane for running large language models, embeddings, and speech-to-text inference entirely on your local machine. It wraps a native Foundry Local Core library (via ctypes FFI) and provides a model catalog, download/cache management, and OpenAI-compatible APIs for chat completions (streaming and non-streaming), tool calling, embeddings, and Whisper-based audio transcription. The package selects the appropriate ONNX Runtime variant per platform (CUDA on Linux x86_64, CPU/WebGPU elsewhere) and publishes a separate WinML variant for Windows.
You initialize a singleton manager with a configuration, discover models from the catalog, download and load them into memory, then interact via chat or embedding clients. The SDK handles model lifecycle (load, unload, cache), execution provider discovery and registration, and optional HTTP endpoints for multi-process scenarios. It is actively maintained, recently released, and has no known security vulnerabilities.
Use it for:
- Run private LLM inference on-device without sending data to cloud APIs or paying per-token fees
- Build chat applications with streaming responses using OpenAI-compatible client code
- Generate text embeddings locally for semantic search or RAG workflows
- Transcribe audio files or streams using Whisper models without external services
- Prototype and test LLM-powered features before deploying to production infrastructure
- Call functions/tools from LLM responses in a local environment with full control
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
A Python SDK for discovering, downloading, loading, and running local AI models with OpenAI-compatible chat, embeddings, and audio transcription APIs — no cloud required.
Yes, if you need local LLM inference with OpenAI-compatible APIs and don't require production-grade stability. The package is actively maintained, has low install friction, permissive licensing, and zero known vulnerabilities. It is in Alpha status (Development Status :: 3), so expect API changes and incomplete documentation; verify that the model catalog and hardware support match your target deployment before committing to it.
Install
foundry-local-sdk on PyPI
pip
pip install foundry-local-sdkuv
uv add foundry-local-sdkpoetry
poetry add foundry-local-sdkInstalling foundry-local-sdk
Before you install
Low friction wheel install with platform-specific native dependencies (onnxruntime variants, foundry-local-core). Active maintenance with recent release (15 days old); requires Python 3.11+.
License in practice
MIT license permits unrestricted use, modification, and distribution with minimal restrictions.
Quickstart
pip install foundry-local-sdk
from foundry_local_sdk import Configuration, FoundryLocalManager
config = Configuration(app_name="MyApp")
FoundryLocalManager.initialize(config)
manager = FoundryLocalManager.instance
model = manager.catalog.get_model("phi-3.5-mini")
model.load()
client = model.get_chat_client()
response = client.complete_chat([{"role": "user", "content": "Why is the sky blue?"}])
print(response.choices[0].message.content)
Requires Python 3.11 or later. Platform-specific native binaries (CUDA-enabled on Linux x86_64, CPU/WebGPU on other platforms) are installed as wheel dependencies; WinML variant available for Windows only.
Verify before relying
- Whether model catalog is pre-populated or requires external download/configuration
- Typical memory footprint and hardware requirements for common models
- Latency characteristics for inference on different hardware (CPU vs GPU)
- Whether streaming chat and embeddings APIs are fully OpenAI-compatible or have known differences
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 10 — pydantic, requests, openai, foundry-local-core, onnxruntime-gpu, onnxruntime, onnxruntime-core, onnxruntime-genai-cuda, onnxruntime-genai, onnxruntime-genai-core |
| Maintenance | actively maintained — 15 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 298,878/month — #7,867 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: foundry_local_sdk-1.2.4-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
azure-ai-inferenceUnified client library for chat completions,…
permissive · top 5,000 on PyPI
foundry-platform-sdkA Python client library for the Foundry API…
permissive · top 5,000 on PyPI
zai-sdkOfficial Python SDK for Z.ai's large model…
unclear · top 15,000 on PyPI
rev-aiPython SDK for Rev AI's speech-to-text API,…
permissive · top 15,000 on PyPI
SpeechRecognitionPerforms speech recognition and transcription…
permissive · top 5,000 on PyPI
azure-ai-projectsProvides a Python client for Microsoft Foundry…
permissive · top 5,000 on PyPI
agent-framework-foundry-localIntegrates Microsoft Agent Framework with…
permissive · top 15,000 on PyPI
langchain-azure-aiIntegrates Microsoft Foundry (Azure AI)…
permissive · top 5,000 on PyPI
cloudfoundry-clientA Python client library for interacting with…
unclear · top 15,000 on PyPI
cfenvParses Cloud Foundry environment variables and…
permissive · top 15,000 on PyPI