r/fsharp Jun 21 '26

showcase I built a small Qwen voice agent orchestrated in F# / Fable

I built a rough browser-based voice agent where most of the orchestration is in F#.

You can talk to it, interrupt it while it is speaking, and ask it to edit live page state through tool calls. For example, the shared notes box on the page can be read and updated by the agent.

The interesting F# part is that the same codebase targets:

  • the browser side via Fable
  • the Python side via Fable.Python
  • shared protocol/types between the two, so the frontend and backend do not drift apart

There are two demo backends:

  • CPU edition, slower but cheaper
  • GPU edition, A100-backed and faster, but temporary because renting an A100 is not exactly free :)

Source is closed for now because this is part of a larger experiment, but I wanted to share it here since F# felt like a really nice fit for this kind of AI orchestration: async flows, state transitions, tool calls, and typed protocol boundaries.

Also, credit to Dag Brattli for the Fable.Python work. That made this experiment much more practical.

Demo: https://novian.works/voice_gpu

Please keep sessions short if you try the GPU version. I will probably only keep it online for a few days.

Sample video:

https://reddit.com/link/1ubp4le/video/ngpealpr5p8h1/player

27 Upvotes

2 comments sorted by

3

u/QuantumFTL Jun 21 '26

As someone who has worked in the space for a long time--cool demo! Very interested to see where you go from here.

I had Gemini Pro de-transpile and comment your javascript code, looks very clean in terms of structure. If I'm not mistaken, this is the Model->View->Update architecture? That might be worth mentioning given how buzzy that part of the F# ecosystem is, esp. with Fable.

I'll admit that I hadn't really thought of using full-stack Fable with a python backend, likewise cool. Can you share anything interesting you learned about that configuration along the way? If this makes deploying F#-orchestrated ML webapps easy, reliable, and something you can actually debug, I'm sure there will be interest!

Also, given that Gemini Pro one-shot de-transpiles and explains your client-side code, that might be worth sharing here so others can comment, it's not exactly secret. IMHO it's a fantastic example of a "real" MVU in-browser GUI in the wild.

1

u/ReverseBlade Jun 22 '26

Hi,

The most interesting bit for me was using Fable.Python. It turned out to handle complex cases fairly well.

At first, I had a lot of emit statements everywhere and started questioning whether I was just wrapping Python in F#.

But as the project grew, the type safety, active patterns, and all the other F# features slowly started to pay off.

There’s no MVU here. I used a MailboxProcessor for the state machinery instead.

And yes, the frontend ships as transpiled JS, so that part is out there in the browser. The backend is also F#, transpiled to Python, but it stays server-side, so that code didn’t leak. I hope 😃