code q&a
Resources About
Question:

What is an agent SDK?

An agent SDK is a library that gives developers the same harness that powers a tool like Claude Code, so they can build their own AI agents inside their own apps. It saves you from writing all the code that keeps an agent running, which turns out to be a lot of work.

Anthropic’s version is the Claude Agent SDK. It used to be called the Claude Code SDK and Anthropic renamed it because people can use it to build agents that do a lot more than write code. It gives you the agent loop that keeps the AI model working until a task is done, along with built-in tools for reading and editing files, running commands and searching the web. It also manages the model’s context window for you and has permissions so you decide which tools run on their own and which ones need approval.

You can add your own tools too, for example by connecting MCP servers. T3 Code uses it to run Claude inside its app. OpenAI has its own version called the OpenAI Agents SDK, which comes with an agent loop and support for custom tools and MCP.

You could also build the loop yourself by calling a model’s API and writing all the code that runs tools, tracks the conversation and decides when to stop. A graph framework like LangGraph has you design every step of the workflow ahead of time, which is the idea behind graph engineering. An agent SDK hands you an agent that already works and you shape it with your own tools and system prompt.

I first saw the Agent SDK when I was building agents with LangGraph. I thought it was great engineering by Anthropic to take the harness out of the Claude Code terminal app and offer it as a library.

You might also like