Why Connect Jetson Orin + DeepStream to an AI Agent?
You’ve got a Jetson Orin or Nano sitting on your desk, running NVIDIA’s DeepStream SDK with TensorRT-optimized pipelines. It’s processing eight HD video streams at 30 FPS, detecting people, vehicles, and license plates with 95% accuracy. But the detections are just sitting there — in a log file, on a screen, or in a local database. You need those insights to trigger real-world actions: send an alert when a person enters a restricted zone, log every license plate to a remote server, or adjust a PTZ camera’s pan/tilt based on object location.
Manually writing a script to connect DeepStream’s output to your cloud, Slack, or SMS gateway takes hours. You’d need to set up an MQTT broker, write parsers for the DeepStream metadata, handle reconnections, and test edge cases. That’s where ASI Biont comes in. Instead of coding the integration yourself, you describe what you need in natural language, and the AI agent writes the Python code on the fly, connecting your Jetson’s DeepStream pipeline to any external system — MQTT, HTTP, Modbus, or even a serial port.
In this guide, I’ll show you exactly how to integrate a Jetson Orin running DeepStream with ASI Biont. We’ll use the execute_python method (the AI writes a script that runs in a sandbox) combined with MQTT to bridge DeepStream’s object-detection metadata to the AI agent. You’ll see real code, a working pipeline config, and a step-by-step workflow.
Which Connection Method Does ASI Biont Use?
ASI Biont supports 14+ connection protocols, but for Jetson Orin + DeepStream, the most practical method is MQTT via execute_python. Here’s why:
- DeepStream outputs metadata as C++/Python structs (NvDsObjectMeta). You can write a small Python plugin that publishes detection data to an MQTT topic (e.g.,
jetson/detections). - ASI Biont’s sandbox has
paho-mqttinstalled. The AI agent can subscribe to that topic, parse JSON payloads, and trigger actions — like sending a Telegram alert or logging to a database. - No need for a separate bridge or hardware interface — the Jetson and the ASI Biont cloud communicate over the internet via a standard MQTT broker (Mosquitto, HiveMQ, or AWS IoT Core).
For a fully local setup (air-gapped), you could use the Hardware Bridge with a serial or Ethernet link, but MQTT is the cleanest for edge AI scenarios.
Step-by-Step Integration: DeepStream → MQTT → ASI Biont
1. Set Up Your DeepStream Pipeline
First, ensure you have DeepStream SDK 6.4+ installed on Jetson Orin (JetPack 6.0). Create a pipeline file (pipeline.conf) that runs four HD streams with a pre-trained TensorRT model (e.g., resnet18_peoplenet):
[application]
enable-perf-measurement=1
perf-measurement-interval-sec=1
[source0]
enable=1
type=uri
uri=rtsp://camera1.local:554/stream1
[source1]
enable=1
type=uri
uri=rtsp://camera2.local:554/stream1
[primary-gie]
enable=1
config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/config_infer_primary_peoplenet.txt
[sink0]
enable=1
type=nvoverlay
[sink1]
enable=1
type=message
config-file-path=/opt/nvidia/deepstream/deepstream/samples/configs/deepstream-app/cfg_mqtt.txt
The sink1 with type=message sends metadata to a message broker. You’ll need to configure DeepStream’s MQTT sink (cfg_mqtt.txt):
protocol=MQTT
broker-host=test.mosquitto.org
broker-port=1883
topic=jetson/detections
client-id=jetson-orin-1
Now launch the pipeline:
deepstream-app -c pipeline.conf
You should see detections flowing to the MQTT topic jetson/detections as JSON messages like:
{
"source_id": 0,
"frame_num": 1234,
"objects": [
{
"class": "person",
"confidence": 0.92,
"bbox": [0.1, 0.2, 0.3, 0.4]
}
],
"timestamp": 1710403200
}
2. Connect ASI Biont to the MQTT Topic
Now open the ASI Biont chat interface. Describe what you want:
"Subscribe to MQTT topic 'jetson/detections' at test.mosquitto.org:1883. For every detection with confidence > 0.8 and class 'person', send me a Telegram alert with the source camera ID and timestamp."
ASI Biont will write a Python script using paho-mqtt and run it in the sandbox. Here’s what the AI generates:
import paho.mqtt.client as mqtt
import json
import asyncio
import telegram
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID"
def on_message(client, userdata, msg):
payload = json.loads(msg.payload.decode())
for obj in payload.get("objects", []):
if obj["class"] == "person" and obj["confidence"] > 0.8:
alert_text = f"Person detected on camera {payload['source_id']} at {payload['timestamp']}"
# Send Telegram message (async call inside sync callback)
loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(
telegram.Bot(token=TELEGRAM_BOT_TOKEN).send_message(
chat_id=TELEGRAM_CHAT_ID, text=alert_text
)
)
loop.close()
client = mqtt.Client()
client.on_message = on_message
client.connect("test.mosquitto.org", 1883, 60)
client.subscribe("jetson/detections")
client.loop_forever()
Wait — the sandbox has a 30-second timeout, so loop_forever() will get killed. The AI actually handles this by using client.loop_start() in a non-blocking way, or by using an async MQTT library. The final script from the agent will look like:
import paho.mqtt.client as mqtt
import json
import asyncio
import telegram
TELEGRAM_BOT_TOKEN = "YOUR_BOT_TOKEN"
TELEGRAM_CHAT_ID = "YOUR_CHAT_ID"
async def send_alert(text):
bot = telegram.Bot(token=TELEGRAM_BOT_TOKEN)
await bot.send_message(chat_id=TELEGRAM_CHAT_ID, text=text)
def on_message(client, userdata, msg):
payload = json.loads(msg.payload.decode())
for obj in payload.get("objects", []):
if obj["class"] == "person" and obj["confidence"] > 0.8:
alert_text = f"⚠️ Person detected on camera {payload['source_id']} at {payload['timestamp']}"
asyncio.run(send_alert(alert_text))
client = mqtt.Client()
client.on_message = on_message
client.connect("test.mosquitto.org", 1883, 60)
client.subscribe("jetson/detections")
client.loop_start()
# Keep the script alive for 25 seconds (sandbox limit)
import time
time.sleep(25)
client.loop_stop()
The AI creates a working, sandbox-safe integration in seconds. You don’t write a single line of code — just describe what you need.
3. Real-World Scenario: Automated Security Gate
Imagine a factory with four HD cameras covering entry points. Each camera runs through DeepStream on a single Jetson Orin, detecting people and vehicles. You want to:
- Log every detection to a PostgreSQL database for compliance.
- Send an SMS if a person enters a restricted area after hours.
- Pause the pipeline if the GPU temperature exceeds 80°C.
With ASI Biont, you describe all three rules in one chat message. The AI writes a single Python script that:
1. Subscribes to the MQTT topic.
2. For each detection, inserts a row into PostgreSQL (using psycopg2).
3. Checks the timestamp — if it’s after 10 PM and the class is “person,” sends an SMS via Twilio.
4. Periodically reads the GPU temperature via SSH (using paramiko) and if >80°C, publishes an MQTT command to stop the pipeline.
Here’s a snippet of what the AI generates for the temperature check:
import paramiko
import paho.mqtt.client as mqtt
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
ssh.connect("192.168.1.100", username="nvidia", password="nvidia")
stdin, stdout, stderr = ssh.exec_command("cat /sys/class/thermal/thermal_zone*/temp")
temp_c = int(stdout.read().decode().strip()) / 1000
if temp_c > 80:
client = mqtt.Client()
client.connect("test.mosquitto.org")
client.publish("jetson/control", json.dumps({"action": "stop_pipeline"}))
print(f"GPU temp {temp_c}°C exceeded limit, sent stop command")
ssh.close()
Performance: 30 FPS on 8 HD Channels, Zero Cloud Dependency
A common concern with edge AI is latency. DeepStream on Jetson Orin processes 8 HD streams at 30 FPS entirely on-device, using TensorRT-optimized models. The MQTT messages are small (a few hundred bytes per frame), so network overhead is negligible. ASI Biont’s agent runs in the cloud, but the MQTT broker can be on-premises (e.g., Mosquitto on a local server) for air-gapped deployments. The AI agent only receives the metadata you choose to publish — raw video never leaves the Jetson.
According to NVIDIA’s benchmarks (Jetson Orin NX 16GB, DeepStream 6.4, ResNet-18 PeopleNet), you get:
| Configuration | FPS | Power (W) |
|---|---|---|
| 4 streams, 720p | 60 | 15 |
| 8 streams, 1080p | 30 | 25 |
| 16 streams, 720p | 25 | 35 |
(Source: NVIDIA DeepStream Developer Guide, 2025)
What If You Need a Different Protocol?
ASI Biont’s execute_python isn’t limited to MQTT. The sandbox has libraries for:
- Modbus/TCP (pymodbus) — read PLC registers when DeepStream detects a safety violation.
- OPC UA (opcua-asyncio) — write detection counts to a factory’s OPC UA server.
- HTTP API (aiohttp) — push metadata to a custom dashboard.
- SSH (paramiko) — remotely restart the DeepStream pipeline.
You just tell the AI what you need, and it generates the appropriate script. No plugins, no SDKs, no waiting for feature updates.
Why This Changes Everything
Traditionally, integrating edge AI with business logic requires a dedicated backend developer, a message broker setup, and hours of debugging. With ASI Biont, you replace all that with a single conversation. The AI understands your hardware (Jetson Orin, DeepStream, MQTT), writes production-ready Python, and runs it in a secure sandbox. If something breaks, you describe the error in chat, and the AI debugs and fixes the code.
Try it yourself: head over to asibiont.com, create an API key (Devices → Create API Key → Download bridge), and tell the AI agent: “Connect to my Jetson Orin’s DeepStream pipeline via MQTT at test.mosquitto.org:1883, subscribe to topic ‘jetson/detections’, and log all person detections to a local CSV file.” Watch as the AI writes and executes the integration in seconds.
Conclusion
Connecting a Jetson Orin running DeepStream to an AI agent isn’t just a cool demo — it’s a practical way to turn high-FPS video analytics into automated actions. By using MQTT as the bridge and ASI Biont’s execute_python method, you eliminate manual coding and reduce integration time from hours to minutes. Whether you’re building a security system, a factory monitoring solution, or a smart retail analytics platform, this approach scales from one camera to hundreds.
Ready to integrate your Jetson with an AI agent? Go to asibiont.com, start a chat, and describe your pipeline. The AI will handle the rest.
Comments