PHPackages                             wishborn/laravel-cognee - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. wishborn/laravel-cognee

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

wishborn/laravel-cognee
=======================

Laravel wrapper for the Cognee PHP SDK - Transform raw data into persistent AI memory

v0.1.2(1w ago)030MITPHPPHP ^8.2

Since Jan 16Pushed 1w agoCompare

[ Source](https://github.com/wishborn/laravel-cognee)[ Packagist](https://packagist.org/packages/wishborn/laravel-cognee)[ RSS](/packages/wishborn-laravel-cognee/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (10)Versions (4)Used By (0)

Laravel Cognee
==============

[](#laravel-cognee)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4fc216e3829c89fa61a84b4e89ec1bc3b4d86c5dfaf00a9dbf4a3f7397f3df11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77697368626f726e2f6c61726176656c2d636f676e65652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wishborn/laravel-cognee)[![Total Downloads](https://camo.githubusercontent.com/a09bae4ca1f8b878614f089531ccf7a8fee66937423f33b7ef825a3aca89fe11/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77697368626f726e2f6c61726176656c2d636f676e65652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wishborn/laravel-cognee)[![License](https://camo.githubusercontent.com/8009bc04abb8b9af95074cd4f7f8e78895d718ecf5815de93914778b5c7f8db0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77697368626f726e2f6c61726176656c2d636f676e65652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wishborn/laravel-cognee)

A Laravel wrapper for the [Alt PHP Cognee SDK](https://github.com/wishborn/alt-php-cognee-sdk) - Transform raw data into persistent AI memory for your Laravel applications.

Requirements
------------

[](#requirements)

- PHP 8.2 or higher
- Laravel 11.x or 12.x
- A running Cognee instance

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

[](#installation)

Install the package via Composer:

```
composer require wishborn/laravel-cognee
```

The package will automatically register its service provider and facade.

### Publish Configuration

[](#publish-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=cognee-config
```

This will create a `config/cognee.php` file in your application.

Configuration
-------------

[](#configuration)

Add the following environment variables to your `.env` file:

```
COGNEE_BASE_URL=http://localhost:8000
COGNEE_API_KEY=your-api-key
COGNEE_TIMEOUT=30
COGNEE_RETRY_ATTEMPTS=3
```

Usage
-----

[](#usage)

### Using the Facade

[](#using-the-facade)

```
use Wishborn\Cognee\Facades\Cognee;

// Create a dataset
$dataset = Cognee::datasets()->create('my-dataset');

// Add data to a dataset
Cognee::datasets()->add(new AddDataRequest(
    data: 'Your text content here',
    datasetId: $dataset->id,
));

// Cognify (process into knowledge graph)
Cognee::datasets()->cognify(new CognifyRequest(
    datasetIds: [$dataset->id],
));

// Search the knowledge graph
$results = Cognee::search()->search(new SearchRequest(
    query: 'your search query',
    searchType: SearchType::CHUNKS,
    datasetIds: [$dataset->id],
));
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use Wishborn\Cognee\CogneeManager;

class MyController extends Controller
{
    public function __construct(
        protected CogneeManager $cognee
    ) {}

    public function search(Request $request)
    {
        $results = $this->cognee->search()->search(
            new SearchRequest(
                query: $request->input('query'),
                searchType: SearchType::CHUNKS,
            )
        );

        return response()->json($results);
    }
}
```

### Accessing the SDK Client Directly

[](#accessing-the-sdk-client-directly)

For advanced operations not covered by the wrapper methods:

```
$client = Cognee::client();

// Use any SDK method directly
$auth = $client->auth();
$permissions = $client->permissions();
```

Available Methods
-----------------

[](#available-methods)

### Datasets

[](#datasets)

- `Cognee::datasets()->create($name, $metadata)` - Create a new dataset
- `Cognee::datasets()->list()` - List all datasets
- `Cognee::datasets()->get($id)` - Get a specific dataset
- `Cognee::datasets()->delete($id)` - Delete a dataset
- `Cognee::datasets()->add($request)` - Add data to a dataset
- `Cognee::datasets()->cognify($request)` - Process data into knowledge graph
- `Cognee::datasets()->getGraph($id)` - Get dataset graph
- `Cognee::datasets()->getStatus($id)` - Get dataset processing status

### Search

[](#search)

- `Cognee::search()->search($request)` - Search the knowledge graph
- `Cognee::search()->history()` - Get search history

### Health

[](#health)

- `Cognee::health()->check()` - Basic health check
- `Cognee::health()->detailed()` - Detailed health check

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Wishborn](https://github.com/wishborn)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance98

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity39

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

Total

3

Last Release

9d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/461446?v=4)[Wish Born](/maintainers/wishborn)[@wishborn](https://github.com/wishborn)

---

Top Contributors

[![wishborn](https://avatars.githubusercontent.com/u/461446?v=4)](https://github.com/wishborn "wishborn (6 commits)")

---

Tags

laravelsdkaimemoryknowledge-graphcognee

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/wishborn-laravel-cognee/health.svg)

```
[![Health](https://phpackages.com/badges/wishborn-laravel-cognee/health.svg)](https://phpackages.com/packages/wishborn-laravel-cognee)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[mohamed-ashraf-elsaed/claude-agent-sdk-laravel

Anthropic Claude Agent SDK for PHP &amp; Laravel — build AI agents with tool use, sandboxing, MCP servers, subagents, hooks, and structured output via the Claude Code CLI

171.1k](/packages/mohamed-ashraf-elsaed-claude-agent-sdk-laravel)

PHPackages © 2026

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