Skip to main content

SDKs & Libraries

Official SDKs and libraries for integrating Trix into your applications.

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

Quick Comparison

FeaturePythonTypeScriptC#
Async SupportYes (AsyncTrix)Yes (native)Yes (async/await)
Type SafetyPydantic modelsFull TypeScriptStrong typing
Auto-paginationiter() methodsAsync iteratorsIAsyncEnumerable
Retry LogicBuilt-inBuilt-inBuilt-in
StreamingYesYesYes

Common Patterns

All SDKs follow the same patterns for consistency:

Creating Memories

create.py
# Python
from trix import Trix

client = Trix()
memory = client.memories.create(
    content="User prefers dark mode",
    metadata={"category": "preferences"}
)

Searching Memories

search.py
# Python
results = client.memories.list(q="user preferences",
    limit=10
)

for memory in results.data:
    print(memory.content)

Using Spaces

spaces.py
# 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:

Or explore related topics: