Build your first AI agent

Build an AI agent in TypeScript step by step: tool calling, MCP, RAG, security, evaluation and cost.

  1. What is an AI agent? 200 messages a day at a small café

    What is an AI agent, and how is it different from a chatbot or a workflow? Three ways to answer a café's customers, compared with TypeScript code that runs.

    22 min read

  2. Call an LLM API in TypeScript: a chatbot for a small café

    Call an LLM API in TypeScript with Claude's official SDK, write a system prompt for a café chatbot, and see why it confidently invents order statuses.

    19 min read

  3. What is tool calling? Letting a café chatbot look up orders

    What is tool calling and how does it work? Describe tools to an LLM, read the tool_use block, run your real function and send a tool_result back, in TypeScript.

    20 min read