Docs / Contact / sdks/overview
SDKs & Clients
Tendrl provides official SDKs and clients to connect your devices, services, and applications to the Contact platform. Each SDK handles authentication, message batching, offline resilience, and reconnection so you can focus on your application logic.
Choose Your SDK
| SDK | Language | Best For | Protocol |
|---|---|---|---|
| Python SDK | Python 3.8+ | Servers, Raspberry Pi, data pipelines | HTTPS |
| Go SDK | Go 1.21+ | High-performance services, edge gateways | HTTPS |
| JavaScript SDK | JavaScript/Node.js 16+ | Web apps, Node.js services, React dashboards | HTTPS |
| MicroPython Client | MicroPython | ESP32, Pico W, embedded microcontrollers | MQTT |
| Nano Agent | Any (Unix socket) | Language-agnostic local gateway, high-throughput | HTTPS |
Quick Comparison
Feature Matrix
| Feature | Python | Go | JavaScript | MicroPython | Nano Agent |
|---|---|---|---|---|---|
| Message publishing | Yes | Yes | Yes | Yes | Yes |
| File transfer² | Yes | Yes | Yes | Yes | No |
| Inbound routing | Yes (@client.on()) |
Yes (client.On()) |
Yes (client.on()) |
Yes (@client.on()) |
Callback only |
| Inbound state | Yes (@client.on_state(), poll) |
Yes (@client.on_state(), poll) |
Yes (client.onState(), poll) |
Yes (@client.on_state(), MQTT push) |
No |
| Dynamic batching | Yes | Yes | Yes | Yes | Yes |
| Offline storage | SQLite | BoltDB | IndexedDB | BTree | BoltDB |
| Automatic heartbeats | Yes | Yes | No | Yes | Yes |
| Manual heartbeat method | No | Yes | Yes | No | Yes |
| State table (write) | REST¹ | REST¹ | Yes | Yes | Yes |
| State table (read) | REST¹ | REST¹ | Yes | REST¹ | Yes |
| Tether decorator | Yes | Yes | No | Yes | No |
| Video streaming | No | No | No | Yes | No |
| On-device vision | No | No | No | Yes (OpenMV) | No |
| Remote deployment (OTA)³ | No | No | No | Yes (add-on) | No |
| React hooks | No | No | Yes | No | No |
| Headless mode | Yes | Yes | No | No | No |
¹ REST = no SDK wrapper; call the /entities/status-table REST endpoints directly (GET to read, PATCH to merge, PUT to replace). The MicroPython client can _write_ state over MQTT (update_state/replace_state) but has no on-device read, so read it back over REST.
² File transfer = send_file / check_files / download_file (Go/JS use SendFile/CheckFiles/DownloadFile). Files are scanned by Surface before delivery and are deleted on download. See File Transfer.
³ Remote deployment (OTA) = pushing application code to a device from the dashboard with automatic rollback, via the updater add-on. Selected at provision time (on by default for Full). See Remote Deployments.
Heartbeats: "Automatic" means the client sends heartbeats on its own once started (no code needed). A "manual heartbeat method" lets you push a heartbeat with your own system metrics on demand. The JavaScript SDK has no system-metrics source, so it exposes only the manual sendHeartbeat method and does not send heartbeats automatically.
Operating Modes
Most SDKs support two modes:
- Managed mode (default): Background threads/goroutines handle batching, heartbeats, offline storage, and connectivity monitoring automatically.
- Headless mode: Direct API calls with no background processing. You control when messages are sent. Best for simple scripts or when you need full control.
The Nano Agent is a standalone binary that provides managed-mode features to any language via a local Unix socket. Use it when your language doesn't have an SDK or when you want a single process handling all Tendrl communication.
Common Concepts
All SDKs share the same core patterns:
Authentication
Every SDK authenticates with an API key tied to a Contact entity. You can pass it directly or set the TENDRL_KEY environment variable.
Publishing Messages
client.publish(data, tags)
Messages are JSON objects sent to Contact. Tags control how messages are routed to flows and connectors. All SDKs accept any JSON-serializable data.
Receiving Messages
Pass a callback when constructing the client, or use tag-based routing (@client.on() on MicroPython, client.On() on Go, client.on() on JavaScript). The SDK delivers incoming messages automatically; see each SDK's Getting Started page.
State Table
Each entity has a persistent key-value state table:
- read: Read the full state
- update: Merge new keys
- replace: Overwrite the entire state
Not every client wraps all three. The JavaScript SDK and Nano Agent expose read/update/replace directly; MicroPython exposes update/replace only; Python and Go have no state-table wrappers. In every case you can manage state over the /entities/status-table REST endpoints (GET / PATCH / PUT). See the feature matrix above.
Offline Resilience
When the network is unavailable, messages are stored locally and retried automatically when connectivity returns. Each SDK uses a storage engine appropriate for its platform.
Next Steps
Pick the SDK that fits your stack and follow the Getting Started guide:
- Python SDK: Servers, Raspberry Pi, data collection
- Go SDK: High-performance edge and server applications
- JavaScript SDK: Web and Node.js applications
- MicroPython Client: Microcontroller devices
- Nano Agent: Language-agnostic local gateway
Tendrl