PHPackages                             echointel/laravel-sdk - 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. echointel/laravel-sdk

ActiveLibrary[API Development](/categories/api)

echointel/laravel-sdk
=====================

Laravel SDK for EchoIntel AI API - Forecasting, customer segmentation, inventory optimization, and more

v2.0.0(3mo ago)1188proprietaryPHPPHP ^8.1

Since Dec 25Pushed 3mo agoCompare

[ Source](https://github.com/EchoSistema/echointel-laravel-sdk)[ Packagist](https://packagist.org/packages/echointel/laravel-sdk)[ Docs](https://github.com/EchoSistema/echointel-laravel-sdk)[ RSS](/packages/echointel-laravel-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (3)Used By (0)

EchoIntel Laravel SDK
=====================

[](#echointel-laravel-sdk)

[![Packagist Version](https://camo.githubusercontent.com/3645fdd92b11df6df04f1009d82d6c27485538523b61867e0eff451489e4ff6f/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6563686f696e74656c2f6c61726176656c2d73646b)](https://packagist.org/packages/echointel/laravel-sdk)[![Packagist Downloads](https://camo.githubusercontent.com/a5341ef8ad1ea5b6bc4e8ccd3f0872b2c64a2fe5afab147def91f741ce81ec86/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6563686f696e74656c2f6c61726176656c2d73646b)](https://packagist.org/packages/echointel/laravel-sdk)[![PHP Version](https://camo.githubusercontent.com/ccecdeb55bd797a7ec027fe832b2afe3e1856f7a325d62b3f38182ba25ab2a33/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6563686f696e74656c2f6c61726176656c2d73646b)](https://packagist.org/packages/echointel/laravel-sdk)[![Laravel Version](https://camo.githubusercontent.com/7dca8b1cdf581438021b806542ff584f485c97d2afe671c0cf4c3f851b370817/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d31302e7825323025374325323031312e7825323025374325323031322e782d726564)](https://laravel.com)[![License](https://camo.githubusercontent.com/15379ffe4e8d2918decfb7cb0be72c1b5e79cd4de566819393b0e1b738b09e1c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d50726f70726965746172792d626c7565)](LICENSE)

Laravel SDK for the EchoIntel AI API -- forecasting, customer segmentation, inventory optimization, anomaly detection, credit risk, NLP, and more.

**Packagist:**

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

[](#requirements)

- PHP 8.1+
- Laravel 10.x, 11.x, or 12.x
- Composer

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

[](#installation)

```
composer require echointel/laravel-sdk
```

The service provider and facade are registered automatically via Laravel auto-discovery.

### Publish Configuration

[](#publish-configuration)

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

### Environment Variables

[](#environment-variables)

Add the following to your `.env` file:

```
ECHOINTEL_CUSTOMER_API_ID=your-customer-api-id
ECHOINTEL_SECRET=your-secret-key
```

#### Sandbox / Production

[](#sandbox--production)

The SDK defaults to **sandbox mode** when `ECHOINTEL_SANDBOX` is absent.

```
# Sandbox (default) - https://ai.echosistema.dev
ECHOINTEL_SANDBOX=true

# Production - https://ai.echosistema.live
ECHOINTEL_SANDBOX=false
```

You can also override the URLs directly:

```
ECHOINTEL_API_URL=https://ai.echosistema.live
ECHOINTEL_SANDBOX_API_URL=https://ai.echosistema.dev
```

#### Optional

[](#optional)

```
ECHOINTEL_ADMIN_SECRET=your-admin-secret
ECHOINTEL_TIMEOUT=30
```

Quick Start
-----------

[](#quick-start)

### Using the Facade

[](#using-the-facade)

```
use EchoIntel\Facades\EchoIntel;

// Health check
$health = EchoIntel::health();

// Forecast revenue
$result = EchoIntel::forecastRevenue([
    'forecast_period' => 12,
    'data' => [
        ['date' => '2024-01-01', 'revenue' => 10000],
        ['date' => '2024-02-01', 'revenue' => 12000],
    ],
]);

// Customer segmentation
$segments = EchoIntel::customerSegmentation([
    'data' => $customerRecords,
    'max_clusters' => 5,
]);
```

### Using Dependency Injection

[](#using-dependency-injection)

```
use EchoIntel\EchoIntelClient;

class ForecastController extends Controller
{
    public function __construct(
        private EchoIntelClient $echointel
    ) {}

    public function revenue(Request $request)
    {
        $result = $this->echointel->forecastRevenue([
            'forecast_period' => $request->period,
            'data' => $request->data,
        ]);

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

### Using the Helper

[](#using-the-helper)

```
$result = echointel()->forecastRevenue($data);
```

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

[](#available-methods)

### System

[](#system)

MethodEndpoint`health()``GET /health`### Forecasting

[](#forecasting)

MethodEndpoint`forecastRevenue(array $data)``POST /api/forecast-revenue``forecastCost(array $data)``POST /api/forecast-cost``forecastCostImproved(array $data)``POST /api/forecast-cost-improved``forecastUnits(array $data)``POST /api/forecast-units``forecastCostTotus(array $data)``POST /api/forecast-cost-totus`### Inventory

[](#inventory)

MethodEndpoint`inventoryOptimization(array $data)``POST /api/inventory-optimization``inventoryHistoryImproved(array $data)``POST /api/inventory-history-improved`### Customer Analytics

[](#customer-analytics)

MethodEndpoint`customerSegmentation(array $data)``POST /api/customer-segmentation``customerFeatures(array $data)``POST /api/customer-features``customerLoyalty(array $data)``POST /api/customer-loyalty``customerRfm(array $data)``POST /api/customer-rfm``customerClvFeatures(array $data)``POST /api/customer-clv-features``customerClvForecast(array $data)``POST /api/customer-clv-forecast`### Churn Analysis

[](#churn-analysis)

MethodEndpoint`churnRisk(array $data)``POST /api/churn-risk``churnLabel(array $data)``POST /api/churn-label`### NPS

[](#nps)

MethodEndpoint`nps(array $data)``POST /api/nps`### Propensity Modeling

[](#propensity-modeling)

MethodEndpoint`propensityBuyProduct(array $data)``POST /api/propensity-buy-product``propensityRespondCampaign(array $data)``POST /api/propensity-respond-campaign``propensityUpgradePlan(array $data)``POST /api/propensity-upgrade-plan`### Recommendations

[](#recommendations)

MethodEndpoint`recommendUserItems(array $data)``POST /api/recommend-user-items``recommendSimilarItems(array $data)``POST /api/recommend-similar-items`### Cross-Sell &amp; Upsell

[](#cross-sell--upsell)

MethodEndpoint`crossSellMatrix(array $data)``POST /api/cross-sell-matrix``upsellSuggestions(array $data)``POST /api/upsell-suggestions`### Dynamic Pricing

[](#dynamic-pricing)

MethodEndpoint`dynamicPricingRecommend(array $data)``POST /api/dynamic-pricing-recommend`### Sentiment Analysis

[](#sentiment-analysis)

MethodEndpoint`sentimentReport(array $data)``POST /api/sentiment-report``sentimentRealtime(array $data)``POST /api/sentiment-realtime`### Anomaly Detection

[](#anomaly-detection)

MethodEndpoint`anomalyTransactions(array $data)``POST /api/anomaly-transactions``anomalyAccounts(array $data)``POST /api/anomaly-accounts``anomalyGraph(array $data)``POST /api/anomaly-graph`### Credit Risk

[](#credit-risk)

MethodEndpoint`creditRiskScore(array $data)``POST /api/credit-risk-score``creditRiskExplain(array $data)``POST /api/credit-risk-explain`### Marketing Attribution

[](#marketing-attribution)

MethodEndpoint`channelAttribution(array $data)``POST /api/channel-attribution``upliftModel(array $data)``POST /api/uplift-model`### Customer Journey

[](#customer-journey)

MethodEndpoint`journeyMarkov(array $data)``POST /api/journey-markov``journeySequences(array $data)``POST /api/journey-sequences`### NLP &amp; Text Processing

[](#nlp--text-processing)

MethodEndpoint`nlpAnalysis(array $data)``POST /api/nlp-analisys``nlpAnalysisEn(array $data)``POST /api/nlp-analisys-en``nlpExcessInventoryReport(array $data)``POST /api/nlp-openai-excess-inventory-report``sanitizeText(array $data)``POST /api/sanitize-text`### Advanced Segmentation (Admin)

[](#advanced-segmentation-admin)

MethodEndpoint`purchasingSegmentation(array $data)``POST /api/purchasing-segmentation``purchasingSegmentationDendrogram(array $data)``POST /api/purchasing-segmentation-dendrogram``segmentHierarchyChart(array $data)``POST /api/segment-hierarchy-chart``segmentSubsegmentExplore(array $data)``POST /api/segment-subsegment-explore``segmentClusterProfiles(array $data)``POST /api/segment-cluster-profiles`### Reporting (Admin)

[](#reporting-admin)

MethodEndpoint`segmentationReport(array $data)``POST /api/segmentation-report``segmentationReportI18n(array $data, string $lang)``POST /api/segmentation-report-i18n?lang={lang}``segmentationReportJson(array $data, string $lang)``POST /api/segmentation-report-json?lang={lang}`### Async ML Jobs

[](#async-ml-jobs)

MethodEndpoint`listJobs(?string $customerApiId, ?string $status, ?int $limit)``GET /api/jobs``getJobStatus(string $jobId)``GET /api/jobs/{jobId}/status``getJobResult(string $jobId)``GET /api/jobs/{jobId}/result`### Dead Letter Queue (Admin)

[](#dead-letter-queue-admin)

MethodEndpoint`listDlqMessages(?string $queueName, ?int $limit)``GET /api/dlq/messages``retryDlqMessage(string $jobId, ?string $queueName)``POST /api/dlq/retry/{jobId}``deleteDlqMessage(string $jobId, ?string $queueName)``DELETE /api/dlq/messages/{jobId}`Route Resolver
--------------

[](#route-resolver)

The SDK includes a `RouteResolver` for semantic route permissions using dot notation. This is used when creating or updating customers via the Admin API.

```
use EchoIntel\RouteResolver;

// Wildcard: all non-admin routes
RouteResolver::resolve(['*']);

// Entire category
RouteResolver::resolve(['forecasting']);

// Specific endpoint
RouteResolver::resolve(['forecasting.revenue', 'customer.segmentation']);

// List available categories
RouteResolver::categories();
// ['system', 'forecasting', 'inventory', 'customer', ...]

// List endpoints in a category
RouteResolver::endpoints('forecasting');
// ['revenue', 'cost', 'cost_improved', 'units', 'cost_totus']
```

Error Handling
--------------

[](#error-handling)

```
use EchoIntel\Facades\EchoIntel;
use EchoIntel\Exceptions\EchoIntelException;
use EchoIntel\Exceptions\EchoIntelValidationException;
use EchoIntel\Exceptions\EchoIntelAuthenticationException;

try {
    $result = EchoIntel::forecastRevenue($data);
} catch (EchoIntelValidationException $e) {
    // HTTP 422
    $errors = $e->getErrors();
} catch (EchoIntelAuthenticationException $e) {
    // HTTP 401 / 403
    $message = $e->getMessage();
} catch (EchoIntelException $e) {
    // Other API errors
    $statusCode = $e->getStatusCode();
    $message = $e->getMessage();
}
```

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

[](#configuration)

After publishing, edit `config/echointel.php`:

```
return [
    // Sandbox mode (default: true)
    // Set to false for production
    'sandbox' => filter_var(env('ECHOINTEL_SANDBOX', true), FILTER_VALIDATE_BOOLEAN),

    // Production URL
    'api_url' => env('ECHOINTEL_API_URL', 'https://ai.echosistema.live'),

    // Sandbox URL
    'sandbox_api_url' => env('ECHOINTEL_SANDBOX_API_URL', 'https://ai.echosistema.dev'),

    // Credentials
    'customer_api_id' => env('ECHOINTEL_CUSTOMER_API_ID'),
    'secret' => env('ECHOINTEL_SECRET'),
    'admin_secret' => env('ECHOINTEL_ADMIN_SECRET'),

    // Request timeout (seconds)
    'timeout' => env('ECHOINTEL_TIMEOUT', 30),

    // Retry on failure
    'retry' => [
        'attempts' => 3,
        'delay' => 100, // milliseconds
    ],
];
```

Upgrading from v1.x to v2.0
---------------------------

[](#upgrading-from-v1x-to-v20)

### Breaking Changes

[](#breaking-changes)

**API endpoint URLs changed from `snake_case` to `kebab-case`.**

This is a server-side change. The SDK methods remain the same -- no code changes are needed in your application. However, the underlying HTTP requests now target kebab-case URLs:

v1.xv2.0`/api/forecast_revenue``/api/forecast-revenue``/api/customer_segmentation``/api/customer-segmentation``/api/churn_risk``/api/churn-risk`......**Default API URL changed.** The SDK now defaults to sandbox mode (`https://ai.echosistema.dev`). To use production, set `ECHOINTEL_SANDBOX=false` in your `.env`.

### New in v2.0

[](#new-in-v20)

- **Sandbox mode toggle** via `ECHOINTEL_SANDBOX` environment variable
- Separate `ECHOINTEL_API_URL` (production) and `ECHOINTEL_SANDBOX_API_URL` (sandbox) configuration

Testing
-------

[](#testing)

```
composer test
```

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [EchoSistema](https://echosistema.online)

License
-------

[](#license)

Proprietary. See [License File](LICENSE) for details.

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance81

Actively maintained with recent releases

Popularity12

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity44

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

Total

2

Last Release

98d ago

Major Versions

v1.0.0 → v2.0.02026-02-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/1ead7585bcbc91f251dff217808be507d192c9fef8911cd7e7cf8d7c4f84898f?d=identicon)[echosistema](/maintainers/echosistema)

---

Top Contributors

[![EwertonDaniel](https://avatars.githubusercontent.com/u/42904786?v=4)](https://github.com/EwertonDaniel "EwertonDaniel (8 commits)")

---

Tags

laravelsdkaianalyticsmachine learninginventoryechointelechosistemaforecastingcustomer-segmentation

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/echointel-laravel-sdk/health.svg)

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

###  Alternatives

[gemini-api-php/laravel

Gemini API client for Laravel

8915.7k](/packages/gemini-api-php-laravel)[claude-php/claude-php-sdk-laravel

Laravel integration for the Claude PHP SDK - Anthropic Claude API

5010.8k](/packages/claude-php-claude-php-sdk-laravel)

PHPackages © 2026

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