System Requirements
Trix SDKs are lightweight with minimal dependencies. Here's what you need:
| SDK | Minimum Version | Notes |
|---|---|---|
| Node.js / TypeScript | Node.js 18+ | TypeScript types included, ESM and CJS supported |
| Python | Python 3.9+ | Type hints included, async/await supported |
| C# / .NET | .NET 6+ | Async/await, nullable reference types supported |
| CLI | Any OS | Standalone binary, no runtime required |
| REST API | Any HTTP client | No SDK needed, works with curl, fetch, etc. |
Node.js / TypeScript
Install the official Trix client for Node.js and TypeScript projects:
npm install @trixdb/clientTypeScript support: Type definitions are bundled — no need to install @types packages.
Basic usage:
import { Trix } from '@trixdb/client';
const trix = new Trix({
apiKey: process.env.TRIX_API_KEY
});
// Store and search memories
await trix.memories.create({ content: 'User prefers dark mode' });
const results = await trix.memories.list({ q: 'user preferences' });Python
Install the Trix SDK for Python projects:
pip install trixdbAsync support: The Python SDK supports both sync and async operations. Use client.memories.create() for sync or await client.memories.create() for async.
C# / .NET
Install the Trix SDK for .NET projects:
dotnet add package Trix.NET versions: The SDK targets .NET 6.0+ and supports .NET 7, .NET 8, and future versions.
CLI
Install the Trix command-line interface for terminal-based workflows:
npm install -g @trixdb/cliGreat for scripting: The CLI outputs JSON by default, making it easy to pipe into jq or other tools.
REST API
No SDK required. Use any HTTP client to interact with Trix directly:
// Store a memory
const response = await fetch('https://api.trixdb.com/v1/memories', {
method: 'POST',
headers: {
'Authorization': `Bearer ${process.env.TRIX_API_KEY}`,
'Content-Type': 'application/json',
'X-Trix-Session': 'user_123'
},
body: JSON.stringify({ content: 'User prefers dark mode' })
});
const memory = await response.json();
console.log('Stored:', memory.id);Base URL: https://api.trixdb.com/v1
See the API Reference for complete endpoint documentation.
Verify Installation
After installation, verify everything is working with a quick connection test:
import { Trix } from '@trixdb/client';
const trix = new Trix({
apiKey: process.env.TRIX_API_KEY
});
// Check connection
const status = await trix.ping();
if (status.ok) {
console.log('✓ Connected to Trix');
console.log(' Version:', status.version);
console.log(' Latency:', status.latencyMs, 'ms');
} else {
console.error('✗ Connection failed');
}Troubleshooting
Common installation issues and solutions:
If you get permission errors with npm global install, fix npm permissions or use a version manager like nvm.
npm config set prefix ~/.npm-globalIf you're behind a corporate proxy, you may need to configure your certificate bundle.
export NODE_EXTRA_CA_CERTS=/path/to/cert.pemEnsure you're using the correct Python environment. Try using python3 -m pip instead of pip.
python3 -m pip install trixdbMake sure your environment variable is set correctly and your shell session is reloaded.
source ~/.bashrc # or ~/.zshrcStill having issues? Check our Troubleshooting Guide or open an issue on GitHub.
Next Steps
Now that Trix is installed, continue with: