⟡
AgentCraft
LearnCompareBlog

Lesson 0: Python Basics — AgentCraft

Variables, strings, lists, dicts, if/for, functions, and methods — the Python syntax every AgentCraft lesson uses. No LLM required; runs in your browser.

Chapter 0: Python in five minutes The interactive lessons use Python — the language you see in the code blocks. You do not install anything: a copy of Python runs inside your browser. How to read Python • Indentation (spaces at the start of a line) groups lines into blocks. After a line ending with :, the next lines must be indented until the block ends. • # starts a comment: Python ignores the rest of that line. • Quotes wrap text: "like this" or 'like this'. This chapter introduces the pieces that appear again and again in the agent code: names for values, lists, dictionaries, decisions, loops, and functions.

Concepts covered

  • variables
  • strings
  • lists
  • dicts
  • if / else
  • for
  • functions
  • methods

Framework comparison: Later lessons add `async` and HTTP calls. Same Python syntax — just more moving parts.

All lessons in this course

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