PHPackages                             oneofftech/librarian-client - 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. oneofftech/librarian-client

ActiveLibrary

oneofftech/librarian-client
===========================

OneOffTech Librarian AI service client.

0100[2 PRs](https://github.com/OneOffTech/librarian-client/pulls)PHPCI passing

Since Oct 27Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/OneOffTech/librarian-client)[ Packagist](https://packagist.org/packages/oneofftech/librarian-client)[ RSS](/packages/oneofftech-librarian-client/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (4)Used By (0)

OneOffTech Librarian Client
===========================

[](#oneofftech-librarian-client)

[![Latest Version on Packagist](https://camo.githubusercontent.com/01be0dc56d8a2ccc6189629c516e5e3e5411a548128d7682bb6c21b48d4ad7de/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f6e656f6666746563682f6c696272617269616e2d636c69656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/oneofftech/librarian-client)[![Tests](https://github.com/OneOffTech/librarian-client/actions/workflows/run-tests.yml/badge.svg)](https://github.com/OneOffTech/librarian-client/actions/workflows/run-tests.yml)

Allow to interact with OneOffTech Librarian, an AI-enhanced knowledge [search and synthesis](https://oneofftech.xyz/blog/introducing-the-knowledge-management-framework/) agent for your organization's memories.

OneOffTech Librarian provides:

- Enterprise search, retrieve your organization's knowledge via search or chat
- Chat-based question and answer over multiple documents
- Summarization of documents in different languages
- Classification using existing machine learning models
- Extract information in a structured manner using LLMs, usefull for comparative analysis.

Important

The Librarian client package is a work in progress. Expect API changes between releases.

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

[](#installation)

You can install the package via Composer:

```
composer require oneofftech/librarian-client
```

*Requirements*

- PHP 8.2+

Usage
-----

[](#usage)

The `LibrarianConnector` is the main entry point for interacting with the OneOffTech Librarian AI service.

To create an instance of the `LibrarianConnector`, you need to provide an authentication token and the base URL of the API. OneOffTech Librarian acts on a library, all or a subset of your organization's documents. Some of the features require a library identifier to perform actions on a specific set of documents. The library identifier is provided by OneOffTech during the configuration phase.

```
use OneOffTech\LibrarianClient\Connectors\LibrarianConnector;

$token = 'your-authentication-token';
$baseUrl = 'your-instance-url';

$connector = new LibrarianConnector($token, $baseUrl);
```

### Managing Documents

[](#managing-documents)

**List All Documents in a Library**

```
$documents = $connector->documents('library-id')->all();

foreach ($documents->items as $document) {
    echo $document->id . ': ' . $document->title . PHP_EOL;
}
```

**Get a Specific Document**

```
$document = $connector->documents('library-id')->get('document-id');
echo $document->title;
```

**Create a New Document**

```
use OneOffTech\LibrarianClient\Dto\Document;
use OneOffTech\Parse\Client\DocumentFormat\DocumentNode;

$document = new Document(
    id: 'new-document-id',
    title: 'New Document',
    data: DocumentNode::fromString('Document content')->toArray(),
);

$response = $connector->documents('library-id')->create($document);

echo $response->status();
```

Use our [Parxy](https://github.com/OneOffTech/parse-client) service to get the document content.

**Delete a Document**

```
$response = $connector->documents('library-id')->delete('document-id');
echo $response->status();
```

### Text and Document Classification

[](#text-and-document-classification)

*to be documented*

### Summaries

[](#summaries)

*to be documented*

### Questions

[](#questions)

*to be documented*

### Structured extraction

[](#structured-extraction)

*to be documented*

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Thank you for considering contributing to the Librarian client! The contribution guide can be found in the [CONTRIBUTING.md](./.github/CONTRIBUTING.md) file.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](./.github/SECURITY.md) on how to report security vulnerabilities.

Supporters
----------

[](#supporters)

The project is provided and supported by [OneOff-Tech (UG)](https://oneofftech.de).

[![](https://raw.githubusercontent.com/OneOffTech/.github/main/art/oneofftech-logo.svg)](https://oneofftech.de)

Credits
-------

[](#credits)

- [Alessio Vertemati](https://github.com/avvertix)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance59

Moderate activity, may be stable

Popularity9

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity17

Early-stage or recently created project

 Bus Factor1

Top contributor holds 53.8% 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/25452415?v=4)[OneOffTech](/maintainers/OneOffAdmins)[@OneOffAdmins](https://github.com/OneOffAdmins)

---

Top Contributors

[![avvertix](https://avatars.githubusercontent.com/u/5672748?v=4)](https://github.com/avvertix "avvertix (21 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (12 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (6 commits)")

### Embed Badge

![Health badge](/badges/oneofftech-librarian-client/health.svg)

```
[![Health](https://phpackages.com/badges/oneofftech-librarian-client/health.svg)](https://phpackages.com/packages/oneofftech-librarian-client)
```

PHPackages © 2026

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