· Harness/ What thinks

Claude Agent SDK

Claude Agent SDK is a harness option for building AI agents. The Claude Code loop as a library, for agents that are not about code.

Proprietary · usage based · hosted service only · SDKs for TypeScript and Python · by Anthropic · verified 2026-08-21

Official docsAdd to a stackAll harness options
· When to reach for it/ Fit
  • You are choosing a harness component — what thinks.
  • You are happy to depend on a hosted service and would rather not operate this yourself.

Worth knowing. Same harness as Claude Code, but you own the entrypoint and the tool surface.

· What it takes to run/ Setup
Install
npm install @anthropic-ai/claude-agent-sdk
Environment
ANTHROPIC_API_KEY=
· Claude Agent SDK vs the alternatives/ 11 others
OptionWhat it doesLicenceSelf-host
Claude Agent SDKThe Claude Code loop as a library, for agents that are not about code.ProprietaryNo
Claude CodeAnthropic's coding agent — terminal, IDE and SDK, with hooks, skills and MCP built in.ProprietaryNo
Hermes AgentSelf-improving agent from Nous Research — writes its own skills from experience and carries them forward.Open sourceYes
OpenClawSelf-hosted gateway putting an agent in Slack, Telegram, WhatsApp, Signal, Discord and iMessage at once.Open sourceYes
Prime AgentPrime Intellect's recursive-language-model harness — a persistent IPython kernel is the only tool, sub-agents are function calls.Open sourceYes
DeepSeek HarnessEverything is a plugin — the model adapter, the tool registry, the sandbox and the agent loop itself are all swappable.Open sourceYes
OpenAI Agents SDKLightweight loop with handoffs, guardrails and sessions.Open sourceNo
Codex CLIOpenAI's terminal coding agent.Open sourceNo
OpenCodeOpen-source terminal coding agent, provider-agnostic.Open sourceYes
GooseBlock's open-source on-machine agent with an extension system.Open sourceYes
LettaStateful agent server where memory is the primary abstraction.Open sourceYes
Roll your own loopNo harness. A while-loop, a model call and your own tool dispatch.Open sourceYes
· Stacks that use it/ 4
· For agents/ This page, machine-readable

Every page here answers to Accept: text/markdown and returns the same content at roughly a tenth the tokens. No separate site, no toggle — same URL.

curl -s -H "Accept: text/markdown" https://newagent.build/c/claude-agent-sdk