An open standard for sharing AI memory across mobile applications.
Built for Arm64 Architecture - Optimized for modern Arm-based mobile devices with on-device AI inference.
The Edge Memory Protocol (EMP) enables multiple apps from different developers to share a common memory store on mobile devices. All data stays local on the device, giving users complete control over their AI memory.
edge-memory/
βββ spec/ # Protocol specification
β βββ v1.0/
β βββ specification.md # Full protocol documentation
β βββ schema.json # JSON Schema for validation
β βββ examples.jsonl # Example memory entries
βββ sdk/ # Reference SDK implementation
β βββ src/
β β βββ types.ts # TypeScript type definitions
β β βββ validation.ts # Entry validation
β β βββ lock.ts # File locking
β β βββ MemoryStore.ts # Core memory store
β β βββ platform/
β β β βββ expo.ts # Expo/React Native platform handler
β β βββ index.ts # Public API
β βββ package.json
βββ app/ # Example application (coming soon)
npm installStart with the protocol specification to understand the standard.
import { createMemoryStore } from './sdk/src';
const memory = createMemoryStore({
appId: 'com.yourcompany.yourapp',
debug: true,
});
// Initialize (requests user permission)
await memory.setup();
await memory.initialize();
// Write a memory
await memory.write({
content: 'User prefers dark mode',
type: 'preference',
tags: ['ui', 'theme'],
});
// Read memories
const recent = await memory.read({
since: Date.now() - 7 * 24 * 60 * 60 * 1000, // Last 7 days
});
console.log(recent);- Local-First: All data stays on device
- Cross-App: Multiple apps can share the same memory
- Privacy-Preserving: User controls all access
- Simple Format: JSONL (JSON Lines) for easy parsing
- Platform-Native: Uses iOS Files app and Android storage
- Open Standard: Any developer can implement
- Architecture: Arm64 (arm64-v8a) - optimized for modern mobile devices
- iOS: Via Files app with security-scoped bookmarks
- Android: Via standard Documents folder or Storage Access Framework
- React Native: Reference implementation provided (Expo SDK)
- Native: Implement the spec in Swift/Kotlin
- AI Framework: Cactus SDK for on-device inference (Qwen 3 - 0.6B)
The project is configured to build for Arm64 architecture (arm64-v8a):
// eas.json
{
"build": {
"preview": {
"android": {
"buildType": "apk",
"env": {
"ANDROID_ABI_FILTERS": "arm64-v8a"
}
}
}
}
}This ensures the APK runs on modern Arm-based Android devices and leverages Arm-optimized AI inference via Cactus SDK.
cd sdk
npm install
npm run buildeas build --profile preview --platform androidnpm startThis is an open standard. Contributions welcome:
- Protocol improvements (submit proposals)
- SDK enhancements
- Platform implementations (Swift, Kotlin, etc.)
- Example applications
- Documentation improvements
This project uses a dual-license approach:
-
Protocol Specification (
spec/): CC0 1.0 Universal (Public Domain)- The protocol specification is freely usable by anyone without restrictions
- Encourages maximum adoption and implementation across the ecosystem
-
Reference Implementation (
sdk/,app/): MIT License- The code implementation requires attribution but is freely usable
- Compatible with commercial and open-source projects
- Protocol specification v1.0
- TypeScript/React Native SDK
- Example chat application
- Example notes application
- Swift SDK for native iOS
- Kotlin SDK for native Android
- Embedding/vector search support
- Encryption helpers
- Protocol v2.0 (compression, archival)