DialoStack: task-oriented spoken dialogue for ROS 2, with the LLM kept out of the control flow

I’ve been working on getting a robot to run structured spoken conversations, things like a clinic intake (collect name, age, reason for the visit, allergies…), explaining a topic and checking the person understood it, or running a short quiz. Wiring an LLM straight into the speech loop gets you a nice demo quickly, but in my tests it was hard to rely on: it drifted off task, re-asked things it already had, or never decided the conversation was over.

So I built DialoStack, a set of ROS 2 packages where the dialogue flow is plain Python (states, turn limits, confirmation, cancellation) and the LLM is only used to interpret what the user said and to phrase the next reply.

It started as my bachelor’s thesis, and I presented the work at WAF 2026, the International Workshop on Physical Agents. I’ve put a lot of care into it and I don’t want it to end up as another thesis repo that nobody touches after graduation, so I’m releasing it as open source (MIT) and plan to keep working on it. Feedback from people doing HRI would help a lot.

A slot-filling task in the web monitor: the frame on the right is filled turn by turn and confirmed before the action returns.

Demo on a real NAO (4 min): Dropbox

How it’s used

Everything goes through one action. You describe the task, and if you don’t pass a schema the engine generates one:

ros2 action send_goal --feedback /dialog/execute_task \
  ros2_dialog_interfaces/action/DialogTask \
  "{task_description: 'Take a coffee order: drink type, size and customer name',
    dialog_mode: 'slot_filling', domain: 'coffee shop'}"

The robot asks for whatever is missing, handles corrections (“actually, make it a large”), confirms, and returns the filled frame as JSON in the result. You can also pass your own schema and a partially filled frame to resume an interrupted dialogue. There is a BehaviorTree.CPP leaf node that wraps the same action.

What’s in the repo

  • ros2_dialog_manager: the FSM and three strategies (slot filling, explanation, quiz), with a registry for adding new ones
  • ros2_llm_manager: LLM inference as an action with per-dialogue sessions; Gemini or Ollama behind the same interface, so it can run fully local
  • speech_io: faster-whisper + Silero VAD for STT, Piper for streaming TTS; the mic is muted while the robot speaks
  • vision_io (optional): facial emotion and lip activity, published as topics and added to the prompt context
  • robots/nao: talking gestures and eye-LED feedback, in RViz and on the real robot (via nao_lola)
  • evaluation/: ROS-free benchmarks against hand-annotated data (slot extraction P/R/F1, intent confusion matrix, quiz grading, simulated end-to-end dialogues)

The deterministic core has 173 unit tests that run with plain pytest.

Status and limitations

  • ROS 2 Jazzy on Ubuntu 24.04, built from source. No binaries yet.
  • You don’t need a robot: a microphone and speakers are enough.
  • Local models via Ollama work and keep all data on the machine, but small ones are noticeably less accurate than Gemini.
  • The only embodiment layer so far is NAO. The core just publishes /is_speaking and /user_vad, so mapping those to another robot should be straightforward, but I haven’t done it.

Related work

llama_ros and whisper_ros provide LLM and STT inference as ROS 2 nodes, and ROS4HRI defines common HRI interfaces. DialoStack sits a level above those: it’s the dialogue management layer that decides what to ask next and when a task is done. In principle the STT and LLM nodes could be replaced by those packages, though I haven’t tried it yet.

Feedback I’m looking for

  • Does a single DialogTask action with a free-text task description feel like the right interface, or would you rather define dialogues declaratively (YAML, BT)?
  • If you work with other social robots (Pepper, TIAGo, …), what would you need from the embodiment layer?
  • Dialogue types you’d use that aren’t covered by slot filling / explanation / quiz.

A few issues are tagged good first issue if anyone wants to contribute (an OpenAI-compatible provider, more TTS voices, tests for the quiz and explanation strategies). Bug reports are just as welcome: I’d rather hear what breaks than have it fail quietly on someone’s robot.

Repo: GitHub - aquintan4/DialoStack: Task-oriented spoken dialogue for ROS 2 robots. Deterministic dialogue strategies (slot filling, explanation, quiz) powered by pluggable LLMs (Gemini, Ollama), with full speech and vision I/O. · GitHub
Paper (WAF 2026, “Deterministic Control and Confined LLM Reasoning in Task-Oriented Dialogue for Service Robots”, p. 20): https://waf26.unex.es/wp-content/uploads/2026/08/WAF2026_Proceedings_Final.pdf

2 Likes

Hi, congratulations on releasing DialoStack, and the idea of keeping the LLM out of the control flow is close to how I build my own work.

On your interface question, my view from building a schema-driven runtime: free text for the task description is a nice convenience, but when the engine generates the schema itself, the model is defining its own constraints. For anything that ends in an action (a device, a robot, a record that triggers something), I’d want the schema declared explicitly or at least shown and approved before it is used, and I’d keep the generated option for low-stakes dialogues.

One question: before the filled frame is returned, is there a place to declare bounds on values (for example, an age range or an allowed list), and what happens when the model extracts something outside them?

For transparency, I’m building a runtime that validates AI actions against declared device schemas (xZane). I’m not selling anything, just comparing notes.

Best,
Julio

Hi Julio,

Thank you for taking the time to read through the project and write such a thoughtful reply. It means a lot, especially from someone working on the same kind of problem.

On the schema, I think we’re closer than it might seem. Letting the engine generate the schema is meant for the exploration phase: you describe the task in plain language, try the dialogue, and iterate quickly until it collects what you actually need. Once you’re happy with it, you pin it down by passing your own frame_schema_json. From then on the LLM never touches the schema, and you get a fixed contract your robot application can rely on: the same slot names, types and allowed values every time, ready to be consumed by whatever acts on them. So for anything that triggers an action, I’d also go with a declared schema, as you suggest.

On bounds, there are two layers:

  • Structural checks, in code. Slots are typed (str, int, float, bool, list of strings), and a value that can’t be coerced to the slot type is discarded. A slot can also declare canonical_values, a closed set of allowed values. If the model extracts something outside the set, it’s dropped, the slot stays empty, and the robot asks again, offering the valid options.
  • Semantic check, with the person. A spoken pipeline can fail at several points: STT mishearing a word, the model extracting the wrong value, the user misspeaking. So before the frame is returned there’s an explicit confirmation phase. The robot reads the collected data back, and the user either confirms it or corrects whatever is wrong. The task only succeeds once the person has agreed the data is right.

Numeric ranges are an excellent idea, and they fit naturally into the design. Right now an int slot accepts any integer, so an out-of-range age would only be caught at confirmation. Declaring min/max in the slot schema would extend the structural layer with exactly the same reject-and-reask behaviour that canonical_values already has, catching the error before it ever reaches the person. It’s a small change with a clear benefit, so I’ll be adding it. Thanks for the suggestion.

Validating AI actions against declared device schemas sounds like the same principle applied one level further down, at the actuator. I’d be glad to keep comparing notes.

Thanks again,
Álvaro

Hi Álvaro,

Thanks, and glad min/max made it in. The confirmation phase is a good design: it puts the person in the loop on the data before anything acts.

One question for context: is DialoStack running anywhere with real users yet, or is it still at the project stage? I ask because I’m trying to find where a checked boundary between the confirmed request and the robot’s action matters most to people who actually deploy.

Happy to keep comparing notes.

Best,
Julio

P.S: Si hablas español podemos cambiar :slight_smile:

Hi Julio,

Honest answer: still at the project stage. It has run in demos on a real NAO, including a clinic intake scenario, and in testing at the university, but I don’t know of anyone running it with real users yet.

Getting it into the hands of real users is what I’m pushing hardest for right now. Since this post I’ve tried to collect all the feedback I could, here and elsewhere, and turn it into changes that make DialoStack easier to adopt. Your suggestion on bounds was one of them:

  • Numeric bounds, as you saw (minimum/maximum, exclusive variants, and range conditions between slots).
  • Four LLM providers behind the same interface: Gemini, OpenAI, Claude and Ollama. The local option matters for privacy-sensitive settings like the clinic one, since no data leaves the machine.
  • Two new strategies, a guided procedure (walking someone through steps) and a roleplay mode for practice conversations, on top of slot filling, explanation and quiz.
  • A Docker image with one-command setup on Linux and Windows, a CUDA variant for faster speech recognition, and browser audio, so the GUI page itself can act as microphone and speaker.
  • Refreshed docs and a project page: DialoStack · Task-oriented spoken dialogue for ROS 2 robots

So the question I’m now stuck on is the same one you’re asking from the other side: how to reach the people who actually deploy. Traffic so far is modest and nobody has reached out with a real use case, which I suppose is normal for a young project, but I’d like to do better than waiting. Do you have any advice? If you’ve found good ways to reach those teams for xZane, I’d love to hear them. And if you see something I’m doing wrong, whether in the project itself or in how I’m presenting it, please tell me. Honest criticism is more useful to me right now than anything else.

And yes, I do speak Spanish! I’d rather keep this thread in English, though, in case it’s useful to someone else or anyone wants to jump in.

Best,
Álvaro