AnswerDotAI/claudette

Claudette is Claude's friend

What it solves

Claudette reduces the boilerplate and manual effort required when using Anthropic's Python SDK. While the official SDK is low-level, Claudette provides a high-level wrapper that automates repetitive tasks and simplifies common workflows for developers interacting with Claude models.

How it works

It acts as an ergonomic layer over the Anthropic Python SDK, offering several specialized utilities:

  • Stateful Dialogs: The Chat class manages conversation history automatically.
  • Simplified Tool Use: It uses "docments" (type annotations and inline comments) to define tools as plain Python functions, removing the need to write manual JSON schemas. It also automates the execution of tool calls and supports a toolloop for multi-step problem solving.
  • Prompt Caching: Simplifies the addition of cache control headers via mk_msg(msg, cache=True) to reduce token costs for large contexts.
  • Flexible Integration: Supports multiple providers including Anthropic directly, AWS Bedrock, and Google Vertex.

Who it’s for

Developers who want a more convenient, high-level interface for building applications with Claude without losing full control over the underlying API.

Highlights

  • Stateful Chat: Built-in Chat and AsyncChat classes for easier multi-turn conversations.
  • Automated Tooling: Automatic tool call handling and structured output extraction.
  • Prefill Support: Ability to specify the first few words of Claude's response.
  • Literate Programming: The project is written as a rendered Jupyter Notebook, making the source code a tutorial that explains the "how" and "why" of the implementation.

Related