{"id":"cbe5b993-f717-493f-b715-df1d9ca23504","shortId":"vPt9dn","kind":"skill","title":"smolagents Code-First AI Agent Library","tagline":"smolagents is HuggingFace's barebones Python library for building AI agents that think in code rather than JSON. Agents write and execute Python code as their action space, enabling more flexible reasoning and tool use with support for sandboxed execution via E2B, Docker, or WebA","description":"# smolagents Code-First AI Agent Library\n\nsmolagents is HuggingFace's barebones Python library for building AI agents that think in code rather than JSON. Agents write and execute Python code as their action space, enabling more flexible reasoning and tool use with support for sandboxed execution via E2B, Docker, or WebAssembly.\n\n## Installation\n\nUse the upstream install or setup path that matches your environment:\n- pip install \"smolagents[toolkit]\"\n\nRequirements and caveats from upstream:\n- Our [CodeAgent](https://huggingface.co/docs/smolagents/reference/agents#smolagents.CodeAgent) works mostly like classical ReAct agents - the exception being that the LLM engine writes its actions as Python code snippets.\n- Actions are now Python code snippets. Hence, tool calls will be performed as Python function calls. For instance, here is how the agent can perform web search over several websites in one single action:\n- [Docker](https://www.docker.com/) — self-hosted container isolation\n\nBasic usage or getting-started notes:\n- smolagents is a library that enables you to run powerful agents in a few lines of code. It offers:\n- 🧑‍💻 **First-class support for Code Agents**. Our [CodeAgent](https://huggingface.co/docs/smolagents/reference/agents#smolagents.CodeAgent) writes its actions in code (as opposed to \"agents being used to write code\")....\n- Then define your agent, give it the tools it needs and run it!\n\n- Source: https://github.com/huggingface/smolagents\n- Extracted from upstream docs: https://raw.githubusercontent.com/huggingface/smolagents/HEAD/README.md\n\n## Source\n\n- [Agent Skill Exchange](https://agentskillexchange.com/skills/smolagents-code-first-ai-agent-library/)","tags":["smolagents","code","first","agent","library","skills","agentskillexchange","agent-skills","ai-agents","ai-tools","awesome-list","claude-code"],"capabilities":["skill","source-agentskillexchange","skill-smolagents-code-first-ai-agent-library","topic-agent-skills","topic-ai-agents","topic-ai-tools","topic-awesome-list","topic-claude-code","topic-codex","topic-cursor","topic-llm","topic-mcp","topic-npx-skills","topic-openclaw","topic-skills-catalog"],"categories":["skills"],"synonyms":[],"warnings":[],"endpointUrl":"https://skills.sh/agentskillexchange/skills/smolagents-code-first-ai-agent-library","protocol":"skill","transport":"skills-sh","auth":{"type":"none","details":{"cli":"npx skills add agentskillexchange/skills","source_repo":"https://github.com/agentskillexchange/skills","install_from":"skills.sh"}},"qualityScore":"0.454","qualityRationale":"deterministic score 0.45 from registry signals: · indexed on github topic:agent-skills · 8 github stars · SKILL.md body (1,695 chars)","verified":false,"liveness":"unknown","lastLivenessCheck":null,"agentReviews":{"count":0,"score_avg":null,"cost_usd_avg":null,"success_rate":null,"latency_p50_ms":null,"narrative_summary":null,"summary_updated_at":null},"enrichmentModel":"deterministic:skill-github:v1","enrichmentVersion":1,"enrichedAt":"2026-05-18T19:12:31.872Z","embedding":null,"createdAt":"2026-05-18T13:19:29.634Z","updatedAt":"2026-05-18T19:12:31.872Z","lastSeenAt":"2026-05-18T19:12:31.872Z","tsv":"'/)':188 '/docs/smolagents/reference/agents#smolagents.codeagent)':130,231 '/huggingface/smolagents':262 '/huggingface/smolagents/head/readme.md':269 '/skills/smolagents-code-first-ai-agent-library/)':276 'action':34,86,146,151,184,234 'agent':6,18,26,58,70,78,136,173,211,226,240,249,271 'agentskillexchange.com':275 'agentskillexchange.com/skills/smolagents-code-first-ai-agent-library/)':274 'ai':5,17,57,69 'barebon':12,64 'basic':194 'build':16,68 'call':159,166 'caveat':123 'class':222 'classic':134 'code':3,22,31,55,74,83,149,155,217,225,236,245 'code-first':2,54 'codeag':127,228 'contain':192 'defin':247 'doc':266 'docker':50,102,185 'e2b':49,101 'enabl':36,88,206 'engin':143 'environ':116 'except':138 'exchang':273 'execut':29,47,81,99 'extract':263 'first':4,56,221 'first-class':220 'flexibl':38,90 'function':165 'get':198 'getting-start':197 'github.com':261 'github.com/huggingface/smolagents':260 'give':250 'henc':157 'host':191 'huggingfac':10,62 'huggingface.co':129,230 'huggingface.co/docs/smolagents/reference/agents#smolagents.codeagent)':128,229 'instal':105,109,118 'instanc':168 'isol':193 'json':25,77 'librari':7,14,59,66,204 'like':133 'line':215 'llm':142 'match':114 'most':132 'need':255 'note':200 'offer':219 'one':182 'oppos':238 'path':112 'perform':162,175 'pip':117 'power':210 'python':13,30,65,82,148,154,164 'rather':23,75 'raw.githubusercontent.com':268 'raw.githubusercontent.com/huggingface/smolagents/head/readme.md':267 'react':135 'reason':39,91 'requir':121 'run':209,257 'sandbox':46,98 'search':177 'self':190 'self-host':189 'setup':111 'sever':179 'singl':183 'skill':272 'skill-smolagents-code-first-ai-agent-library' 'smolag':1,8,53,60,119,201 'snippet':150,156 'sourc':259,270 'source-agentskillexchange' 'space':35,87 'start':199 'support':44,96,223 'think':20,72 'tool':41,93,158,253 'toolkit':120 'topic-agent-skills' 'topic-ai-agents' 'topic-ai-tools' 'topic-awesome-list' 'topic-claude-code' 'topic-codex' 'topic-cursor' 'topic-llm' 'topic-mcp' 'topic-npx-skills' 'topic-openclaw' 'topic-skills-catalog' 'upstream':108,125,265 'usag':195 'use':42,94,106,242 'via':48,100 'web':176 'weba':52 'webassembl':104 'websit':180 'work':131 'write':27,79,144,232,244 'www.docker.com':187 'www.docker.com/)':186","prices":[{"id":"240b8ce7-7cdc-416b-8136-d653cf65e465","listingId":"cbe5b993-f717-493f-b715-df1d9ca23504","amountUsd":"0","unit":"free","nativeCurrency":null,"nativeAmount":null,"chain":null,"payTo":null,"paymentMethod":"skill-free","isPrimary":true,"details":{"org":"agentskillexchange","category":"skills","install_from":"skills.sh"},"createdAt":"2026-05-18T13:19:29.634Z"}],"sources":[{"listingId":"cbe5b993-f717-493f-b715-df1d9ca23504","source":"github","sourceId":"agentskillexchange/skills/smolagents-code-first-ai-agent-library","sourceUrl":"https://github.com/agentskillexchange/skills/tree/main/skills/smolagents-code-first-ai-agent-library","isPrimary":false,"firstSeenAt":"2026-05-18T13:19:29.634Z","lastSeenAt":"2026-05-18T19:12:31.872Z"}],"details":{"listingId":"cbe5b993-f717-493f-b715-df1d9ca23504","quickStartSnippet":null,"exampleRequest":null,"exampleResponse":null,"schema":null,"openapiUrl":null,"agentsTxtUrl":null,"citations":[],"useCases":[],"bestFor":[],"notFor":[],"kindDetails":{"org":"agentskillexchange","slug":"smolagents-code-first-ai-agent-library","github":{"repo":"agentskillexchange/skills","stars":8,"topics":["agent-skills","ai-agents","ai-tools","awesome-list","claude-code","codex","cursor","llm","mcp","npx-skills","openclaw","skills-catalog"],"license":"mit","html_url":"https://github.com/agentskillexchange/skills","pushed_at":"2026-05-18T19:02:17Z","description":"The open catalog of AI agent skills — 2,000+ security-scanned skills for Claude Code, Cursor, Codex, and more.","skill_md_sha":"fa10b4503acd334d76466cc28648c968adaac1a2","skill_md_path":"skills/smolagents-code-first-ai-agent-library/SKILL.md","default_branch":"main","skill_tree_url":"https://github.com/agentskillexchange/skills/tree/main/skills/smolagents-code-first-ai-agent-library"},"layout":"multi","source":"github","category":"skills","frontmatter":{"name":"smolagents Code-First AI Agent Library","description":"smolagents is HuggingFace's barebones Python library for building AI agents that think in code rather than JSON. Agents write and execute Python code as their action space, enabling more flexible reasoning and tool use with support for sandboxed execution via E2B, Docker, or WebAssembly."},"skills_sh_url":"https://skills.sh/agentskillexchange/skills/smolagents-code-first-ai-agent-library"},"updatedAt":"2026-05-18T19:12:31.872Z"}}