Download the PHP package jasontame/langgraph-client-php without Composer
On this page you can find all versions of the php package jasontame/langgraph-client-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jasontame/langgraph-client-php
More information about jasontame/langgraph-client-php
Files in jasontame/langgraph-client-php
Package langgraph-client-php
Short Description An unofficial PHP client SDK for the LangGraph Platform API.
License MIT
Homepage https://github.com/jasontame/langgraph-client-php
Informations about the package langgraph-client-php
LangGraph Client for PHP
An unofficial PHP client SDK for interacting with the LangGraph Platform API. This package provides a clean, Laravel-friendly interface for building AI agents and workflows using LangGraph's powerful platform.
Features
- ✅ Complete API Coverage - Assistants, Threads, Runs, Crons, and Store operations
- ✅ Laravel Integration - Service provider, facade, and configuration
- ✅ Streaming Support - Real-time Server-Sent Events (SSE) streaming
- ✅ Webhook Support - Async operations with webhook callbacks
- ✅ Error Handling - Comprehensive exception classes with detailed error information
- ✅ HTTP Client - Built on Guzzle with retry logic and timeout handling
- ✅ Type Safety - Full PHP 8.3+ type declarations
Installation
Install the package via Composer:
Laravel Setup
Publish the configuration file:
Add your LangGraph Platform API credentials to your .env file:
For local development, you can use:
Quick Start
Using the Facade (Laravel)
Using the Client Directly
Configuration
Environment Variables
The SDK can be configured using environment variables:
LANGGRAPH_API_KEY: Your LangGraph Platform API key (usefake-api-keyfor local development)LANGGRAPH_BASE_URL: Custom base URL (defaults tohttps://api.langchain.com)LANGGRAPH_TIMEOUT: Request timeout in seconds (default: 30)LANGGRAPH_RETRIES: Number of retry attempts (default: 3)
Client Configuration
Usage Examples
Assistants
Threads
Runs
Crons
Note: Cron functionality requires LangGraph Platform Enterprise
Store Operations
Streaming
The SDK supports Server-Sent Events (SSE) streaming for real-time responses:
Webhooks
The SDK supports webhooks that are called after LangGraph API calls complete:
Webhook Requirements:
- Must be a valid URI (up to 65,536 characters)
- Should handle HTTP POST requests from LangGraph Platform
- Called after the API call completes
Error Handling
The SDK provides specific exception classes for different API errors:
Available exception classes:
LangGraphException- Base error classBadRequestException- 400 errorsUnauthorizedException- 401 errorsNotFoundException- 404 errorsConflictException- 409 errorsValidationException- 422 errorsServerException- 500+ errors
Testing
Run the tests with:
Run with coverage:
Code Style
Fix code style issues:
Run static analysis:
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Jason Tame
- Inspired by the Ruby LangGraph Platform SDK
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of langgraph-client-php with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
guzzlehttp/guzzle Version ^7.8
psr/http-message Version ^2.0
psr/http-client Version ^1.0