SDKs
HeroBrain provides official SDKs for JavaScript/TypeScript and Python to make integration easier and more productive.JavaScript/TypeScript SDK
Installation
Configuration Options
Memory Operations
Create a Memory
Retrieve a Memory
Update a Memory
Delete a Memory
List Memories
Search Memories
Bulk Operations
API Key Management
Create an API Key
List API Keys
Revoke an API Key
Webhook Management
Create a Webhook
List Webhooks
Test a Webhook
Delete a Webhook
Intelligence Features
Decision Chain Analysis
Expertise Mapping
Pattern Detection
Burnout Analysis
Usage & Billing
Get Usage Metrics
Get Usage History
Error Handling
The SDK provides comprehensive error handling:Advanced Configuration
Custom Request Interceptors
Logging
TypeScript Support
The SDK is fully typed with TypeScript:Python SDK
Installation
Basic Usage
Memory Operations
Complete Python Example
SDK Comparison
| Feature | JavaScript/TypeScript | Python |
|---|---|---|
| Memory CRUD | ✅ | ✅ |
| Search | ✅ | ✅ |
| Bulk Operations | ✅ | ✅ |
| API Key Management | ✅ | ✅ |
| Webhooks | ✅ | ✅ |
| Intelligence Features | ✅ | ✅ |
| Usage Tracking | ✅ | ✅ |
| TypeScript Types | ✅ | ❌ |
| Async/Await | ✅ | ✅ |
| Error Handling | ✅ | ✅ |
| Rate Limiting | ✅ | ✅ |
| Retry Logic | ✅ | ✅ |
| Streaming Support | ✅ | ✅ |
MCP (Model Context Protocol)
HeroBrain also provides an MCP server for AI agent integration.Installation
Configuration for Claude Desktop
Add to your Claude Desktop configuration:Available MCP Tools
- search_memories: Semantic search across memories
- create_memory: Create a new memory
- get_memory: Retrieve a specific memory
- list_memories: List memories with pagination
- update_memory: Update an existing memory
MCP Usage in Claude
Testing with SDKs
Test Data
Use the test tenant for development:Mock Client
For unit testing, use the mock client:Migration Guide
From REST API to SDK
From Other SDKs
Best Practices
Error Handling
Connection Pooling
Batch Operations for Performance
Memory Management
Support
- SDK Issues: https://github.com/herobrain/sdk/issues
- Documentation: https://docs.herobrain.ai/sdks
- Community: https://community.herobrain.ai
- Email: [email protected]
Changelog
v1.0.0 (November 19, 2025)
- Initial release with full API coverage
- TypeScript and Python SDKs
- MCP server integration
- Comprehensive error handling
- Rate limiting and retry logic
- Streaming support for large responses