MagStack™ SDK
Official SDK for building with MagStack™ magnetic clustering technology
MagStack™ SDK
NEWBuild with magnetic clustering technology
MagStack™ enables modular AI computing through magnetically-coupled device clusters. This SDK provides comprehensive tools for cluster management, distributed inference, model management, and device discovery.
Installation
TypeScript / JavaScript
Python
Quick Start
TypeScript
import { MagStackClient } from '@thox/magstack-sdk';
const client = new MagStackClient({
host: '192.168.1.100',
apiKey: 'your-api-key'
});
// Get cluster status
const cluster = await client.cluster.getStatus();
console.log(`${cluster.nodeCount} nodes, ${cluster.totalTops} TOPS`);
// Run inference
const response = await client.inference.chat({
model: 'llama-3.1-8b',
messages: [{ role: 'user', content: 'Hello!' }]
});Python
from magstack import MagStackClient
client = MagStackClient(
"192.168.1.100",
api_key="your-api-key"
)
# Get cluster status
cluster = client.cluster.get_status()
print(f"{cluster.node_count} nodes, {cluster.total_tops} TOPS")
# Run inference
response = client.inference.chat(
model="llama-3.1-8b",
messages=[{"role": "user", "content": "Hello!"}]
)SDK Components
| Component | TypeScript | Python |
|---|---|---|
| Core Client | ||
| Cluster Management | ||
| Inference API | ||
| Model Management | ||
| Device Discovery | ||
| Coordinator |
Additional Components
Host Daemon (Rust)
The magstackd daemon runs on Thox.ai devices and provides:
- REST API for cluster management
- MS-Link protocol handling
- Power contract negotiation
- Topology management
Module Firmware (C)
Reference firmware for accessory modules:
- MS-Link framing implementation
- Power negotiation
- CRC32 validation
- Safe state handling
API Endpoints
Inference API (Port 8080)
| Endpoint | Method | Description |
|---|---|---|
| /v1/chat/completions | POST | Chat completion |
| /v1/completions | POST | Text completion |
| /v1/embeddings | POST | Generate embeddings |
| /v1/models | GET | List models |
Cluster API (Port 5381)
| Endpoint | Method | Description |
|---|---|---|
| /v1/topology | GET | Get cluster topology |
| /v1/cluster | GET | Get cluster status |
| /v1/nodes | GET | List all nodes |
| /v1/power/contract | POST | Negotiate power |
| /v1/health | GET | Get health status |
Certification Tiers
MagStack™ certification ensures safe interoperability between devices and modules.
Tier C
Power-only (charging + magnetic attach)
Tier B
Power + MS-Link + telemetry
Tier A
Full-trust (power + data + firmware + cluster)
Development
# Build all components
$ make all
# Run tests
$ make test
# Generate test vectors
$ make vectors
# Full CI pipeline
$ make ci
Related Documentation
License & Trademark
MagStack™ SDK is available under the MIT License. MagStack™ is a trademark of Thox.ai LLC. Patent pending.
CONFIDENTIAL AND PROPRIETARY INFORMATION
This documentation is provided for informational and operational purposes only. The specifications and technical details herein are subject to change without notice. Thox.ai LLC reserves all rights in the technologies, methods, and implementations described.
Nothing in this documentation shall be construed as granting any license or right to use any patent, trademark, trade secret, or other intellectual property right of Thox.ai LLC, except as expressly provided in a written agreement.
Patent Protection
The MagStack™ magnetic stacking interface technology, including the magnetic alignment system, automatic cluster formation, NFC-based device discovery, and distributed inference me...
Reverse Engineering Prohibited
You may not reverse engineer, disassemble, decompile, decode, or otherwise attempt to derive the source code, algorithms, data structures, or underlying ideas of any Thox.ai hardwa...
Thox.ai™, Thox OS™, MagStack™, and the Thox.ai logo are trademarks or registered trademarks of Thox.ai LLC in the United States and other countries.
NVIDIA, Jetson, TensorRT, and related marks are trademarks of NVIDIA Corporation. Ollama is a trademark of Ollama, Inc. All other trademarks are the property of their respective owners.
© 2026 Thox.ai LLC. All Rights Reserved.