본문으로 건너뛰기
Skillpedia
에이전트79k · #1726

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가 스킬을 읽고 지침을 따릅니다.

바로 붙여넣을 수 있는 메시지

Use this skill to help me: https://github.com/microsoft/ai-agents-for-beginners/blob/main/.agents/skills/local-ai-agents/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
AI가 이런 스킬을 알아서 찾아 쓰길 원하시나요?무료 Skillpedia MCP를 설치하세요. 한 줄이면 작업마다 스킬 15,000+개 중에서 검색합니다.1분 만에 설치 →

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_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)

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

repo: microsoft/ai-agents-for-beginners

인기도

GitHub 스타
79k
순위
#1726
라이선스
MIT
업데이트
2026. 11. 2.

이 스킬이 유용한가요?

0

로그인 투표하려면 로그인하세요.

댓글

  • …

이 저장소의 다른 스킬

비슷한 스킬