npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crewai-ts/anthropic

v0.3.0

Published

Anthropic native provider for CrewAI TypeScript.

Readme

@crewai-ts/anthropic

npm version

Anthropic native provider for CrewAI TypeScript.

Provides AnthropicCompletion with full support for Claude models, including tool use, thinking mode, structured outputs, file uploads, and the Anthropic tool-search beta.

Install

npm install @crewai-ts/anthropic

Requirements:

  • Node.js 22 or later
  • @crewai-ts/core 0.2.0 or later

Quick Start

import { Agent } from "@crewai-ts/core";
import { AnthropicCompletion, registerAnthropicProvider } from "@crewai-ts/anthropic";

registerAnthropicProvider();

const agent = new Agent({
  role: "Writer",
  goal: "Write concise prose",
  backstory: "A careful wordsmith.",
  llm: new AnthropicCompletion({ model: "claude-sonnet-4-5" }),
});

Or use the registered provider name:

const agent = new Agent({
  role: "Writer",
  goal: "Write concise prose",
  backstory: "A careful wordsmith.",
  llm: "anthropic/claude-sonnet-4-5",
});

Current Models and Thinking

Supported current models include claude-fable-5-1, claude-opus-5, claude-sonnet-5, and claude-haiku-4-5. The core catalog also includes Claude Opus 4.6–4.8 and Sonnet 4.6. Current Fable, Opus 5, and Sonnet 5 have 1M-token context windows; Haiku 4.5 has 200K. The existing 85% context safety margin and default model choices are unchanged.

Use adaptive thinking on current Opus, Sonnet, and Fable models:

const llm = new AnthropicCompletion({
  model: "claude-opus-5",
  maxTokens: 16000,
  thinking: { type: "adaptive" },
  effort: "high",
});

effort (also reasoningEffort / reasoning_effort) is sent as output_config.effort. These options and thinking are preserved through createLLM() too. Fable 5.1 uses always-on adaptive thinking and cannot disable thinking or force a particular tool.

Manual thinking remains available on compatible older models, including Haiku 4.5 and the deprecated manual mode on Opus/Sonnet 4.6:

import { AnthropicThinkingConfig } from "@crewai-ts/anthropic";

const llm = new AnthropicCompletion({
  model: "claude-haiku-4-5",
  maxTokens: 32768,
  thinking: new AnthropicThinkingConfig({ type: "enabled", budgetTokens: 16000 }),
});

Manual thinking is rejected on Opus 4.7 and later and Sonnet 5. Sampling parameters remain available on 4.6; unsupported sampling settings are omitted on the newer models.

Structured Outputs

On supported models, responseFormat / response_format schema providers (with schema, modelJsonSchema(), or model_json_schema()) use native output_config.format. The provider returns the parsed JSON object and reports malformed JSON instead of silently returning unstructured text. Older models without native support retain the structured-output tool path.

See the official model catalog, thinking guide, and structured output guide.

Tool Search

Use the Anthropic tool-search beta:

import { AnthropicToolSearchConfig } from "@crewai-ts/anthropic";

const llm = new AnthropicCompletion({
  model: "claude-sonnet-4-5",
  toolSearch: new AnthropicToolSearchConfig({ type: "bm25" }),
});

Exports

  • AnthropicCompletion — main LLM provider class
  • AnthropicThinkingConfig — thinking mode configuration
  • AnthropicToolSearchConfig — tool search configuration
  • registerAnthropicProvider — register the provider with the core runtime
  • Model constants: NATIVE_STRUCTURED_OUTPUT_MODELS, TOOL_SEARCH_TOOL_TYPES, ANTHROPIC_FILES_API_BETA, ANTHROPIC_STRUCTURED_OUTPUTS_BETA

License

MIT