PHPackages                             mayursaptal/semantic-kernel-php - 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. [Framework](/categories/framework)
4. /
5. mayursaptal/semantic-kernel-php

ActiveLibrary[Framework](/categories/framework)

mayursaptal/semantic-kernel-php
===============================

PHP implementation of Microsoft's Semantic Kernel framework for orchestrating LLMs, memory, and AI agents

11PHP

Since Jul 28Pushed 9mo agoCompare

[ Source](https://github.com/mayursaptal/semantic-kernel-php)[ Packagist](https://packagist.org/packages/mayursaptal/semantic-kernel-php)[ RSS](/packages/mayursaptal-semantic-kernel-php/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (2)Used By (0)

Semantic Kernel PHP
===================

[](#semantic-kernel-php)

[![PHP Version](https://camo.githubusercontent.com/7663c9d53dc13cedaf0660a8745a7e77d2dd711257f36aa86ebce12a0600ef42/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c75652e737667)](https://php.net/)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](LICENSE)[![Composer](https://camo.githubusercontent.com/b01db849c56d4bcc47c2caa4afc2ea6dba256cd3ccec92eaee1a0532365f2c11/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6d706f7365722d72656164792d626c75652e737667)](https://packagist.org)

> **Build AI-powered applications in PHP** - A complete framework for orchestrating Large Language Models, memory systems, and intelligent planning. Compatible with Microsoft's Semantic Kernel patterns.

✨ What can you build?
---------------------

[](#-what-can-you-build)

### 🤖 **AI-Powered Applications**

[](#-ai-powered-applications)

```
// Customer support bot with memory
$kernel = Kernel::createBuilder()
    ->withOpenAI($_ENV['OPENAI_API_KEY'])
    ->withVolatileMemory()
    ->build();

$response = $kernel->getChatService()->generateText(
    "Help customer with order {{order_id}}: {{question}}",
    new ContextVariables(['order_id' => '12345', 'question' => 'Where is my package?'])
);
```

### 📝 **Document Processing &amp; Summarization**

[](#-document-processing--summarization)

```
// Smart document summarizer
$summarizer = new SemanticFunction(
    'summarize',
    'Summarize this document in 3 bullet points: {{input}}',
    'Extracts key insights from documents'
);

$plugin = KernelPlugin::create('DocumentTools');
$plugin->addFunction($summarizer);
$kernel->importPlugin($plugin);

$result = $kernel->run('DocumentTools.summarize', new ContextVariables([
    'input' => $longDocument
]));
```

### 🧠 **Intelligent Planning &amp; Task Execution**

[](#-intelligent-planning--task-execution)

```
// AI plans and executes complex tasks
$planner = new Planner($kernel);
$plan = $planner->createPlan('Create and send weekly sales report');

// AI automatically breaks down into steps:
// 1. Gather sales data → 2. Analyze trends → 3. Create report → 4. Send email
$result = $planner->executePlan($plan, $context);
```

🚀 Quick Start
-------------

[](#-quick-start)

### Installation

[](#installation)

```
composer require mayursaptal/semantic-kernel-php
```

### Basic Usage

[](#basic-usage)

```
