Install Hugging Face smolagents, run a tiny code-agent with one tool, and learn tool-calling without a heavyweight stack.
smolagents is Hugging Face’s lightweight library for code agents—agents that write and run Python (or call tools) to finish a task. Docs: huggingface.co/docs/smolagents · code: github.com/huggingface/smolagents.
For after-work learners it is a friendly on-ramp: small API surface, HF ecosystem models, and a clear “agent as a loop that may execute code” mental model.
Python learners who already run scripts and want a first tool-calling / code-agent without standing up a full orchestration platform. If pip install still feels scary, finish a few Intro lessons first.
Overview: Top 10 AI agent tools for after-work Python.
python -m venv .venv
source .venv/bin/activate
pip install -U smolagents
# plus any model backend extras the current docs list
Follow the install line on huggingface.co/docs/smolagents—extras change.
Either a cloud API key (e.g. HF token / OpenAI-compatible) or a small local model if the docs’ local path fits your machine. Write the choice in NOTES.md. One path only tonight.
export HF_TOKEN=... # if your chosen path needs it
Copy the minimal example from the docs. Ask something constrained: “Compute 17 * 19 and return only the number.” Watch whether the agent used a code step or a tool.
Define a tiny @tool (or equivalent decorator/class from the docs) like word_count(text: str) -> int. Re-run with: “How many words are in: after work python?” Confirm your tool appears in the trail.
Do not wire Gradio, Spaces, and three models on night one. Save that for weekend #2.
Change the tool to slugify(text: str) -> str (lowercase, spaces → -). Ask the agent to slugify “Hello Smol Agents”. If it invents a slug without calling the tool, tighten the tool description and system prompt—do not add five more tools.
eval anything on your laptop with no sandbox story. Start with the docs’ recommended safe defaults; never point it at secrets folders.One venv, one agent, one tool—weekday-sized. You learn code-agent behavior without a platform tax.
When tool traces feel readable, strengthen Python with Intro to Python Programming so the code the agent writes is code you can also write by hand.