Claude Agent SDK: Your App Around the Claude Code Loop

Claude Agent SDK: Your App Around the Claude Code Loop An architecture diagram generated by Archify. Your users · web, chat, CI · Architecture component Your users web, chat, CI Your application · HTTP or job runner · Architecture component Your application HTTP or job runner Your callbacks · hooks, canUseTool · Architecture component Your callbacks hooks, canUseTool Agent SDK · Python or TypeScript · Architecture component Agent SDK Python or TypeScript claude subprocess · loop, tools, sessions · Architecture component claude subprocess loop, tools, sessions Claude API · or Bedrock, Vertex · Architecture component Claude API or Bedrock, Vertex Container disk · cwd, transcripts · Architecture component Container disk cwd, transcripts MCP servers · in-process or remote · Architecture component MCP servers in-process or remote task query() asks stdio HTTPS tools MCP Legend Frontend Backend Database Cloud Security External

Same loop as the CLI

  • • Tools, permissions, sessions, hooks, sub-agents

Sandbox it

  • • Run each agent in a container with scoped network

API key auth

  • • Products can't offer claude.ai login without approval
© 2026 Samir Kumar Sahoo. All rights reserved.