local-ai-agents
하는 일
이 스킬은 개인 컴퓨터에서 전적으로 돌아가는 AI 에이전트를 만드는 방법을 보여 줍니다. 개인정보 보호, 비용 절감, 또는 클라우드 없이 작업하기를 원하는 사람을 위한 스킬입니다.
사용하는 경우
- ✓개인정보 보호, 비용, 오프라인 사용을 위해 내 컴퓨터에서 돌아가는 에이전트가 필요할 때.
- ✓함수 호출이 가능한 Qwen 모델과 Foundry Local을 쓰고 싶을 때.
- ✓로컬 문서 검색이나 로컬 MCP 서버를 에이전트에 쓰고 싶을 때.
스킬 링크
https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/local-ai-agents/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“클라우드로 데이터를 보내지 않고 노트북에서 돌아가며 내 문서를 검색할 수 있는 에이전트를 만들어 주세요.”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
에이전트는 파일을 읽거나 문서를 검색하는 것 같은 간단한 도구를 호출하는 작은 로컬 모델을 설정합니다. 어떤 도구를 쓸지는 모델이 고르고, 무거운 작업은 도구가 맡습니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
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
foundry model run qwen2.5-7b-instruct
foundry service status
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.
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_docsreturns 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)
| Situation | Where it runs |
|---|---|
| Sensitive data / offline | Local SLM |
| Simple, bounded task | Local SLM (cheap, fast) |
| Hard multi-hop reasoning on non-sensitive data | Cloud model |
| Cloud outage | Local 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.
자주 묻는 질문
클라우드 없이 실행되나요?
스킬은 클라우드 추론 없이 에이전트를 전적으로 사용자의 기기에서 실행하는 데 초점을 맞춥니다.
작은 로컬 모델이 클라우드 모델만큼 성능이 좋나요?
작은 모델은 넓은 지식에서 약하므로, 스킬은 무거운 작업을 도구에 맡기도록 합니다.
로컬 모델과 클라우드 모델을 섞을 수 있나요?
네. 로컬 모델과 클라우드 모델 사이의 하이브리드 라우팅을 설명합니다.
상세 정보
작성자의 원본 설명
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 l
인기도
- GitHub 스타
- 79k
- 순위
- #1726
- 라이선스
- MIT
- 업데이트
- 2026. 11. 2.
댓글
- …
이 저장소의 다른 스킬
azure-openai-to-responses
79k에이전트가 Azure OpenAI를 쓰는 Python 앱을 Chat Completions에서 새 Responses API로 단계별로 옮기도록 돕습니다.
deploying-scalable-agents
79k에이전트가 작동하는 AI 에이전트를 Microsoft Foundry의 확장 가능하고 모니터링되는 운영 환경으로 옮기도록 돕습니다.
jupyter-notebook
79k에이전트가 실험이나 단계별 튜토리얼을 위해 준비된 템플릿으로 Jupyter 노트북을 만들거나 정리하도록 돕습니다.
비슷한 스킬
add-model-provider
394k에이전트가 안전한 설정 명령으로 새 AI 모델 제공자를 OpenClaw에 연결하고, API 키를 평문으로 두지 않으며, 실시간 테스트를 실행하도록 돕습니다.
acp-router
394k에이전트가 OpenClaw를 통해 Claude Code나 Cursor 같은 코딩 도우미에 작업을 전달해, 작업이 그 도구에서 실행되도록 돕습니다.
browser-automation
394k에이전트가 로그인, 탭, 페이지 응답이 멈췄을 때의 복구를 포함해 웹 페이지를 단계별로 조작하도록 가르칩니다.