A Tour of Agents
LearnCompareBlog
Source

Lesson 2: Tools = Dict — A Tour of Agents

LLM tool calling is a dictionary lookup: tools[name](**args). Build function calling from scratch in Python and see what LangChain's @tool decorator hides.

Tools = Dict You've seen this in ChatGPT: you ask "what's the weather?" and it calls a weather tool. Or in Claude: you ask it to search the web and it runs a search. The LLM can't run code — but it can say *"call add with a=10, b=5"* — a structured request. Your code executes it. > Framework parallel: LangChain's @tool decorator, CrewAI's tool registration — they build this dict for you. Here you'll see what's inside.

Concepts covered

  • tools
  • function calling
  • JSON schema
  • dispatch

Framework comparison: LangChain's @tool, CrewAI's tool registration — it's tools[name](**args).

All lessons in this course

  1. Lesson 1: The Agent Function
  2. Lesson 2: Tools = Dict
  3. Lesson 3: The Agent Loop
  4. Lesson 4: Conversation
  5. Lesson 5: State = Dict
  6. Lesson 6: Memory
  7. Lesson 7: Policy = Guardrails
  8. Lesson 8: Self-Scheduling
  9. Lesson 9: The Whole Thing
2 / 9