Skip to content

Agents

How to build agents that use an LLM to decide and act. Each note builds on the previous one, with a runnable Python example in the repository.

  • Agent Loop

    The loop that sends context to a model, executes the tool it requests, and feeds the result back until the model returns a final answer.

  • Tool Calling

    How a model requests a function, your application executes it, and the result goes back to the model, plus the failure cases to handle.

  • Context Engineering

    How to select, organize and update the information an LLM receives, from recent-message selection to summarization, retrieval and structured state.

  • Agent Memory

    How agents store, retrieve, update and forget information across conversations, and how short-term, long-term, episodic and semantic memory fit with context engineering.

  • Planning and Task Decomposition

    How agents break a goal into tasks with dependencies and status, execute them in order, verify results, and replan when a task fails.

  • Model Context Protocol

    What MCP is, how hosts, clients and servers work together, how tools are discovered and called, and when to use it instead of plain function calling.