awesome-opensource icon indicating copy to clipboard operation
awesome-opensource copied to clipboard

Add Claude (Anthropic) as a provider

Open thunder-velvet opened this issue 6 months ago • 1 comments

Overview

This issue proposes adding Anthropic's Claude models as a new AI provider in AgentHeroes.

Why Claude?

Claude offers several competitive advantages that would benefit our users:

  • State-of-the-art language model capabilities, particularly with Claude 3 Opus and Sonnet
  • Longer context windows (up to 200k tokens)
  • Strong reasoning and coding capabilities
  • Different pricing model than OpenAI (potentially more cost-effective for certain use cases)
  • Diversifies our AI provider options, giving users more choices

Implementation

Similar to how we've implemented the OpenAI provider, we would need to:

  1. Add CLAUDE to the GenerationIdentifiers enum
  2. Create a new claude.provider.ts file implementing the GenerationBase class
  3. Support Claude's main models (Claude 3 Opus, Claude 3 Sonnet, Claude 3 Haiku)
  4. Add Claude to the providersList in providers.list.ts

API Details

Claude can be accessed through Anthropic's API:

  • API Documentation: https://docs.anthropic.com/claude/reference/
  • It uses a similar REST-based API structure to OpenAI
  • Would require users to supply their own Anthropic API key

Dependencies

We would need to add the Anthropic SDK to our project:

@anthropic-ai/sdk

Questions

  • Should we support Claude's vision capabilities?
  • Do we want to enable the tool use features?
  • Should we add support for Claude's system prompt feature?

Let me know your thoughts on prioritizing this feature!

thunder-velvet avatar Apr 10 '25 05:04 thunder-velvet