{
 "schema_version": 1,
 "generated": "2026-11-09",
 "id": "trymirai-uzu--run-a-local-llm-in-a-python-app-with-uzu",
 "repo": "trymirai/uzu",
 "repo_url": "https://github.com/trymirai/uzu",
 "repo_slug": "trymirai-uzu",
 "title": "Run a local LLM inside a Python script with Uzu",
 "page_title": "How to run a local LLM inside a Python script with Uzu",
 "summary": "Add Uzu with uv, download a small Qwen model and get a chat reply on your own machine.",
 "who": "A Python developer who wants an offline assistant feature without API keys or per-token bills.",
 "problem": "Cloud LLM APIs add latency, cost and send user data off the device.",
 "outcome": "A Python script that downloads a model once and generates replies locally.",
 "steps": [
  "Run `uv add uzu==0.6.13`",
  "Create the engine with EngineConfig.create() and Engine.create as in the README Python example",
  "Load the model `alibaba:qwen3.5:0.8b:mirai:mirai-m:4` and iterate the download to show progress",
  "Open a chat session and send a system and a user ChatMessage",
  "Print the reply's reasoning and text"
 ],
 "agent_prompt": "Add trymirai/uzu to this Python project with `uv add uzu==0.6.13` and write a script that downloads alibaba:qwen3.5:0.8b:mirai:mirai-m:4 and answers <question> locally, following the README Python quick start.",
 "agents": [
  "claude-code",
  "codex",
  "cursor"
 ],
 "difficulty": "Beginner",
 "time": "20 minutes",
 "basis": "readme",
 "caveat": "This card is written from the trymirai/uzu README, not from a test run by Deduped. Before you start, make sure you have Rust, Python, Swift or TypeScript. Check the repo for newer instructions before you rely on these steps.",
 "category": "Software and DevOps",
 "tags": [
  "Software and DevOps"
 ],
 "lang": "rust",
 "requirements": [
  "Rust, Python (uv), Swift or TypeScript (pnpm)",
  "An Apple device to benefit from unified memory",
  "Disk space for the downloaded model"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": true,
 "score": 1.0,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/trymirai-uzu/run-a-local-llm-in-a-python-app-with-uzu/",
 "md": "https://dedupedai.com/use-cases/trymirai-uzu/run-a-local-llm-in-a-python-app-with-uzu/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/trymirai-uzu--run-a-local-llm-in-a-python-app-with-uzu.json",
 "api_version": "v1"
}
