Skip to content

Commit b01a5cc

Browse files
committed
Change package name and namespace
1 parent 8df9c55 commit b01a5cc

30 files changed

Lines changed: 251 additions & 263 deletions

README.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# LangGraph Platform PHP SDK
1+
# LangGraph Client for PHP
22

3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/jasontame/langgraph-platform-php.svg?style=flat-square)](https://packagist.org/packages/jasontame/langgraph-platform-php)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/jasontame/langgraph-platform-php/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/jasontame/langgraph-platform-php/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/jasontame/langgraph-platform-php/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/jasontame/langgraph-platform-php/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/jasontame/langgraph-platform-php.svg?style=flat-square)](https://packagist.org/packages/jasontame/langgraph-platform-php)
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/jasontame/langgraph-client-php.svg?style=flat-square)](https://packagist.org/packages/jasontame/langgraph-client-php)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/jasontame/langgraph-client-php/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/jasontame/langgraph-client-php/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/jasontame/langgraph-client-php/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/jasontame/langgraph-client-php/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/jasontame/langgraph-client-php.svg?style=flat-square)](https://packagist.org/packages/jasontame/langgraph-client-php)
77

8-
An unofficial PHP SDK for interacting with the [LangGraph Platform API](https://langchain-ai.github.io/langgraph/cloud/reference/api/api_ref.html). This package provides a clean, Laravel-friendly interface for building AI agents and workflows using LangGraph's powerful platform.
8+
An unofficial PHP client SDK for interacting with the [LangGraph Platform API](https://langchain-ai.github.io/langgraph/cloud/reference/api/api_ref.html). This package provides a clean, Laravel-friendly interface for building AI agents and workflows using LangGraph's powerful platform.
99

1010
## Features
1111

@@ -22,15 +22,15 @@ An unofficial PHP SDK for interacting with the [LangGraph Platform API](https://
2222
Install the package via Composer:
2323

2424
```bash
25-
composer require jasontame/langgraph-platform-php
25+
composer require jasontame/langgraph-client-php
2626
```
2727

2828
### Laravel Setup
2929

3030
Publish the configuration file:
3131

3232
```bash
33-
php artisan vendor:publish --tag="langgraph-platform-php-config"
33+
php artisan vendor:publish --tag="langgraph-client-php-config"
3434
```
3535

3636
Add your LangGraph Platform API credentials to your `.env` file:
@@ -51,23 +51,23 @@ LANGGRAPH_BASE_URL=http://localhost:8124
5151
### Using the Facade (Laravel)
5252

5353
```php
54-
use LangGraphPlatform\Facades\LangGraphPlatform;
54+
use JasonTame\LangGraphClient\Facades\LangGraphClient;
5555

5656
// Create an assistant
57-
$assistant = LangGraphPlatform::assistants()->create([
57+
$assistant = LangGraphClient::assistants()->create([
5858
'graph_id' => 'my-graph',
5959
'name' => 'My Assistant',
6060
'config' => ['recursion_limit' => 10],
6161
'metadata' => ['version' => '1.0']
6262
]);
6363

6464
// Create a thread
65-
$thread = LangGraphPlatform::threads()->create([
65+
$thread = LangGraphClient::threads()->create([
6666
'metadata' => ['user_id' => 'user123']
6767
]);
6868

6969
// Run the assistant
70-
$run = LangGraphPlatform::runs()->create($thread['thread_id'], [
70+
$run = LangGraphClient::runs()->create($thread['thread_id'], [
7171
'assistant_id' => $assistant['assistant_id'],
7272
'input' => ['message' => 'Hello, world!']
7373
]);
@@ -78,18 +78,18 @@ echo "Run status: " . $run['status'];
7878
### Using the Client Directly
7979

8080
```php
81-
use LangGraphPlatform\LangGraphPlatform;
81+
use JasonTame\LangGraphClient\LangGraphClient;
8282

8383
// Create client instance
84-
$client = new LangGraphPlatform([
84+
$client = new LangGraphClient([
8585
'api_key' => 'your-api-key',
8686
'base_url' => 'https://api.langchain.com',
8787
'timeout' => 30,
8888
'retries' => 3
8989
]);
9090

9191
// Or use environment variables
92-
$client = LangGraphPlatform::fromEnvironment();
92+
$client = LangGraphClient::fromEnvironment();
9393
```
9494

9595
## Configuration
@@ -106,7 +106,7 @@ The SDK can be configured using environment variables:
106106
### Client Configuration
107107

108108
```php
109-
$client = new LangGraphPlatform([
109+
$client = new LangGraphClient([
110110
'api_key' => 'your-api-key',
111111
'base_url' => 'https://custom-api.example.com',
112112
'timeout' => 60,
@@ -317,9 +317,9 @@ $client->runs()->createStateless([
317317
The SDK provides specific exception classes for different API errors:
318318

319319
```php
320-
use LangGraphPlatform\Exceptions\LangGraphException;
321-
use LangGraphPlatform\Exceptions\NotFound Exception;
322-
use LangGraphPlatform\Exceptions\UnauthorizedException;
320+
use JasonTame\LangGraphClient\Exceptions\LangGraphException;
321+
use JasonTame\LangGraphClient\Exceptions\NotFoundException;
322+
use JasonTame\LangGraphClient\Exceptions\UnauthorizedException;
323323

324324
try {
325325
$assistant = $client->assistants()->find('nonexistent-id');

composer.json

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,18 @@
11
{
2-
"name": "jasontame/langgraph-platform-php",
3-
"description": "An unofficial PHP SDK for interacting with the LangGraph Platform API.",
2+
"name": "jasontame/langgraph-client-php",
3+
"description": "An unofficial PHP client SDK for the LangGraph Platform API.",
44
"keywords": [
55
"Jason Tame",
66
"laravel",
7-
"langgraph-platform-php",
7+
"langgraph-client-php",
88
"langgraph",
99
"ai",
1010
"agents",
11-
"langchain"
11+
"langchain",
12+
"client",
13+
"sdk"
1214
],
13-
"homepage": "https://github.com/jasontame/langgraph-platform-php",
15+
"homepage": "https://github.com/jasontame/langgraph-client-php",
1416
"license": "MIT",
1517
"authors": [
1618
{
@@ -41,12 +43,12 @@
4143
},
4244
"autoload": {
4345
"psr-4": {
44-
"LangGraphPlatform\\": "src/"
46+
"JasonTame\\LangGraphClient\\": "src/"
4547
}
4648
},
4749
"autoload-dev": {
4850
"psr-4": {
49-
"LangGraphPlatform\\Tests\\": "tests/",
51+
"JasonTame\\LangGraphClient\\Tests\\": "tests/",
5052
"Workbench\\App\\": "workbench/app/"
5153
}
5254
},
@@ -68,10 +70,10 @@
6870
"extra": {
6971
"laravel": {
7072
"providers": [
71-
"LangGraphPlatform\\LangGraphPlatformServiceProvider"
73+
"JasonTame\\LangGraphClient\\LangGraphClientServiceProvider"
7274
],
7375
"aliases": {
74-
"LangGraphPlatform": "LangGraphPlatform\\Facades\\LangGraphPlatform"
76+
"LangGraphClient": "JasonTame\\LangGraphClient\\Facades\\LangGraphClient"
7577
}
7678
}
7779
},

config/langgraph-client-php.php

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?php
2+
3+
// config for JasonTame/LangGraphClient
4+
return [
5+
6+
/*
7+
|--------------------------------------------------------------------------
8+
| LangGraph Client Configuration
9+
|--------------------------------------------------------------------------
10+
|
11+
| Configuration for the LangGraph Client PHP SDK
12+
|
13+
*/
14+
15+
/*
16+
|--------------------------------------------------------------------------
17+
| API Key
18+
|--------------------------------------------------------------------------
19+
|
20+
| Your LangGraph Platform API key. For local development, you can use
21+
| 'fake-api-key' when running against a local LangGraph Server instance.
22+
|
23+
*/
24+
'api_key' => env('LANGGRAPH_API_KEY', 'fake-api-key'),
25+
26+
/*
27+
|--------------------------------------------------------------------------
28+
| Base URL
29+
|--------------------------------------------------------------------------
30+
|
31+
| The base URL for the LangGraph Platform API. For production, this should
32+
| be 'https://api.langchain.com'. For local development, use
33+
| 'http://localhost:8124' when running LangGraph Server locally.
34+
|
35+
*/
36+
'base_url' => env('LANGGRAPH_BASE_URL', 'https://api.langchain.com'),
37+
38+
/*
39+
|--------------------------------------------------------------------------
40+
| Request Timeout
41+
|--------------------------------------------------------------------------
42+
|
43+
| The number of seconds to wait for a response before timing out.
44+
|
45+
*/
46+
'timeout' => (int) env('LANGGRAPH_TIMEOUT', 30),
47+
48+
/*
49+
|--------------------------------------------------------------------------
50+
| Connect Timeout
51+
|--------------------------------------------------------------------------
52+
|
53+
| The number of seconds to wait while trying to connect to the server.
54+
|
55+
*/
56+
'connect_timeout' => (int) env('LANGGRAPH_CONNECT_TIMEOUT', 5),
57+
58+
/*
59+
|--------------------------------------------------------------------------
60+
| Retry Attempts
61+
|--------------------------------------------------------------------------
62+
|
63+
| The number of times to retry a failed request before giving up.
64+
|
65+
*/
66+
'retries' => (int) env('LANGGRAPH_RETRIES', 3),
67+
68+
/*
69+
|--------------------------------------------------------------------------
70+
| SSL Verification
71+
|--------------------------------------------------------------------------
72+
|
73+
| Whether to verify SSL certificates. Should be true in production.
74+
| Can be set to false for local development with self-signed certificates.
75+
|
76+
*/
77+
'verify_ssl' => (bool) env('LANGGRAPH_VERIFY_SSL', true),
78+
79+
];

config/langgraph-platform-php.php

Lines changed: 0 additions & 101 deletions
This file was deleted.

phpunit.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
backupStaticProperties="false"
1717
>
1818
<testsuites>
19-
<testsuite name="LangGraph Platform Test Suite">
19+
<testsuite name="LangGraph Client Test Suite">
2020
<directory>tests</directory>
2121
</testsuite>
2222
</testsuites>
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace JasonTame\LangGraphClient\Commands;
6+
7+
use Illuminate\Console\Command;
8+
9+
class LangGraphClientCommand extends Command
10+
{
11+
public $signature = 'langgraph-client-php';
12+
13+
public $description = 'LangGraph Client PHP SDK command';
14+
15+
public function handle(): int
16+
{
17+
$this->comment('LangGraph Client PHP SDK');
18+
19+
return self::SUCCESS;
20+
}
21+
}

src/Commands/LangGraphPlatformCommand.php

Lines changed: 0 additions & 19 deletions
This file was deleted.

0 commit comments

Comments
 (0)