Claude Agent SDK C++ (github.com)

🤖 AI Summary
Anthropic’s Claude Agent SDK has been ported to modern C++17 and released as a production‑ready library (v0.1.6) for interacting with the Claude Code CLI. The SDK provides a simple one‑shot query() API and a full ClaudeClient for multi‑turn, bidirectional conversations with control‑protocol support (interrupts, modes, dynamic model switching). It mirrors the Python SDK’s semantics and ergonomics, making it straightforward for C++ teams to adopt existing agent patterns, MCP templates, and tooling workflows while retaining parity with the canonical Python implementation. Technically, the library is type‑safe C++17, cross‑platform (Windows/Linux/macOS), integrates via CMake and vcpkg, and requires Claude Code CLI >= 2.0.0. Key features include a hook system (PreToolUse/PostToolUse/UserPromptSubmit), tool permission callbacks with rich suggestion support, custom agent configs, working‑directory file operations, and an MCP template API for Python‑style tool definitions. It discovers the CLI by explicit path, environment variable, or PATH and lets you pin a binary. Build/test requirements: CMake 3.20+, MSVC 19.14+/GCC 7+/Clang 5+, and the repo ships 117/117 passing unit and integration tests. Licensed MIT, the SDK lowers the barrier for native C++ applications and systems to embed Claude agents with fine‑grained control and observability.
Loading comments...
loading comments...