PHPackages                             papi-ai/cohere - 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. papi-ai/cohere

ActiveLibrary

papi-ai/cohere
==============

Cohere provider for PapiAI

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

Since Mar 8Pushed 1mo agoCompare

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

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

PapiAI Cohere Provider
======================

[](#papiai-cohere-provider)

[![CI](https://github.com/papi-ai/cohere/workflows/CI/badge.svg)](https://github.com/papi-ai/cohere/actions?query=workflow%3ACI) [![Latest Version](https://camo.githubusercontent.com/b44f0bf2db9c5a7d8de8749c006c6dcf2dd54555921c7613eef08d21a55d37b0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f706170692d61692f636f686572652e737667)](https://packagist.org/packages/papi-ai/cohere) [![Total Downloads](https://camo.githubusercontent.com/809dcdbe54d29ab4e6c6c05053d9c8bb94f78aa6e308f9f1feb295177e3520fc/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f706170692d61692f636f686572652e737667)](https://packagist.org/packages/papi-ai/cohere) [![PHP Version](https://camo.githubusercontent.com/652e17d12b40bcd686426e202fa82f2004573d2709d8bd0f7ac77936c7f19c2e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f706170692d61692f636f686572652e737667)](https://packagist.org/packages/papi-ai/cohere) [![License](https://camo.githubusercontent.com/43185e17fb4c1a91c53b7b879cc55ebe8bbfcdc03fd97051304a9c3c35f0dff2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f706170692d61692f636f686572652e737667)](https://packagist.org/packages/papi-ai/cohere)

Cohere 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/cohere
```

Usage
-----

[](#usage)

```
use PapiAI\Core\Agent;
use PapiAI\Cohere\CohereProvider;

$provider = new CohereProvider(
    apiKey: $_ENV['COHERE_API_KEY'],
);

$agent = new Agent(
    provider: $provider,
    instructions: 'You are a helpful assistant.',
);

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

Available Models
----------------

[](#available-models)

### Chat Models

[](#chat-models)

```
CohereProvider::MODEL_COMMAND_R_PLUS  // 'command-r-plus' (default)
CohereProvider::MODEL_COMMAND_R       // 'command-r'
CohereProvider::MODEL_COMMAND         // 'command'
```

### Embedding Models

[](#embedding-models)

```
CohereProvider::MODEL_EMBED_ENGLISH       // 'embed-english-v3.0'
CohereProvider::MODEL_EMBED_MULTILINGUAL  // 'embed-multilingual-v3.0'
```

Features
--------

[](#features)

- Chat completions via Cohere v2 API
- Tool/function calling
- Streaming support
- Text embeddings

License
-------

[](#license)

MIT

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance88

Actively maintained with recent releases

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 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 ~2 days

Total

2

Last Release

60d 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 (6 commits)")

###  Code Quality

TestsPest

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

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

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

PHPackages © 2026

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