Comprehensive reference for the TypeScript Agent SDK with functions, types, and interfaces for programmatic Claude Code interactions
Detected risks:
The TypeScript SDK Reference is a comprehensive guide for building applications using the Anthropic Agent SDK in TypeScript, enabling seamless interactions with Claude Code and custom tool integrations. This SDK empowers developers to leverage Claude's advanced capabilities for programmatic queries, multi-turn conversations, and tool integration in Node.js environments. It provides a robust framework for creating custom tools and servers, facilitating easy interaction between Claude Code and user-defined tools through the use of type-safe APIs and schemas.
You can install the SDK by running `npm install @anthropic-ai/claude-agent-sdk`.
The core functions of the SDK include `query()` for Claude Code interactions, `tool()` for defining custom tools, and `createSdkMcpServer()` for hosting in-process MCP servers.
Yes, the `tool()` function allows you to define custom tools using Zod schemas and integrate them into your application.
The SDK offers essential configuration options like `allowedTools`, `model`, and `abortController`, as well as advanced options like `systemPrompt`, `agents`, and `mcpServers`.
The SDK allows you to restrict or block specific tools via the `allowedTools` and `disallowedTools` options, giving you control over the tools used during interactions.
Quick Setup:
.claude/skills/Repository
CaptainCrouton89/.claude