Official agent skill

Local AI Agents

by microsoft in microsoft/ai-agents-for-beginners

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models.

OfficialMITAuto-check passedAI & LLM Engineering

Install Local AI Agents

skills CLI
$ npx skills add microsoft/ai-agents-for-beginners --skill local-ai-agents -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install microsoft/ai-agents-for-beginners local-ai-agents --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/microsoft/ai-agents-for-beginners.git skills-src && mkdir -p .claude/skills && cp -r skills-src/.agents/skills/local-ai-agents .claude/skills/local-ai-agents && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
local-ai-agents
GitHub stars
77k
Token cost
~1.3k tokens
SKILL.md length
525 words
Files
1
Skills in repo
123
Repo updated
First seen
Licence
MIT

At a glance

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models.

  • : run an agent locally
  • SKILL.md covers Triggers, Core mental model, Why these specific pieces and Setup essentials, plus 3 more sections
  • Instructions only: no scripts, shell commands, URLs or credentials in SKILL.md
  • On-device agent

What it does

Local AI Agents is an agent skill from microsoft/ai-agents-for-beginners, published by the product's own GitHub organization. Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the privacy/cost/offline trade-offs. Based on Lesson 17 of AI Agents for Beginners. USE FOR: run an agent locally, offline agent, on-device agent, Foundry Local, Qwen function calling, local tool calling, local…

Its SKILL.md is about 1.3k tokens, which your agent loads only when the skill is triggered. It is a single SKILL.md file with no bundled scripts.

It sits in AI & LLM Engineering, covering Structured output and tool calling, MCP servers and GPU and accelerator computing. It works with Model Context Protocol, Qwen, OpenAI and Chroma. The repository describes itself as: 18 Lessons to Get Started Building AI Agents. The licence is MIT.

When your agent uses it

  • : run an agent locally
  • On-device agent
  • Qwen function calling
  • Local tool calling

Example prompts

  • “/local-ai-agents”

Requirements

  • Python 3

What it can do on your machine

Read from SKILL.md and the folder at commit 25b7985. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    No scripts in the folder and no shell commands in SKILL.md (its code samples are bash and python).

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Local AI Agents loads about 1.3k tokens when it runs. Until then it costs about 233 tokens; SKILL.md has 525 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~233
When it runs · the whole SKILL.md, loaded when a task matches
~1.3k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from microsoft/ai-agents-for-beginners at commit 25b7985, republished under its MIT licence (© microsoft). 525 words, ~1,250 tokens.

Download SKILL.mdSave it as .claude/skills/local-ai-agents/SKILL.md (or your agent's skills folder).
name
local-ai-agents
description
Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Covers Small Language Models (SLMs), the OpenAI-compatible local endpoint, sandboxed local tools, local RAG with Chroma, local MCP servers, hybrid cloud/local routing, and the privacy/cost/offline trade-offs. Based on Lesson 17 of AI Agents for Beginners. USE FOR: run an agent locally, offline agent, on-device agent, Foundry Local, Qwen function calling, local tool calling, local RAG, Chroma vector database, local MCP server, privacy-preserving agent, hybrid local and cloud agent, small language model agent, engineering assistant on my machine. DO NOT USE FOR: deploying agents to the cloud at scale (use deploying-scalable-agents / Lesson 16), building your first agent concept (Lesson 01), Foundry (cloud) hosted agents, GPU cluster / server-side inference provisioning.
license
MIT

Creating Local AI Agents with Foundry Local and Qwen

Companion skill for Lesson 17 – Creating Local AI Agents. Use it to help a learner build an agent that reasons, calls tools, and searches documentation entirely on their own machine — no cloud inference. Ground every recommendation in the lesson content and the runnable notebook.

Triggers

Activate this skill when a learner wants to:

  • Run an agent fully on-device for privacy, cost, or offline reasons.
  • Serve a model locally with Foundry Local and connect via the OpenAI-compatible endpoint.
  • Use a Qwen function-calling model to drive reliable local tool calls.
  • Add local RAG (Chroma) or a local MCP server.
  • Design a hybrid local/cloud routing strategy.

Core mental model

An SLM trades breadth for privacy, cost, and offline operation. The winning strategy: let the SLM orchestrate and let tools do the heavy lifting. The model does not need to know the codebase — it needs to know when to call read_file and search_docs. That plays to an SLM's strength (bounded decisions like tool selection) and away from its weakness (broad knowledge, long multi-hop reasoning).

Why these specific pieces

  • Foundry Local exposes an OpenAI-compatible HTTP endpoint, so cloud agent code transfers by changing only base_url (and using a local placeholder API key). It also auto-selects the best build (CPU/GPU/NPU) for the machine.
  • Qwen models are trained for function calling and emit well-formed tool calls consistently — this is what turns a local chat model into a local agent.
  • Chroma runs in-process and stores vectors on disk, so the whole RAG pipeline (embed → store → retrieve → reason) stays local.
  • MCP is a transport, not a cloud service: an MCP server can run locally over stdio.

Setup essentials

bash
foundry model run qwen2.5-7b-instruct
foundry service status
python
from foundry_local import FoundryLocalManager
from openai import OpenAI

manager = FoundryLocalManager("qwen2.5-7b-instruct")
client = OpenAI(base_url=manager.endpoint, api_key=manager.api_key)  # local placeholder

~8 GB RAM is a realistic minimum; a GPU/NPU helps but is not required.

Show full SKILL.md (233 more words)Show less

Key patterns to reproduce

Point the learner at the notebook 17-local-agent-foundry-local.ipynb:

  • Sandboxed tools: every file tool resolves paths and rejects anything outside a single project root — even locally, a tool runs with the user's permissions.
  • Tool-calling loop: register tools with the OpenAI tools schema, execute requested tools locally, feed results back, repeat until a final answer.
  • Local RAG: upsert docs into a Chroma collection; search_docs returns top-k chunks.
  • Local MCP: connect to a local server over stdio; scope it to a project directory and validate its outputs.

Hybrid routing (local as one of the models)

SituationWhere it runs
Sensitive data / offlineLocal SLM
Simple, bounded taskLocal SLM (cheap, fast)
Hard multi-hop reasoning on non-sensitive dataCloud model
Cloud outageLocal SLM (graceful degradation)

This mirrors the model-routing idea from Lesson 16, with the workstation as one of the routes. Prefer designs that fall back to local so the agent degrades in quality rather than failing outright.

Guardrails for the assistant

  • Keep every file/tool operation scoped to a sandboxed project directory.
  • Do not send code or data to the cloud when the learner's stated goal is privacy/offline — keep the whole pipeline local.
  • Set realistic expectations for SLM quality; lean on tools and RAG rather than the model's memorised knowledge.
  • Note that Lesson 17 has no Foundry Responses endpoint, so the cloud smoke-test action does not apply — validate by running the notebook locally.

© microsoft, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

Just SKILL.md in .agents/skills/local-ai-agents of microsoft/ai-agents-for-beginners.

Open the folder on GitHubat commit 25b7985

Compare with similar skills

Local AI Agents next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Local AI Agents compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Local AI Agents this skillmicrosoft/ai-agents-for-beginners77k—~1.3kAutomated safety check: PassMIT
Neurolink Guidejuspay/neurolink143—~1.4kAutomated safety check: PassMIT
Tool Designagentailor/fullstack-langgraph-nextjs-agent132—~3.2kAutomated safety check: PassMIT
Qianwenai Wikichujianyun/skills740—~717Automated safety check: PassCustom licence
Spring AI Integrationrrezartprebreza/spring-boot-skills2981 repos~2.1kAutomated safety check: PassMIT
Spring AI Integrationrrezartprebreza/spring-boot-skills2981 repos~2.5kAutomated safety check: PassMIT

Similar skills

  • Neurolink Guide

    juspay/neurolink

    Guide for using the NeuroLink SDK and CLI. An agent skill from juspay/neurolink.

    143 GitHub stars~1.4k tokensUpdated today
    AI & LLM EngineeringAuto-check passed
  • Tool Design

    agentailor/fullstack-langgraph-nextjs-agent

    Design and verify tools that AI agents can actually use — for any framework or language (MCP servers, LangChain/LangGraph, function-calling, raw JSON schema; TypeScript, Python, or otherwise).

    132 GitHub stars~3.2k tokensUpdated 1 mo ago
    AI & LLM EngineeringAuto-check passed
  • Qianwenai Wiki

    chujianyun/skills

    千问AI平台(Qianwen AI Platform / DashScope)官方文档离线知识库,用于检索并回答模型选择、API Key、OpenAI 兼容接口、DashScope SDK、文本与多模态生成、图像/视频/语音、Realtime API、Embedding、Reranking、Function Calling、MCP、批量调用、计费、Token Plan、API/SDK/CLI…

    740 GitHub stars~717 tokensUpdated 13 days ago
    AI & LLM EngineeringAuto-check passed
  • Spring AI Integration

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when integrating LLMs, chat clients, embeddings, RAG pipelines, or AI agents into Spring Boot.

    298 GitHub starsUsed in 1 repo~2.1k tokens
    AI & LLM EngineeringAuto-check passed
  • Spring AI Integration

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when integrating LLMs, chat clients, embeddings, RAG pipelines, or AI agents into Spring Boot.

    298 GitHub starsUsed in 1 repo~2.5k tokens
    AI & LLM EngineeringAuto-check passed
  • Agent Tool Builder

    omer-metin/skills-for-antigravity

    Tools are how AI agents interact with the world. An agent skill from omer-metin/skills-for-antigravity.

    162 GitHub stars~705 tokensUpdated 8 mo ago
    AI & LLM EngineeringAuto-check passed

More from microsoft/ai-agents-for-beginners

All 123 skills in this repo
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    A skill your agent uses when the user asks to create, scaffold, or edit Jupyter notebooks (.ipynb) for experiments, explorations, or tutorials; prefer the bundled templates and run the helper script…

    77k GitHub starsUsed in 8 repos~1k tokens
    Auto-check passed
  • Azure Openai To Responses

    microsoft/ai-agents-for-beginners

    Official

    Migrate Python apps from Azure OpenAI Chat Completions to the Responses API.

    77k GitHub stars~6k tokensUpdated 19 days ago
    Auto-check: notes
  • Azure Openai To Responses

    microsoft/ai-agents-for-beginners

    Official

    Shift Python apps dem from Azure OpenAI Chat Completions go Responses API.

    77k GitHub stars~6k tokensUpdated 19 days ago
    Auto-check: notes
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    Kasuta, kui kasutaja palub luua, üles ehitada või redigeerida Jupyteri märkmikke (.ipynb) katsetuste, uurimiste või juhendite jaoks; eelista kaasasolevaid malle ja käivita abiskript newnotebook.py…

    77k GitHub stars~1.2k tokensUpdated 19 days ago
    Auto-check passed
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    Käytetään, kun käyttäjä pyytää luomaan, alustamaan tai muokkaamaan Jupyter-muistikirjoja (.ipynb) kokeita, tutkimuksia tai opetusohjelmia varten; käytä mieluummin mukana olevia mallipohjia ja…

    77k GitHub stars~1.3k tokensUpdated 19 days ago
    Auto-check passed
  • Jupyter Notebook

    microsoft/ai-agents-for-beginners

    Official

    À utiliser lorsque l'utilisateur demande de créer, structurer ou modifier des notebooks Jupyter (.ipynb) pour des expériences, explorations ou tutoriels ; privilégiez les modèles fournis et exécutez…

    77k GitHub stars~1.4k tokensUpdated 19 days ago
    Auto-check passed

Questions about Local AI Agents

What does Local AI Agents do?

Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models. Local AI Agents is an agent skill from microsoft/ai-agents-for-beginners, published by the product's own GitHub organization. Build local-first AI agents that run entirely on a developer workstation with Microsoft Foundry Local and Qwen function-calling models.

When should I use Local AI Agents?

Local AI Agents fits situations like: : run an agent locally; on-device agent; qwen function calling; local tool calling.

How do I install Local AI Agents in Claude Code?

Run `npx skills add microsoft/ai-agents-for-beginners --skill local-ai-agents -a claude-code`. Or copy the skill folder (.agents/skills/local-ai-agents in microsoft/ai-agents-for-beginners) into .claude/skills/local-ai-agents in your project. Claude Code loads it when a task matches its description.

How do I install Local AI Agents in Codex?

Run `npx skills add microsoft/ai-agents-for-beginners --skill local-ai-agents -a codex`. Or copy the skill folder (.agents/skills/local-ai-agents in microsoft/ai-agents-for-beginners) into .agents/skills/local-ai-agents in your project. Codex loads it when a task matches its description.

Can I use Local AI Agents in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add microsoft/ai-agents-for-beginners --skill local-ai-agents -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/local-ai-agents, .gemini/skills/local-ai-agents, .github/skills/local-ai-agents and .opencode/skills/local-ai-agents in your project.

What does Local AI Agents need to run?

SKILL.md names no scripts, command-line tools or credentials: Local AI Agents is instructions for the agent only. Our summary lists: Python 3.

Does Local AI Agents access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Local AI Agents safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Local AI Agents use?

Local AI Agents is published under the MIT licence (declared in SKILL.md). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Local AI Agents use?

About 1.3k tokens (SKILL.md is roughly 5k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Local AI Agents?

Skills that share tags, products or a category with Local AI Agents: Neurolink Guide (juspay/neurolink, 143 stars), Tool Design (agentailor/fullstack-langgraph-nextjs-agent, 132 stars), Qianwenai Wiki (chujianyun/skills, 740 stars) and Spring AI Integration (rrezartprebreza/spring-boot-skills, 298 stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Local AI Agents?

microsoft (a GitHub organization, an official publisher) maintains it in microsoft/ai-agents-for-beginners, which has 76,612 GitHub stars. The repository holds 123 skills in this directory. The repository was last updated on September 19, 2026.

Source: microsoft/ai-agents-for-beginners on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.