Skip to content

papi-ai/anthropic

Repository files navigation

PapiAI Anthropic Provider

CI Latest Version Total Downloads PHP Version License

Anthropic Claude provider for PapiAI - A simple but powerful PHP library for building AI agents.

Installation

composer require papi-ai/anthropic

Usage

use PapiAI\Core\Agent;
use PapiAI\Anthropic\AnthropicProvider;

$provider = new AnthropicProvider(
    apiKey: $_ENV['ANTHROPIC_API_KEY'],
);

$agent = new Agent(
    provider: $provider,
    model: 'claude-sonnet-4-20250514',
    instructions: 'You are a helpful assistant.',
);

$response = $agent->run('Hello!');
echo $response->text;

Available Models

  • claude-sonnet-4-20250514 (default)
  • claude-3-opus-20240229
  • claude-3-sonnet-20240229
  • claude-3-haiku-20240307

Features

  • Tool/function calling
  • Vision/multimodal support
  • Streaming support

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors