Extelligence-ai/bagel
Query robotics, drone, and IoT data in plain English through an MCP server, with an intelligent edge data reduction pipeline that keeps only the data that matters.
📦 Bagel – Natural‑language analytics for robotics, drones & IoT logs
What it is – Bagel (by Extelligence) is a Docker‑based service that lets you talk to your robot, drone or IoT data in plain English. You ask a question (e.g., “Did my IMU overheat?” or “Keep 10 s around every hard brake”) and Bagel turns the request into deterministic DuckDB SQL that runs over the log data. The generated SQL is shown to you, so the answer is auditable and not a black‑box LLM guess.
Why it matters – In many robotics pipelines the data is huge and stored in formats like ROS 2 bags, PX4 logs, MCAP, CAN captures, MQTT streams, etc. Extracting insights normally requires writing scripts, grepping, or manually loading the data into tools such as PlotJuggler. Bagel moves the language‑understanding part to an LLM (Claude Code, Gemini, Codex, Ollama, etc.) but keeps all heavy lifting—filtering, aggregation, joins—in SQL that runs locally on the robot or edge server. This gives you:
- Natural‑language interface – no need to know the exact topic names or SQL syntax.
- Transparent, reproducible queries – you see the exact SQL that produced the answer and can edit it.
- Edge data‑reduction – a single sentence can define a detector that runs on‑device, keeps only the relevant time windows, and ships a tiny bag instead of gigabytes of raw data.
- Broad format support – ROS 1/2, PX4, ArduPilot, Betaflight, automotive MDF4/CAN, MQTT, PostgreSQL/TimescaleDB, InfluxDB 3, and more.
🚀 Key features (as listed in the README)
- Plain‑language queries – ask anything about your logs without learning a DSL.
- Deterministic SQL backend – every calculation is a DuckDB query you can audit.
- Natural‑language pipelines – describe an event‑driven reduction in one sentence, preview the pipeline, then run it across a fleet or at the edge.
- MCP‑enabled LLM support – works with Claude Code, Gemini CLI, Codex, Cursor, Ollama, etc.
- Dockerized containers – ready‑to‑run images for ROS 2 (Kilted, Jazzy, Iron, Humble), ROS 1, PX4, ArduPilot, Betaflight, and generic IoT.
- Extensible via POML – add new “tricks” (custom capabilities) by dropping a
.pomlfile; no rebuild required. - Integrations – export results to PlotJuggler, Rerun, Foxglove/Lichtblick, Cloudini point‑cloud compression, Slack alerts, and LeRobot training datasets.
🛠️ How it works (high‑level flow from the README)
- Metadata discovery – Bagel reads the log’s schema (topics, fields, timestamps).
- Prompt interpretation – an LLM parses your natural‑language request and decides which topics are relevant.
- Arrow conversion – relevant messages are written to an Apache Arrow file.
- SQL generation – the LLM produces a DuckDB SQL query that implements the requested calculation.
- Execution & iteration – DuckDB runs the query; if the answer needs more detail, the loop repeats until a satisfactory response is formed.
- Result delivery – the answer (and the SQL) are sent back to the LLM client; optional pipeline steps can export MCAP snippets, CSV/Parquet, or push to cloud storage.
🎯 Typical use cases
| Situation | How you would ask Bagel |
|---|---|
| Quick health check | “Summarize the metadata of this ROS2 bag.” → returns a concise report card. |
| Detect a fault | “Did the IMU sensor overheat?” → runs a statistical check on temperature topics. |
| Event‑driven trimming | “Keep 10 s before and after every deceleration harder than –10 m/s², drop the rest.” → creates an edge‑reduction pipeline that shrinks a 2 GB log to ~160 MB. |
| Cross‑topic analysis | “What’s the correlation between current and voltage in /spot/status/battery_states?” – a single SQL join computes corr(). |
| Batch processing | “Run this pipeline on every bag in folder X.” – Bagel runs the same deterministic pipeline across a fleet and produces a combined report. |
| Offline work | Use Ollama (e.g., qwen3:8b) locally with ollmcp so both data and model stay on the machine. |
🏁 Getting started (quick‑start steps from the README)
- Install Docker Desktop and an MCP‑enabled LLM (Claude Code is the default example).
- Clone the repo and start the appropriate Docker compose service, e.g.:
git clone https://github.com/Extelligence-ai/bagel.git && cd bagel docker compose run --service-ports ros2-kilted - Connect the LLM (Claude Code example):
claude mcp add --transport sse bagel http://localhost:8000/sse - Prompt the model – open Claude (or any MCP client) and ask a question about your log.
- Optional offline mode – install Ollama, pull a local model, and run
ollmcppointing at the same MCP server.
A one‑liner demo is also provided:
docker run -it --rm ghcr.io/extelligence-ai/bagel/px4:latest demo
which prints a health‑report for a bundled PX4 flight log.
⚠️ Known limitations (as listed)
- Automotive MDF4/CAN support is still beta (tested only with generated files).
- Reduction ratios are workload‑dependent and not benchmarked; the README numbers are illustrative.
- The MCP endpoint has no authentication and only binds to
localhost– you must add a proxy if exposing it. - Small local LLMs (4‑8 B) may struggle with multi‑step pipelines; larger models give more reliable tool selection.
- Live‑database end‑to‑end tests for InfluxDB/Postgres run only against a user‑provided instance, not in CI.
📄 License
Apache License 2.0 (open source).
Bottom line – Bagel is a practical bridge between natural‑language LLM interfaces and rigorous, SQL‑based analysis of robotics, drone and IoT telemetry. It lets engineers ask high‑level questions, audit the underlying computation, and automatically trim massive logs at the edge, all from a Docker‑isolated environment.
Related
- Project
- Project
- Project
- Project
- Project