Download the PHP package shanginn/mem0 without Composer
On this page you can find all versions of the php package shanginn/mem0. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shanginn/mem0
More information about shanginn/mem0
Files in shanginn/mem0
Package mem0
Short Description Memory for AI Agents; SOTA in AI Agent Memory;
License Apache-2.0
Informations about the package mem0
⚠️⚠️⚠️ UNSUPPORTED ⚠️⚠️⚠️
These docs are ai bullshit, see the example for the working code.
UNOFFICIAL MEM0 PHP SDK
This is an unofficial PHP SDK for the Mem0 API. This library is not affiliated with, endorsed by, or officially supported by Mem0.
⚡ +26% Accuracy vs. OpenAI Memory • 🚀 91% Faster • 💰 90% Fewer Tokens
Mem0 PHP SDK
This is an unofficial PHP SDK for Mem0, the intelligent memory layer for personalized AI. Mem0 enhances AI assistants and agents by enabling them to remember user preferences, adapt to individual needs, and continuously learn over time.
Key Features & Use Cases
Core Capabilities:
- Multi-Level Memory: Seamlessly retains User, Session, and Agent state with adaptive personalization.
- Developer-Friendly: Intuitive API and cross-platform SDKs.
- Type Safety: Full PHP 8.2+ type declarations and strict typing
- Async Support: Built on Amp HTTP client for non-blocking operations
- Advanced Filtering: Complex query capabilities with AND/OR logic
- Rich Memory Types: Support for conversational memories and metadata
Applications:
- AI Assistants: Consistent, context-rich conversations.
- Customer Support: Recall past tickets and user history for tailored help.
- Personalized Experiences: Adapt applications based on user behavior and history.
🚀 Quickstart Guide
1. Installation
Install the SDK via Composer:
2. API Key Setup
- Sign in to the Mem0 Platform.
- Copy your API Key from the dashboard.
3. Basic Usage
Create an instance of the Mem0 client with your API key:
Memory Management
Adding Memories
The addMemory() method supports both simple string messages and complex conversational arrays:
Retrieving Memories
Use the listMemories() method with powerful filtering options:
Advanced Configuration
Custom HTTP Client
Implement your own HTTP client for custom behavior:
Custom Serialization
Implement custom serialization logic:
Default Organization and Project
Set default organization and project IDs:
Data Transfer Objects (DTOs)
The SDK provides rich DTOs for type-safe interactions:
Message
Filter & FilterOperator
Memory
Error Handling
The SDK throws specific exceptions for different error conditions:
All versions of mem0 with dependencies
symfony/serializer Version ^7
crell/serde Version ^1.3
amphp/http Version ^2
amphp/file Version ^3
amphp/http-client Version ^5.3
spiral/json-schema-generator Version ^1.1
symfony/property-access Version ^7.2