Install LangGraph, build a tiny tool-calling graph or functional agent, run one arithmetic task—after-work Python agent basics.
LangGraph is a Python framework for building stateful agents as graphs (nodes + edges) or with a Functional API—part of the LangChain ecosystem. Start from the docs: docs.langchain.com (LangGraph quickstarts live under the LangChain docs). Product overview: langchain.com/langgraph.
For after-work Python, LangGraph teaches the important idea: an agent is a loop with state, not a single chat completion. Begin with a calculator-style tool agent—not a multi-service RAG empire.
Learners who already know basic Python functions/classes and want their first programmable agent loop. If you have never written a function with type hints, spend a few Intro lessons first.
Overview: Top 10 AI agent tools for after-work Python.
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -U langgraph langchain langchain-anthropic
# or your preferred chat-model integration from the docs
Follow the current LangGraph quickstart for the exact package names your doc version recommends.
export ANTHROPIC_API_KEY=... # or OPENAI_API_KEY / provider of choice
Never paste keys into notebooks you will commit. Prefer a local .env that stays gitignored.
Use the docs’ Graph API or Functional API calculator agent (add/multiply/divide tools). Prefer the shortest sample that compiles and invokes—delete visualization helpers if they distract.
Invoke with something like “Add 3 and 4.” Print each message. Confirm a tool call happened, then a final answer. That trail is the lesson.
Write in your own words: what lived in state, which node called tools, when the graph ended. This note beats bookmarking ten blog posts.
Add a subtract(a, b) tool, rebind tools, re-run “Subtract 10 and 3.” If the model ignores the new tool, improve the tool docstring—do not rebuild the whole graph.
model.invoke, you are not learning LangGraph yet.One venv, one graph, one arithmetic task fits a weekday evening. You leave with a mental model of agent loops you can reuse in other frameworks.
When tool-calling graphs feel obvious, strengthen Python foundations with Intro to Python Programming so framework samples stop feeling like magic.