Hub documentation

에이전트 라이브러리

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

에이전트 라이브러리

tiny-agents

Hugging Face Inference 위에서 MCP 기반 에이전트를 실행하기 위한 경량 툴킷입니다. JavaScript(@huggingface/tiny-agents) 및 Python(huggingface_hub)에서 사용할 수 있습니다.

# JavaScript
npx @huggingface/tiny-agents run "agent/id"

# Python
pip install "huggingface_hub[mcp]"
tiny-agents run "agent/id"

agent.json 설정으로 자체 에이전트를 생성하세요:

{
	"model": "Qwen/Qwen2.5-72B-Instruct",
	"provider": "together",
	"servers": [
		{
			"type": "stdio",
			"command": "npx",
			"args": ["@playwright/mcp@latest"]
		}
	]
}

로컬 LLM의 경우, 서버를 가리키는 endpointUrl을 추가하세요(예: http://localhost:1234/v1). 자세한 내용은 SDK 가이드에서 확인하세요.

Gradio MCP 서버

…

demo.launch(mcp_server=True)

서버는 각 함수를 도구로 노출하며, 설명은 docstring에서 자동으로 생성됩니다. 어떤 MCP 클라이언트에도 연결할 수 있습니다. Hub에는 수천 개의 MCP 호환 Spaces가 있습니다. Gradio MCP 가이드에서 자세히 알아보세요.

smolagents

smolagents는 몇 줄의 코드로 에이전트를 구축하기 위한 경량 Python 라이브러리입니다. CodeAgent(Python으로 액션을 작성)과 ToolCallingAgent(JSON 도구 호출 사용)를 지원하며, Inference Providers를 통해 모든 모델과 함께 작동하고 MCP 서버와 통합됩니다.

smolagent "Plan a trip to Tokyo, Kyoto and Osaka between Mar 28 and Apr 7." \
--model-type "InferenceClientModel" \
--model-id "Qwen/Qwen2.5-Coder-32B-Instruct" \
--tools "web_search"

Agents는 Spaces로 Hub에 배포할 수 있습니다. 커뮤니티 Agents를 여기에서 둘러보세요. smolagents 문서에서 자세히 알아보세요.

Update on GitHub