papi-ai/anthropic

Anthropic Claude provider for PapiAI

Maintainers

Package info

github.com/papi-ai/anthropic

pkg:composer/papi-ai/anthropic

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v0.9.1 2026-03-08 18:13 UTC

This package is not auto-updated.

Last update: 2026-03-10 18:25:01 UTC


README

Tests

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