Repository guide · getting started · v1
huggingface / smolagents · Getting started
Platform metadata describes 🤗 smolagents as a barebones library for agents that think in code (author-claimed). The analyzer parsed two requirements manifests with 43 runtime dependency records, listed ten entrypoint records (eight with __main__ guards), and traced bounded static paths that stop at unresolved boundaries. Installation and run commands are not verified, and pyproject.toml dependency tables were not parsed.
- Original repository
- huggingface/smolagents
- License
- Apache-2.0 · open-source license
- Analyzed revision · last verified
- 30bb1161095dbae2271e6bc3cc4c219cc3897a57 ·
Newer revision observed; the code this guide cites is unchanged. The default branch moved to c30b115286e0, checked 2026-10-03. A revision diff of 6 changed files found no change in the code regions this guide cites. The guide still describes revision 30bb1161095d; repository-wide counts (files, calls and so on) refer to that revision.
huggingface/smolagents Getting Started: What a Newcomer Can Learn
Terms used on this page
- Entrypoint record
- A file the analyzer marks as a place where execution can start. When it carries a __main__ guard excerpt, the file contains an if __name__ == "__main__": block and the excerpt shows what that block calls; without an excerpt, the file was flagged by its name only.
- Bounded static execution path
- A call chain reconstructed from the source code without running it, stopped after a fixed number of steps. It shows how far the code can be followed on paper, not what happens at run time.
- Unresolved boundary
- Where a static path stops because the next call goes into an external library or cannot be resolved without running the code. It marks the edge of this analysis, not a defect in the repository.
- Static relations
- Calls and imports found in the source. "External or unresolved" relations point outside the analyzed files.
- Module role
- The analyzer's label for a file, inferred from how many calls go in and out (for example core, entry/orchestration, leaf). It describes a position in the call graph, not the authors' design.
- Test-like files
- Files whose names or locations look like tests. This analysis counts them; it does not run them.
- Observed · inferred · author-claimed · unresolved
- How each statement is supported: read directly from the analyzed files; derived by the analyzer from them; stated by the repository's authors (metadata, README); or not established by this analysis.
- Verified
- Two uses on these pages. In an analyzer record ("verified provenance", "a verified entrypoint") it means the record was read directly from the analyzed files, which these guides call observed; for an entrypoint, the __main__ guard text is present. Since the analyzer fix of 2026-10-04, a file that only has an entrypoint-like name such as cli.py or main.py is recorded as inferred; guides analyzed before that still call such a file verified, and it is still only a guess about how the file is used. It does not mean the code was run or tested. "Last verified" is the date the guide last passed the lab's checks against the analysis record of the stated revision; it is not a review of the repository itself.
What you are looking at
This repository's platform metadata describes it as '🤗 smolagents: a barebones library for agents that think in code.' That wording is the project's own author-claimed description, not an analyzer finding. The metadata lists Python as the primary language, with 988,225 language bytes for Python against 326 for the Makefile. The license on record is Apache-2.0. The latest release on record is v1.26.0, published 2026-05-29, and the repository had 29,313 stargazers at 2026-09-14. The analyzer's summary counts 185 analyzed files organized around docs, examples, src and tests, and reports 28 test-like files and 7,633 static relation edges.
What it needs
Dependency records come only from requirements-style manifests; all 43 records are runtime-scoped and name two source files: examples/async_agent/requirements.txt and examples/open_deep_research/requirements.txt. The pyproject.toml dependency tables were not parsed, even though pyproject.toml itself is flagged as a project-level important file. The async_agent manifest contributes four runtime records — smolagents, starlette, anyio and uvicorn — none with a version pin. The open_deep_research manifest contributes the remaining 39 runtime records; for example, anthropic >=0.37.1, openai >=1.52.2, torch >=2.2.2 and transformers >=4.46.0. Read broadly (scoped to the records cited), that list spans web scraping (beautifulsoup4, markdownify), document handling (openpyxl, mammoth, pypdf, PyPDF2), data science (numpy, pandas, scikit-learn, scipy) and model stacks (torch, torchvision, transformers), which suggests a tool-heavy research example.
How it starts
The packet lists ten entrypoint records, eight of which contain a Python __main__ guard. Six of those eight guards simply call a main() function — including src/smolagents/cli.py, whose guard reads 'if __name__ == "__main__":' — as do the guards in examples/open_deep_research/run.py and run_gaia.py. The guard in examples/open_deep_research/app.py calls demo.launch(); the one in examples/smolagents_benchmark/run.py starts by parsing arguments, loading an eval dataset and branching on model type. Two more records, examples/async_agent/main.py and examples/server/main.py, are flagged as likely executable only by filename heuristic. Listed bounded execution paths cover only two entrypoints: from examples/async_agent/main.py they reach Route and Starlette, and from examples/open_deep_research/app.py they reach create_agent, GradioUI and demo.launch; every listed path ends at an unresolved boundary. The summary separately calls examples/structured_output_tool.py the apparent main starting place. Runtime behaviour beyond these records is not established by this static analysis.
Where to look first
Start with the project-level important files: README.md, pyproject.toml and LICENSE. Five further files are flagged as important because they are likely entrypoints: examples/structured_output_tool.py, src/smolagents/cli.py, src/smolagents/vision_web_browser.py, examples/open_deep_research/app.py and examples/open_deep_research/run.py. The analyzer's learning-path teaching claim says to start with manifests and important symbols, then trace the bounded execution path and inspect unresolved boundaries before changing code. Its modify-guide claim says to begin modification analysis at examples/async_agent/main.py and verify downstream effects manually. Top-level directories hold docs (81 files), examples (34), src (21) and tests (28), alongside .github (10) and 11 root-level entries, within 185 analyzed files. The summary reports 28 test-like files, so a test suite exists in the analyzed inventory.
What this analysis cannot tell you
No installation, build or run commands are verified here; install/run/build inference is partial. The analyzer did not parse pyproject.toml dependency tables. README extraction is line-based and may capture code lines instead of prose, so README-derived text is author-claimed at most. The analysis is static only: reflection, dynamic imports, framework runtime wiring and dynamic dispatch are not resolved. The open_deep_research manifest also carries overlapping entries — torch both pinned and unpinned, python_pptx and python-pptx, pdfminer and pdfminer.six, PyPDF2 and pypdf — worth checking upstream. Two packet-internal tensions: the summary calls examples/structured_output_tool.py the apparent starting place while a teaching claim names examples/async_agent/main.py; and one teaching claim says no bounded static execution path is available although five path records are listed. The summary's 7,633 static relation edges and the architecture claim's 615 resolved static call relations are also not reconciled in the packet.
What the project says about itself
The project's own metadata supplies the description quoted earlier and links a documentation homepage; both are author-claimed fields from the platform API, not analyzer findings. The topics field in the packet is empty, so no repository topics are on record.
What this analysis could not establish
The writing model's own notes on the analysis record. Identifiers such as lim_3, exec_* or claim_… name records of that analysis; the claims table cites the same records.
- No installation, build or run commands are verified; install/run/build inference is partial (lim_2).
- pyproject.toml dependency tables were not parsed; dependency evidence covers only the two requirements manifests (lim_3).
- README extraction is line-based and may capture code lines instead of prose; README-derived text is author-claimed at most (lim_4).
- Analysis is static only; reflection, dynamic imports, framework runtime wiring and dynamic dispatch are not resolved (lim_1).
- The packet names two different apparent starting places (examples/structured_output_tool.py in the summary vs examples/async_agent/main.py in a teaching claim) without reconciling them.
- A teaching claim says no bounded static execution path is available while five path records are listed; treated here as unresolved.
- 7,633 static relation edges (summary) and 615 resolved static call relations (architecture teaching claim) are not reconciled in the packet.
- Dependency records include overlapping entries (torch pinned and unpinned, python_pptx/python-pptx, pdfminer/pdfminer.six, PyPDF2/pypdf); the intent is not established.
Claims and evidence — 36 claims, 36 supported by an independent verifier
Every substantive statement above is a claim bound to grounding IDs of the analyzed revision. Global grounding IDs are namespaced by the analysis run.
| Claim | Epistemic status | Verifier | Grounding (global IDs) |
|---|---|---|---|
| c1 The platform metadata describes the project as '🤗 smolagents: a barebones library for agents that think in code.'; this wording is author-claimed repository metadata from the platform API. | author_claimed | supported | analysis_c0e49dab7c5999ba:meta_description |
| c2 Platform records list Python as the primary language, with language bytes of 988,225 for Python and 326 for the Makefile. | observed | supported | analysis_c0e49dab7c5999ba:meta_primary_language, analysis_c0e49dab7c5999ba:meta_language_bytes |
| c3 The license on record is Apache-2.0. | observed | supported | analysis_c0e49dab7c5999ba:meta_license |
| c4 The latest release on record is v1.26.0, published 2026-05-29T05:09:47Z, and the repository had 29,313 stargazers at 2026-09-14. | observed | supported | analysis_c0e49dab7c5999ba:meta_latest_release, analysis_c0e49dab7c5999ba:meta_stars |
| c5 The analyzer's summary counts 185 analyzed files, a top-level organization around docs, examples, src and tests, 28 test-like files, and 7,633 static relation edges. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository |
| c6 All 43 dependency records are runtime-scoped and come from two requirements-style manifests: examples/async_agent/requirements.txt and examples/open_deep_research/requirements.txt. | observed | supported | analysis_c0e49dab7c5999ba:dep_1, analysis_c0e49dab7c5999ba:dep_2, analysis_c0e49dab7c5999ba:dep_3, analysis_c0e49dab7c5999ba:dep_4, analysis_c0e49dab7c5999ba:dep_5, analysis_c0e49dab7c5999ba:dep_6, analysis_c0e49dab7c5999ba:dep_7, analysis_c0e49dab7c5999ba:dep_8, analysis_c0e49dab7c5999ba:dep_9, analysis_c0e49dab7c5999ba:dep_10, analysis_c0e49dab7c5999ba:dep_11, analysis_c0e49dab7c5999ba:dep_12, analysis_c0e49dab7c5999ba:dep_13, analysis_c0e49dab7c5999ba:dep_14, analysis_c0e49dab7c5999ba:dep_15, analysis_c0e49dab7c5999ba:dep_16, analysis_c0e49dab7c5999ba:dep_17, analysis_c0e49dab7c5999ba:dep_18, analysis_c0e49dab7c5999ba:dep_19, analysis_c0e49dab7c5999ba:dep_20, analysis_c0e49dab7c5999ba:dep_21, analysis_c0e49dab7c5999ba:dep_22, analysis_c0e49dab7c5999ba:dep_23, analysis_c0e49dab7c5999ba:dep_24, analysis_c0e49dab7c5999ba:dep_25, analysis_c0e49dab7c5999ba:dep_26, analysis_c0e49dab7c5999ba:dep_27, analysis_c0e49dab7c5999ba:dep_28, analysis_c0e49dab7c5999ba:dep_29, analysis_c0e49dab7c5999ba:dep_30, analysis_c0e49dab7c5999ba:dep_31, analysis_c0e49dab7c5999ba:dep_32, analysis_c0e49dab7c5999ba:dep_33, analysis_c0e49dab7c5999ba:dep_34, analysis_c0e49dab7c5999ba:dep_35, analysis_c0e49dab7c5999ba:dep_36, analysis_c0e49dab7c5999ba:dep_37, analysis_c0e49dab7c5999ba:dep_38, analysis_c0e49dab7c5999ba:dep_39, analysis_c0e49dab7c5999ba:dep_40, analysis_c0e49dab7c5999ba:dep_41, analysis_c0e49dab7c5999ba:dep_42, analysis_c0e49dab7c5999ba:dep_43, analysis_c0e49dab7c5999ba:lim_3 |
| c7 pyproject.toml dependency tables were not parsed; dependency records come only from requirements-style manifests parsed by the analyzer. | observed | supported | analysis_c0e49dab7c5999ba:lim_3 |
| c8 pyproject.toml is classified as a project-level important file. | observed | supported | analysis_c0e49dab7c5999ba:important_3 |
| c9 The examples/async_agent/requirements.txt manifest contributes four runtime records — smolagents, starlette, anyio and uvicorn — none with a version pin. | observed | supported | analysis_c0e49dab7c5999ba:dep_1, analysis_c0e49dab7c5999ba:dep_2, analysis_c0e49dab7c5999ba:dep_3, analysis_c0e49dab7c5999ba:dep_4 |
| c10 The examples/open_deep_research/requirements.txt manifest contributes 39 runtime dependency records. | observed | supported | analysis_c0e49dab7c5999ba:dep_5, analysis_c0e49dab7c5999ba:dep_6, analysis_c0e49dab7c5999ba:dep_7, analysis_c0e49dab7c5999ba:dep_8, analysis_c0e49dab7c5999ba:dep_9, analysis_c0e49dab7c5999ba:dep_10, analysis_c0e49dab7c5999ba:dep_11, analysis_c0e49dab7c5999ba:dep_12, analysis_c0e49dab7c5999ba:dep_13, analysis_c0e49dab7c5999ba:dep_14, analysis_c0e49dab7c5999ba:dep_15, analysis_c0e49dab7c5999ba:dep_16, analysis_c0e49dab7c5999ba:dep_17, analysis_c0e49dab7c5999ba:dep_18, analysis_c0e49dab7c5999ba:dep_19, analysis_c0e49dab7c5999ba:dep_20, analysis_c0e49dab7c5999ba:dep_21, analysis_c0e49dab7c5999ba:dep_22, analysis_c0e49dab7c5999ba:dep_23, analysis_c0e49dab7c5999ba:dep_24, analysis_c0e49dab7c5999ba:dep_25, analysis_c0e49dab7c5999ba:dep_26, analysis_c0e49dab7c5999ba:dep_27, analysis_c0e49dab7c5999ba:dep_28, analysis_c0e49dab7c5999ba:dep_29, analysis_c0e49dab7c5999ba:dep_30, analysis_c0e49dab7c5999ba:dep_31, analysis_c0e49dab7c5999ba:dep_32, analysis_c0e49dab7c5999ba:dep_33, analysis_c0e49dab7c5999ba:dep_34, analysis_c0e49dab7c5999ba:dep_35, analysis_c0e49dab7c5999ba:dep_36, analysis_c0e49dab7c5999ba:dep_37, analysis_c0e49dab7c5999ba:dep_38, analysis_c0e49dab7c5999ba:dep_39, analysis_c0e49dab7c5999ba:dep_40, analysis_c0e49dab7c5999ba:dep_41, analysis_c0e49dab7c5999ba:dep_42, analysis_c0e49dab7c5999ba:dep_43 |
| c11 For example, the open_deep_research manifest pins anthropic >=0.37.1, openai >=1.52.2, torch >=2.2.2 and transformers >=4.46.0. | observed | supported | analysis_c0e49dab7c5999ba:dep_5, analysis_c0e49dab7c5999ba:dep_15, analysis_c0e49dab7c5999ba:dep_28, analysis_c0e49dab7c5999ba:dep_30 |
| c12 Scoped to the records cited, the open_deep_research list spans web scraping (beautifulsoup4, markdownify), document handling (openpyxl, mammoth, pypdf, PyPDF2), data science (numpy, pandas, scikit-learn, scipy) and model stacks (torch, torchvision, transformers), suggesting a tool-heavy research example. | inferred | supported | analysis_c0e49dab7c5999ba:dep_7, analysis_c0e49dab7c5999ba:dep_12, analysis_c0e49dab7c5999ba:dep_16, analysis_c0e49dab7c5999ba:dep_11, analysis_c0e49dab7c5999ba:dep_17, analysis_c0e49dab7c5999ba:dep_14, analysis_c0e49dab7c5999ba:dep_36, analysis_c0e49dab7c5999ba:dep_37, analysis_c0e49dab7c5999ba:dep_28, analysis_c0e49dab7c5999ba:dep_29, analysis_c0e49dab7c5999ba:dep_30, analysis_c0e49dab7c5999ba:dep_23, analysis_c0e49dab7c5999ba:dep_39 |
| c13 The packet lists ten entrypoint records; eight contain a Python __main__ execution guard. | observed | supported | analysis_c0e49dab7c5999ba:py_entry_77730e8143f6, analysis_c0e49dab7c5999ba:py_entry_eb911c5c2fc4, analysis_c0e49dab7c5999ba:py_entry_9daffde399e1, analysis_c0e49dab7c5999ba:py_entry_66aae1c925b6, analysis_c0e49dab7c5999ba:py_entry_a424b56a044e, analysis_c0e49dab7c5999ba:py_entry_b2d8852474a5, analysis_c0e49dab7c5999ba:py_entry_c3be260bce7b, analysis_c0e49dab7c5999ba:py_entry_3c44d771157e, analysis_c0e49dab7c5999ba:entry_4, analysis_c0e49dab7c5999ba:entry_8 |
| c14 Six of the eight guarded entrypoints simply call a main() function in the guard body: examples/structured_output_tool.py, examples/open_deep_research/run.py, examples/open_deep_research/run_gaia.py, examples/plan_customization/plan_customization.py, src/smolagents/cli.py and src/smolagents/vision_web_browser.py. | observed | supported | analysis_c0e49dab7c5999ba:py_entry_77730e8143f6, analysis_c0e49dab7c5999ba:py_entry_9daffde399e1, analysis_c0e49dab7c5999ba:py_entry_66aae1c925b6, analysis_c0e49dab7c5999ba:py_entry_a424b56a044e, analysis_c0e49dab7c5999ba:py_entry_c3be260bce7b, analysis_c0e49dab7c5999ba:py_entry_3c44d771157e |
| c15 The __main__ guard in examples/open_deep_research/app.py calls demo.launch(). | observed | supported | analysis_c0e49dab7c5999ba:py_entry_eb911c5c2fc4 |
| c16 The __main__ guard in examples/smolagents_benchmark/run.py starts by parsing arguments, loading an eval dataset and branching on model type. | observed | supported | analysis_c0e49dab7c5999ba:py_entry_b2d8852474a5 |
| c17 Two entrypoint records are filename-heuristic candidates: examples/async_agent/main.py and examples/server/main.py are flagged as likely executable by filename heuristic. | observed | supported | analysis_c0e49dab7c5999ba:entry_4, analysis_c0e49dab7c5999ba:entry_8 |
| c18 The five listed bounded execution paths cover only two entrypoints — examples/async_agent/main.py and examples/open_deep_research/app.py — and each terminates at an unresolved boundary. | inferred | supported | analysis_c0e49dab7c5999ba:exec_fcb626546464, analysis_c0e49dab7c5999ba:exec_4295bbf65082, analysis_c0e49dab7c5999ba:exec_5beaf01e7396, analysis_c0e49dab7c5999ba:exec_6e6d72c98a2e, analysis_c0e49dab7c5999ba:exec_9cb721a97873 |
| c19 The analyzer's summary names examples/structured_output_tool.py as the apparent main starting place. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository |
| c20 Runtime behaviour beyond these entrypoint and path records is not established; the analysis is static and does not resolve framework runtime wiring. | observed | supported | analysis_c0e49dab7c5999ba:lim_1 |
| c21 README.md, pyproject.toml and LICENSE are classified as project-level important files. | observed | supported | analysis_c0e49dab7c5999ba:important_1, analysis_c0e49dab7c5999ba:important_3, analysis_c0e49dab7c5999ba:important_4 |
| c22 Five further files are flagged as important because they are likely entrypoints: examples/structured_output_tool.py, src/smolagents/cli.py, src/smolagents/vision_web_browser.py, examples/open_deep_research/app.py and examples/open_deep_research/run.py. | observed | supported | analysis_c0e49dab7c5999ba:important_5, analysis_c0e49dab7c5999ba:important_6, analysis_c0e49dab7c5999ba:important_7, analysis_c0e49dab7c5999ba:important_8, analysis_c0e49dab7c5999ba:important_9 |
| c23 The analyzer's learning-path teaching claim: start with manifests and important symbols, then trace the bounded execution path and inspect unresolved boundaries before changing code. | inferred | supported | analysis_c0e49dab7c5999ba:claim_e56db45165bf |
| c24 The analyzer's modify-guide teaching claim: begin modification analysis at the detected entrypoint examples/async_agent/main.py, then verify downstream effects manually. | inferred | supported | analysis_c0e49dab7c5999ba:claim_b6746b09a714 |
| c25 Top-level directories hold docs (81 files), examples (34), src (21), tests (28), .github (10) and 11 root-level entries, within 185 analyzed files. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository |
| c26 The summary reports 28 test-like files and states that the repository includes tests. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository |
| c27 Installation, build and run commands are not verified by this analysis; install/run/build inference is partial. | observed | supported | analysis_c0e49dab7c5999ba:lim_2 |
| c28 The analyzer did not parse pyproject.toml dependency tables; dependency records come only from requirements-style manifests. | observed | supported | analysis_c0e49dab7c5999ba:lim_3 |
| c29 README claim extraction is line-based and may capture code lines instead of prose claims; README-derived text is author_claimed at most. | observed | supported | analysis_c0e49dab7c5999ba:lim_4 |
| c30 The analysis is static only: reflection, runtime dependency injection, dynamic imports, monkey-patching, generated code, framework runtime wiring and dynamic dispatch are not resolved. | observed | supported | analysis_c0e49dab7c5999ba:lim_1 |
| c31 The open_deep_research manifest carries overlapping entries: torch appears both pinned (>=2.2.2) and unpinned, python_pptx and python-pptx both appear, as do pdfminer and pdfminer.six, and PyPDF2 and pypdf. | observed | supported | analysis_c0e49dab7c5999ba:dep_28, analysis_c0e49dab7c5999ba:dep_41, analysis_c0e49dab7c5999ba:dep_25, analysis_c0e49dab7c5999ba:dep_40, analysis_c0e49dab7c5999ba:dep_19, analysis_c0e49dab7c5999ba:dep_20, analysis_c0e49dab7c5999ba:dep_39, analysis_c0e49dab7c5999ba:dep_23 |
| c32 The summary names examples/structured_output_tool.py as the apparent main starting place, while a teaching claim names examples/async_agent/main.py as the detected starting point; the packet does not reconcile the two. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository, analysis_c0e49dab7c5999ba:claim_175a3103d801 |
| c33 One teaching claim states that no bounded static execution path is available, yet the packet lists five bounded execution path records; the packet leaves this contradiction unresolved. | unresolved | supported | analysis_c0e49dab7c5999ba:claim_4d30ade3e21e, analysis_c0e49dab7c5999ba:exec_fcb626546464, analysis_c0e49dab7c5999ba:exec_4295bbf65082, analysis_c0e49dab7c5999ba:exec_5beaf01e7396, analysis_c0e49dab7c5999ba:exec_6e6d72c98a2e, analysis_c0e49dab7c5999ba:exec_9cb721a97873 |
| c34 The summary reports 7,633 static relation edges while the architecture teaching claim reports 615 resolved static call relations; the packet does not reconcile these counts. | inferred | supported | analysis_c0e49dab7c5999ba:summary_repository, analysis_c0e49dab7c5999ba:claim_8020bdadee3e |
| c35 The project's self-description ('🤗 smolagents: a barebones library for agents that think in code.') and its linked documentation homepage are author-claimed platform metadata. | author_claimed | supported | analysis_c0e49dab7c5999ba:meta_description, analysis_c0e49dab7c5999ba:meta_homepage |
| c36 The topics field in the packet is empty, so no repository topics are on record. | observed | supported | analysis_c0e49dab7c5999ba:meta_topics |
Sources, rights and disclosure · attribution-license-templates/v0.1
Rights notice. Original repository hosted on GitHub. Repository source code, documentation, names, media, and related project materials remain subject to the rights of their respective authors, contributors, and other rights holders and to applicable repository license terms.
Platform notice. GitHub is the source hosting platform for the linked repository. GitHub and related marks are trademarks of GitHub, Inc. EVEMISS Technology is not affiliated with or endorsed by GitHub unless explicitly stated otherwise.
How this page is produced. This page was produced using revision-aware repository analysis and AI-assisted editorial tooling. Technical claims are tied to the analyzed repository revision and may be revalidated when the source repository changes.
AI-assisted analysis. Reviewed by EVEMISS Technology through human–AI collaborative review. · Report a rights concern · Back to the overview