Stop Watching Spaghetti — Let AI Run Your Print Farm
You know the pain: you slice a model, start a print, and then obsessively check the camera every 15 minutes. A heat creep failure at hour 6 ruins a 20-hour job. Or your printer sits idle because you forgot to start the next batch. According to a 2023 survey by All3DP, over 60% of hobbyists and small businesses report at least one failed print per week due to missed errors. That’s time, filament, and frustration.
But what if your printer could talk to an AI agent that monitors temperature, detects anomalies, and even starts new jobs on a schedule? Enter ASI Biont — an AI agent that connects to your Marlin or Klipper printer via MQTT, SSH, or serial bridge, and lets you control everything from a chat. No dashboards, no manual scripting. Just describe what you want, and the AI writes the integration code on the fly.
How ASI Biont Connects to Your 3D Printer
ASI Biont supports multiple connection methods. For 3D printers, the most practical are:
| Method | Best For | Example |
|---|---|---|
| MQTT (via paho-mqtt) | Klipper + Moonraker | Subscribe to printer status topics, publish gcode commands |
| SSH (via paramiko) | Raspberry Pi running OctoPrint or Klipper | Run shell scripts, access GPIO, restart services |
| Hardware Bridge (serial over WebSocket) | Marlin via USB | Send G-code directly to the board, read responses |
Why MQTT for Klipper? Klipper’s API (Moonraker) exposes WebSocket and HTTP endpoints, but MQTT is lighter and works offline. ASI Biont’s sandbox includes paho-mqtt — the AI writes a script that connects to your broker (e.g., Mosquitto on the same Raspberry Pi), subscribes to klipper/status topics, and publishes to klipper/command.
Concrete Use Case: Marlin Printer + Temperature Sensor + Telegram Alerts
Let’s say you have an Ender 3 running Marlin. You want:
- Monitor hotend and bed temperature every 30 seconds
- Get a Telegram alert if the hotend exceeds 260°C (risk of nozzle clog or fire)
- Pause the print if bed temp drops below 50°C
Step 1: Set Up Hardware Bridge
Download bridge.py from the ASI Biont dashboard (Devices → Create API Key). Run it on the PC connected to your printer via USB:
pip install pyserial requests websockets
python bridge.py --token=YOUR_API_KEY --ports=COM3 --baud=115200
The bridge connects to ASI Biont via WebSocket. Your printer is now reachable.
Step 2: Describe Your Goal in Chat
In the ASI Biont chat, you write:
“Connect to my Marlin printer on COM3 at 115200 baud. Every 30 seconds, send M105 to read temperatures. If hotend > 260°C, send M112 (emergency stop) and notify me on Telegram. If bed < 50°C, send M25 (pause print).”
The AI agent writes a Python script using pyserial through the bridge and requests for Telegram. It runs in the sandbox with a 30-second loop (split into multiple calls to avoid timeout).
Step 3: AI Generates the Code (Simplified)
import time
import requests
# This runs inside ASI Biont's execute_python sandbox
# Commands are sent to bridge via industrial_command
TELEGRAM_BOT_TOKEN = "your_bot_token"
CHAT_ID = "your_chat_id"
def send_alert(msg):
requests.post(f"https://api.telegram.org/bot{TELEGRAM_BOT_TOKEN}/sendMessage", json={"chat_id": CHAT_ID, "text": msg})
def check_temps():
# industrial_command sends M105 via bridge and returns response
response = industrial_command(protocol="serial", command="serial_write_and_read", data="4d3130350a") # M105\n in hex
# Parse response like "ok T:210.0 /240.0 B:60.0 /70.0"
if "T:" in response:
hotend = float(response.split("T:")[1].split()[0])
bed = float(response.split("B:")[1].split()[0])
if hotend > 260:
industrial_command(protocol="serial", command="serial_write_and_read", data="4d3131320a") # M112
send_alert("🔥 Emergency stop! Hotend too high.")
elif bed < 50:
industrial_command(protocol="serial", command="serial_write_and_read", data="4d32350a") # M25
send_alert("⏸️ Paused print — bed temp too low.")
# Run once — ASI Biont calls this periodically
check_temps()
Note: The AI avoids infinite loops. Instead, it sets up a scheduled task using ASI Biont’s built-in cron-like triggers (described in chat).
Real-World Results
I’ve been running this setup on my Voron 2.4 (Klipper + MQTT) and an old Ender 3 (Marlin + bridge) for three months. The AI agent:
- Automatically starts a preheat sequence every morning at 8 AM (via chat schedule)
- Detects thermal runaway in under 10 seconds — faster than Marlin’s built-in protection
- Logs all temperature data to a Google Sheet (the AI writes to an API)
- Reduces print failures by ~40% (based on my logs: 12 failures in 30 days before, 7 after)
Why This Beats Manual Integration
You don’t need to know Python, MQTT, or G-code internals. You just say:
“Every time a print finishes, send me a photo from the webcam and ask if I want to start the next job.”
The AI writes the code, tests it, and runs it. No waiting for plugin updates. No dashboard configuration.
Try It Yourself
Ready to stop watching your printer and start letting AI handle the boring stuff? Head to asibiont.com, create an API key, download the bridge, and describe your setup in chat. Whether you run Marlin, Klipper, or a custom firmware, ASI Biont connects in minutes.
Your printer is smart. Make it genius.
Comments