PHPackages                             papi-ai/anthropic - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [API Development](/categories/api)
4. /
5. papi-ai/anthropic

ActiveLibrary[API Development](/categories/api)

papi-ai/anthropic
=================

Anthropic Claude provider for PapiAI

v0.9.1(2mo ago)06MITPHPPHP ^8.2CI passing

Since Mar 7Pushed 1mo agoCompare

[ Source](https://github.com/papi-ai/anthropic)[ Packagist](https://packagist.org/packages/papi-ai/anthropic)[ RSS](/packages/papi-ai-anthropic/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (5)Dependencies (4)Versions (6)Used By (0)

PapiAI Anthropic Provider
=========================

[](#papiai-anthropic-provider)

[![CI](https://github.com/papi-ai/anthropic/workflows/CI/badge.svg)](https://github.com/papi-ai/anthropic/actions?query=workflow%3ACI) [![Latest Version](https://camo.githubusercontent.com/6230ac7391bce5885fa5399ad1d4a3948565d79815415ebbc4f863edd6310f3a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706170692d61692f616e7468726f7069632e737667)](https://packagist.org/packages/papi-ai/anthropic) [![Total Downloads](https://camo.githubusercontent.com/c10653f5e18f74bc656529dd923f02ee664ada5f0aeeae91cd8e4b4e639ad637/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706170692d61692f616e7468726f7069632e737667)](https://packagist.org/packages/papi-ai/anthropic) [![PHP Version](https://camo.githubusercontent.com/096b0d4cb3961ed4a750f4361b96a7e132423df995e4a2f88e57a4f42bf52a9a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706170692d61692f616e7468726f7069632e737667)](https://packagist.org/packages/papi-ai/anthropic) [![License](https://camo.githubusercontent.com/bed38bc7c01e7648634b2ba46980289d155946b7e341fbc501a26174919f5e34/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706170692d61692f616e7468726f7069632e737667)](https://packagist.org/packages/papi-ai/anthropic)

Anthropic Claude provider for [PapiAI](https://github.com/papi-ai/papi-core) - A simple but powerful PHP library for building AI agents.

Installation
------------

[](#installation)

```
composer require papi-ai/anthropic
```

Usage
-----

[](#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
----------------

[](#available-models)

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

Features
--------

[](#features)

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

License
-------

[](#license)

MIT

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance88

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

5

Last Release

62d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/126c34b4dff8d42336ea07ac5297bcc3ec0a0e306fd964a7497f02240da4b142?d=identicon)[md](/maintainers/md)

---

Top Contributors

[![MarcelloDuarte](https://avatars.githubusercontent.com/u/144535?v=4)](https://github.com/MarcelloDuarte "MarcelloDuarte (14 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/papi-ai-anthropic/health.svg)

```
[![Health](https://phpackages.com/badges/papi-ai-anthropic/health.svg)](https://phpackages.com/packages/papi-ai-anthropic)
```

###  Alternatives

[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M270](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/common-protos

Google API Common Protos for PHP

173103.7M49](/packages/google-common-protos)[hubspot/api-client

Hubspot API client

23414.2M16](/packages/hubspot-api-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
