📚Academy
likeone
online

Why Agent SDK?

The difference between chatting with AI and deploying AI agents that actually do things

From Chat to Agent

You have probably used Claude through a chat interface. You type a question, Claude answers. Maybe you paste in some code and ask for help. That is powerful, but it is also limited. You are the one doing the work — copying, pasting, running, checking. Claude is just thinking. You are the hands.

The Claude Agent SDK flips that equation. Instead of chatting with Claude, you build software that gives Claude hands. An agent built with the SDK can read files, write code, search the web, query databases, call APIs, run terminal commands, and make decisions — all on its own. You define the mission. The agent executes it.

This is the difference between asking a coworker for advice and hiring someone to do the job. The API is the advice line. The Agent SDK is the hiring contract.

Real-world analogy: Think of the Claude API like calling a brilliant friend on the phone — they can advise you, but they cannot reach through the phone to fix your car. The Agent SDK gives that friend a body. Now they can walk into your garage, pick up tools, diagnose the problem, order parts, and fix it while you do something else.

What the API Can Do (and Where It Stops)

The Claude API lets you send messages and get responses. You can set system prompts, control temperature, and even define tools for function calling. That is enough to build chatbots, content generators, and simple automations. But the API puts you in charge of every decision:

With the API alone, YOU must:

Write the tool execution loop. Handle every tool result. Manage conversation history. Decide when to stop. Implement permission checks. Handle streaming. Manage sessions. Build retry logic. Track costs. You are building the agent framework from scratch — every time.

With the Agent SDK, you get:

A complete agent runtime out of the box. Built-in tools (Bash, file operations, search). Automatic tool execution loops. Streaming event system. Session management with persistence. Permission controls. Cost guardrails. Sub-agent delegation. MCP server integration. You focus on what your agent does — not how agents work.

What the Agent SDK Unlocks

The SDK is not just convenience. It enables patterns that would take thousands of lines of custom code to build yourself:

1
Autonomous execution
Claude runs tools, reads results, decides next steps, and keeps going until the job is done. No human in the loop unless you want one.
2
Multi-agent delegation
Your main agent can spin up specialized sub-agents for specific tasks — a researcher, a coder, a reviewer — each with their own tools and instructions.
3
Session persistence
Agents can remember conversations across restarts. Resume where you left off, fork sessions for parallel exploration, and build agents that learn over time.
4
Safety guardrails
Built-in permission modes, cost budgets, turn limits, and lifecycle hooks let you control exactly what your agent can do — and stop it when it should not.

Your First Look at the SDK

Here is the simplest possible agent. This is not production code — it is the "Hello World" that shows you the shape of things to come:

TypeScript — your first agent in 5 lines
import { Claude } from "@anthropic-ai/claude-agent";

// Create a Claude agent with built-in tools
const agent = new Claude({
  model: "claude-sonnet-4-6",    // which model powers the agent
  tools: "defaults",              // gives Claude file tools, bash, etc.
});

// Give the agent a task and let it work
const result = await agent.query(
  "Read the file package.json and tell me what dependencies are installed."
);

console.log(result.text);
// Claude reads the file, parses it, and responds with a summary
// — all without you writing any file-reading code

Notice what you did not write: no file reading code, no JSON parsing, no tool execution loop, no error handling for missing files. The SDK handles all of that. You described what you wanted. The agent figured out how to do it.

Who Should Use the Agent SDK

The Agent SDK is for anyone building AI-powered software that needs to act, not just respond. That includes:

Developers building

Coding assistants, deployment bots, data pipelines, research agents, customer service automation, internal tools, CI/CD integrations, content generation systems

Prerequisites

Comfortable with TypeScript or JavaScript. Familiar with npm. Basic understanding of async/await. No prior AI experience needed — this course teaches the rest.

What You Will Build in This Course

By the end of these 10 lessons, you will go from zero to deploying production agents. Here is the roadmap:

1-2
Install, authenticate, and make your first query
3-5
Master streaming, tool use, and MCP integration
6-8
Sub-agents, session management, hooks and lifecycle
9-10
Testing, safety, and production deployment
Academy
Built with soul — likeone.ai