Module 1 · Phase 1: Foundations from raw APIs · Weeks 1–2

LLM API Mastery

No frameworks. Raw HTTP/SDK calls only. Everything an agent does reduces to these mechanics: the message array, tool calling, structured outputs, streaming, tokens, and robust error handling.

After this module you can
  • Explain and implement the chat message format (system/user/assistant/tool roles) from memory
  • Implement tool calling end-to-end: schema → model emits call → you execute → return result → model continues
  • Produce validated structured outputs with JSON schema and recover from malformed JSON
  • Stream responses token-by-token and explain why streaming matters for agent UX
  • Count tokens, estimate cost per call, and reason about context-window budgets
  • Handle rate limits, timeouts, and refusals with exponential backoff and graceful degradation

Lessons

Best external resources

Curated reading, docs, and tools that pair with this module.