Overview
Trix provides official SDKs for popular programming languages, making it easy to add persistent memory to your AI applications. All SDKs are fully typed, well-documented, and designed to feel native to each language.
Not using one of these languages? You can always use the REST API directly from any language that can make HTTP requests.
Available SDKs
Fully typed with Pydantic models. Sync and async clients. Built on httpx for modern Python applications.
pip install trixdbFull TypeScript support with generated types. Works in Node.js, Deno, Bun, and browsers.
npm install @trixdb/clientNative .NET SDK with async/await support. Works with .NET 6+ and .NET Framework 4.7.2+.
dotnet add package TrixDirect HTTP API access for any language. OpenAPI spec available for code generation.
curl https://api.trixdb.com/v1/memoriesQuick Comparison
| Feature | Python | TypeScript | C# |
|---|---|---|---|
| Async Support | Yes (AsyncTrix) | Yes (native) | Yes (async/await) |
| Type Safety | Pydantic models | Full TypeScript | Strong typing |
| Auto-pagination | iter() methods | Async iterators | IAsyncEnumerable |
| Retry Logic | Built-in | Built-in | Built-in |
| Streaming | Yes | Yes | Yes |
Common Patterns
All SDKs follow the same patterns for consistency:
Creating Memories
# Python
from trix import Trix
client = Trix()
memory = client.memories.create(
content="User prefers dark mode",
metadata={"category": "preferences"}
)Searching Memories
# Python
results = client.memories.list(q="user preferences",
limit=10
)
for memory in results.data:
print(memory.content)Using Spaces
# Python - isolate memories per user
client.memories.create(
content="User's favorite color is blue",
space_id="user_123"
)Next Steps
Choose your SDK and get started:
- Python SDK - Full reference with examples
- TypeScript SDK - For Node.js and browser apps
- C# SDK - For .NET applications
- REST API - Direct HTTP access
Or explore related topics:
- Authentication - API key setup and security
- Core Concepts: Memories - Understanding the data model
- API Reference - Complete endpoint documentation