claude-agent-sdk

claude-agent-sdk is an agent for coding agents from marcinbunsch/overseer. It costs 0 tokens per session (4,769 once invoked), scanned C, original, MIT.

A software library for building AI agents with Claude Code's tools and agent loop in Python or TypeScript. It lets an application send tasks to an agent and receive its messages programmatically.

In plain words
What is it for?
Use it to create production agents that read and edit files, run shell commands, respond to prompts, and use Anthropic models through supported cloud providers.
Why use it?
It lets developers embed Claude Code-style coding agents in their own applications instead of using the assistant only as a standalone tool.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/marcinbunsch/overseer/claude-agent-sdk
Clone the repo
git clone --depth 1 https://github.com/marcinbunsch/overseer

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for claude-agent-sdk

README.md
[![agentmods](https://agentmods.dev/badge/agents/marcinbunsch/overseer/claude-agent-sdk.svg)](https://agentmods.dev/agents/marcinbunsch/overseer/claude-agent-sdk)
Your own site
<a href="https://agentmods.dev/agents/marcinbunsch/overseer/claude-agent-sdk"><img src="https://agentmods.dev/badge/agents/marcinbunsch/overseer/claude-agent-sdk.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 4,769 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5.1 $0.00000 $0.04769
Opus 5 $0.00000 $0.02384
Sonnet 5 $0.00000 $0.00954
Haiku 4.5 $0.00000 $0.00477

Measured 5d ago against content hash 55ec2a08b639, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-05, from the pricing page.

Security

Grade C, and why

claude-agent-sdk scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 5d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Downloads and executes remote codehighSupply chain

curl | sh runs whatever the server returns today, which is not necessarily what it returned when this was reviewed.

curl -fsSL https://claude.ai/install.sh | bash

Makes network callslowCapability

Not a fault in itself. Listed so you know the mod talks to something, and to what.

curl -fsSL https://claude.ai/install.sh | bash
docs/agents/claude-agent-sdk.md · 553 lines

How it starts

The opening of the file, as written. The whole thing — 553 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Claude Agent SDK

Build production AI agents with Claude Code as a library. The Agent SDK gives you the same tools, agent loop, and context management that power Claude Code, programmable in Python and TypeScript.

Source: https://platform.claude.com/docs/en/agent-sdk/overview

Quick Start

Installation

# Install Claude Code runtime
curl -fsSL https://claude.ai/install.sh | bash

# Install SDK
npm install @anthropic-ai/claude-agent-sdk   # TypeScript
pip install claude-agent-sdk                  # Python

Authentication

export ANTHROPIC_API_KEY=your-api-key

Also supports:

  • Amazon Bedrock: CLAUDE_CODE_USE_BEDROCK=1 + AWS credentials
  • Google Vertex AI: CLAUDE_CODE_USE_VERTEX=1 + GCP credentials
  • Microsoft Foundry: CLAUDE_CODE_USE_FOUNDRY=1 + Azure credentials

Minimal Example

import { query } from "@anthropic-ai/claude-agent-sdk";

for await (const message of query({
  prompt: "Find and fix the bug in auth.py",
  options: { allowedTools: ["Read", "Edit", "Bash"] }
})) {
  console.log(message);
}
import asyncio
from claude_agent_sdk import query, ClaudeAgentOptions

async def main():
    async for message in query(
        prompt="Find and fix the bug in auth.py",
        options=ClaudeAgentOptions(allowed_tools=["Read", "Edit", "Bash"])
    ):
        print(message)

asyncio.run(main())

Built-in Tools

Tool What it does
Read Read any file in the working directory
Write Create new files
Edit Make precise edits to existing files
Bash Run terminal commands, scripts, git operations
Glob Find files by pattern (**/*.ts, src/**/*.py)
Grep Search file contents with regex
WebSearch Search the web for current information
WebFetch Fetch and parse web page content
AskUserQuestion Ask the user clarifying questions with multiple choice options
Task Spawn subagents for focused subtasks
TodoWrite Create and manage structured task lists
NotebookEdit Edit Jupyter notebook cells

Read the full file on GitHub · 553 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 5d ago First seen · 553 lines · 0 tokens per session scan C 55ec2a08b639

Subscribe to this mod's changes

claude-agent-sdk is an agent published in the GitHub repository marcinbunsch/overseer (11 stars, last pushed 2d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 4,769 tokens. A static security scan graded it C with 2 findings (downloads and executes remote code, makes network calls). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.