Voice conversation with arbitrary Rust functions

โš“ Rust    ๐Ÿ“… 2026-04-04    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 1      

surdeus

Forget about MCP, Libertas is the App platform in the AI age

In this example, I demonstrated what a few dozen lines of Rust code can do with Libertas.

Itโ€™s a sprinkler control agent.

  • It should be common sense that an App absolutely needs some data from the user to even start. And no one else can magically guess that data!
    • In this case, a user needs to provide the zone valve, plant type, soil type, etc.
  • During runtime, the app generates and exchanges data with users:
    • The calculated watering schedule
    • A user can set โ€œhold off periodsโ€ to prevent watering during certain times

Before we go further, here is a video of the app in action, having a voice conversation with a user.

SprinklerDemo

For developers

You define the data structure, we take care of the rest.

Configuration data

Configuration data must absolutely be supplied by the user. No one else can guess. Nothing meaningful can be done with zero data.

Configuration data is just the arguments of the process entry function.

sprinkler-rust

Libertas guarantees an automatically generated GUI for configuration, which no one else does.

Runtime data

Runtime data is actually the communication protocol. Forget about MCP, web service, or JSON RPC. You define all your requests and responses inside one single Rust enum, and Libertas takes care of the rest!

In this example, we defined two requests and one response.

  • Request sprinkler zone information, the watering schedule, and the hold-off list.
  • Request to update the hold off list, the periods during which watering is not allowed!

protocol

Libertas guarantees an automatically generated GUI for runtime data, which no one else does.

Agent/Tool server for runtime protocol

An agent/tool server is the server that drives the protocol you defined.

  • Itโ€™s part of the configuration.
  • It is implicitly created by the user.
  • In this example, the user created one agent/tool server for each sprinkler zone.

The way we let users create servers is quite original.

Automatically LLM tools

Each request in your protocol design can be registered as a tool call to LLM. So each agent/tool server can create many tool calls.

Libertas automatically generates all schemas/documents for LLM.

Documentation

A document editor will pop up whenever the developer commits app code.

You need to document every single node of your public data structures!

Documentation is crucial for LLM performance. In this example, at first, GPT 5.4 refused to add a hold-off period, insisting that it not overlap with the scheduled watering period, until I modified the document to state that the schedule is dynamically calculated and that the hold-off is mandatory for users.

Screenshot Capture - 2026-04-03 - 20-10-16

Itโ€™s too simple and powerful

Programmers and users can both be humans and AI. Libertas is for the best for humans.

  • Any tool call can be used by an AI, or a human (with an automatically generated GUI, guaranteed), or another App. Many Apps will run perfectly without AI, as they should!
  • Supports all modern languages. The advantage of Rust is that the OS footprint is only about 50KB. You can run arbitrary Apps with 10,000s of lines of Rust code inside your light bulb.

All languages are interoperable. For example, you can write a TypeScript App to control the Rust sprinkler App. The design is optimal with or without AI.

Just imagine what kind of conversation you can have with your light bulb!

Sprinkler demo source code on GitHub

You can successfully build the code. Once it's submitted to Libertas, it will become an App, and anyone can share their Apps with billions of others.

1 post - 1 participant

Read full topic

๐Ÿท๏ธ Rust_feed