Skip to main content
HS
HiSETSuccess
LeetCode Prep

Agent Engineering

From autocomplete user to superstar developer — coding agents, context, skills, MCP, hooks, spec-driven and parallel workflows, and building your own agents.

Chapter 9 · 7 lessons

Build Your Own Agents

Go from using agents to shipping them: Claude Agent SDK, OpenAI Agents SDK, Cursor SDK, browser and computer use, A2A for agent-to-agent, and running agents in production.

Claude Code · OpenAI Codex · Cursor · LangChain / LangGraph

Show all 7 lessons

Lesson 1 of 7

When to Build an Agent (and Which Layer)

You build an agent when a task repeats, needs tools, and does not fit inside an interactive session: a PR reviewer, a nightly dependency updater, a support triage bot, a data-migration assistant. Pick the lowest layer that does the job.

LayerExamplesChoose when
Headless coding CLIclaude -p, codex exec, Cursor CLIA script or CI step that runs one task in a repo
Coding-agent SDKClaude Agent SDK, Cursor SDKYou want a coding agent's tools and loop inside your own app
General agent SDKOpenAI Agents SDKTool-calling agents with handoffs and guardrails, not repo-centric
Graph frameworkLangGraphExplicit state, durable checkpoints, human approval steps
Plain API callsResponses / Messages APIsOne or two model calls — no loop needed

Signal

Say which layer you rejected: 'A LangGraph graph is overkill here; a Claude Agent SDK script with two allowed tools and a turn cap does it.'