API Reference
Complete REST API reference for the Memory Module. Use these endpoints for direct integration, automation, or when MCP isn’t available.Prefer MCP? Most users should use MCP Integration for seamless AI assistant integration. Use this API for custom integrations, automation scripts, or non-MCP tools.
Base URL
Authentication
All endpoints require Bearer token authentication:- Log into app.ulpi.io
- Navigate to your repository → Settings → API Keys
- Click “Generate New Key”
- Store securely (shown only once!)
Endpoints
POST /memories
Store a new memory. Request:content(required, string): The information to storesector(optional, string): episodic | semantic | procedural | emotional | reflectivetags(optional, array): List of tags for organizationsource(optional, string): Where this came frommetadata(optional, object): Custom JSON metadata
201: Created successfully400: Invalid request format401: Unauthorized (bad API key)422: Validation failed429: Rate limit exceeded
POST /memories/search
Search memories with hybrid ranking. Request:query(required, string): Search textlimit(optional, int): Results to return (default: 10, max: 100)sector(optional, string): Filter by cognitive sectortags(optional, array): Filter by tagsmin_salience(optional, float): Minimum salience threshold (0.0-1.0)expand_waypoints(optional, bool): Enable context expansion (default: true)max_hops(optional, int): Waypoint traversal depth (default: 3, max: 5)
200: Success400: Invalid request401: Unauthorized
GET /memories/
Retrieve specific memory by ID. Request:200: Success404: Memory not found401: Unauthorized
access_count and updates last_accessed_at.
PATCH /memories/
Update memory content or metadata. Request:content(optional, string): Update the contenttags(optional, array): Replace tagssource(optional, string): Update sourcemetadata(optional, object): Replace metadata
200: Updated successfully404: Memory not found422: Validation failed
sector after creation. Embeddings regenerate automatically.
POST /memories//reinforce
Explicitly boost memory salience. Request:profile(optional, string): Reinforcement strengthquick_refresh: +0.05maintenance: +0.10 (default)deep_learning: +0.15emergency: +0.25
200: Reinforced successfully404: Memory not found
GET /memories//waypoints
Get semantic connections for a memory. Request:limit(optional, int): Number of waypoints (default: 20)min_weight(optional, float): Minimum similarity (default: 0.75)
DELETE /memories/
Permanently delete a memory. Request:204: Deleted successfully404: Memory not found
POST /memories/prune
Remove low-salience memories in bulk. Request:threshold(optional, float): Salience threshold (default: 0.1)sector(optional, string): Only prune specific sectordry_run(optional, bool): Preview without deleting (default: false)
GET /memories/stats
Get system statistics. Request:Rate Limits
| Plan | Rate Limit |
|---|---|
| Starter | 60 requests/minute |
| Pro | 300 requests/minute |
| Enterprise | 1000 requests/minute |
Error Responses
All errors return consistent JSON format:400: Bad Request (malformed JSON, invalid parameters)401: Unauthorized (missing/invalid API key)403: Forbidden (valid auth but no access)404: Not Found (resource doesn’t exist)422: Unprocessable Entity (validation failed)429: Too Many Requests (rate limit exceeded)500: Internal Server Error
Pagination
For endpoints returning lists, use cursor-based pagination: Request:Webhooks
Coming soon! Subscribe to memory events:memory.createdmemory.accessedmemory.prunedwaypoint.created
SDKs
Official SDKs available:JavaScript / Node.js
Python
Go
Code Examples
JavaScript / Node.js
Python
cURL
Best Practices
Batch Operations
Batch Operations
When storing multiple memories, use async/parallel requests to improve throughput. Don’t wait for each to complete sequentially.
Error Handling
Error Handling
Always implement retry logic with exponential backoff for 5xx errors and rate limits (429).
API Key Security
API Key Security
- Never commit keys to version control
- Use environment variables
- Rotate keys quarterly
- Use separate keys per environment
Rate Limit Management
Rate Limit Management
- Cache search results when possible
- Implement client-side rate limiting
- Monitor X-RateLimit-Remaining header
- Upgrade plan if consistently hitting limits
Pagination
Pagination
For large datasets, always use pagination. Don’t request all memories at once.
Support
API Issues:- 📧 Email: api-support@ulpi.io
- 📚 Docs: docs.ulpi.io/memory
- 💬 Community: forum.ulpi.io
- 🐛 Bugs: github.com/ulpi-io/ulpi/issues
- Starter: 48 hours
- Pro: 24 hours (priority)
- Enterprise: 4 hours (dedicated)