Preface
- Setup LM Studio
- What’s New Since the First Edition of This Book
- About the Author
- Requests from the Author
- Why Should We Care About Privacy?
Introduction to Using the LM Studio Application
Using the LM Studio Command Line Interface (CLI)
- lms ls
- lms load
- lms unload
- lms get
- lms chat
- lms import
- Server Status and Control
- lms runtime
- lms log stream
- Headless Mode: lms daemon
- LM Link: lms link
- Developing and Publishing
Introduction to LM Studio’s Local Inference API
- Using the Python OpenAI Compatibility APIs
- Using the Python lmstudio Package
- Three Python SDK API Styles
- Streaming Responses
- Structured Output
- Embeddings
- The Anthropic Compatibility API
- The Responses API
- API Authentication
- Idle TTL and Auto-Evict
- Optional Practice Problems
Tool Use / Function Calling
- Native Tool Use via the OpenAI-Compatible API
- The Python SDK .act() API
- A Worked Example: DuckDuckGo Web Search
- Manual Tool Use: Understanding the Basics
- Optional Practice Problems
A Technical Introduction to Model Context Protocol and Experiments with LM Studio Using FastMCP
- An Introduction to the Model Context Protocol
- The Local AI Ecosystem: LM Studio as an MCP Host
- Strategic Integration: A Blueprint for Local MCP-Powered Agents
- Architectural Design for a Python-Based MCP Server
- LM Studio Integration and Execution Guide
- Advanced Considerations and Future Trajectories
- MCP Wrap Up
- Optional Practice Problems
Local Agents With LM Studio Bionic
- Two Kinds of Projects: Work and Code
- Choosing a Model: Local, Cloud, and Remote
- Voice Input
- Bionic and Your LM Studio Model Library
- When to Use Bionic vs LM Studio Desktop
- Wrap Up
Headless Deployment with llmster
- Installing llmster on a Linux Server
- Running as a systemd Service
- JIT Loading for Multi-Model Serving
- API Authentication for Network Deployments
- Serving Models to Remote Clients with LM Link
- Wrap Up