Official client libraries for SerialMemory with built-in resilience patterns.
| SDK | Package | Status |
|---|---|---|
| .NET | SerialMemory.Client |
✅ Production Ready |
| Node.js/TypeScript | @serialmemory/client |
✅ Production Ready |
All SDKs provide:
- Authentication - API key and JWT token support
- Automatic Retry - Exponential backoff with jitter
- Rate Limit Handling - Respects retry-after headers
- Circuit Breaker - Protects against cascading failures
- Usage Limit Errors - Typed exceptions for plan limits
- Multi-tenant - Tenant ID header support
| Feature | .NET | Node.js |
|---|---|---|
| Runtime | .NET 8+ | Node.js 18+ |
| Dependencies | Polly | Zero deps (native fetch) |
| Type Safety | C# records | Full TypeScript |
| Async | async/await | async/await |
# Via NuGet (when published)
dotnet add package SerialMemory.Client
# Or reference local project
dotnet add reference path/to/SerialMemory.Client.csproj# Via npm (when published)
npm install @serialmemory/client
# Or link local package
cd sdks/node && npm link
cd your-project && npm link @serialmemory/clientusing SerialMemory.Client;
var client = new SerialMemoryClient(new SerialMemoryOptions
{
BaseUrl = "http://localhost:5000",
ApiKey = "your-api-key"
});
// Search
var results = await client.SearchAsync("query");
// Ingest
var memory = await client.IngestAsync("Content to remember");
// User persona
var persona = await client.GetUserPersonaAsync();import { SerialMemoryClient } from '@serialmemory/client';
const client = new SerialMemoryClient({
baseUrl: 'http://localhost:5000',
apiKey: 'your-api-key'
});
// Search
const results = await client.search('query');
// Ingest
const memory = await client.ingest('Content to remember');
// User persona
const persona = await client.getUserPersona();Both SDKs provide typed exceptions:
| Exception | HTTP Code | Description |
|---|---|---|
RateLimitExceededError |
429 | Too many requests, retry after delay |
UsageLimitExceededError |
402 | Plan quota exhausted |
AuthenticationError |
401/403 | Invalid credentials |
CircuitBreakerOpenError |
N/A | Service temporarily unavailable |
Each SDK includes example projects:
- Personal Assistant - AI second brain pattern
- Project Memory - Multi-project isolation
See examples/ for standalone example projects.
| Option | .NET | Node.js | Default |
|---|---|---|---|
| Base URL | BaseUrl |
baseUrl |
Required |
| API Key | ApiKey |
apiKey |
- |
| JWT Token | JwtToken |
jwtToken |
- |
| Tenant ID | TenantId |
tenantId |
- |
| Timeout | Timeout |
timeout |
30s |
| Max Retries | MaxRetries |
maxRetries |
3 |
| Retry Delay | - | retryDelay |
500ms |
| Circuit Breaker Duration | CircuitBreakerDuration |
circuitBreakerDuration |
30s |
cd sdks/dotnet
dotnet build SerialMemory.Client
dotnet pack SerialMemory.Client -c Releasecd sdks/node
npm install
npm run build
npm pack- Fork the repository
- Create a feature branch
- Add tests for new functionality
- Submit a pull request
MIT