r/FlutterDev • u/creatixdev • 29d ago
Plugin Tandem 0.3.0: an agent composes Flutter views from your own widget catalog
https://tandem.leancode.co/Hi fellow Flutter enthusiasts!
For some time now, I am building tandem. Flutter package that basically aims to make smart interfaces simple/possible. It started with excitement about AG-UI and idea to bring its capabilities to Flutter.
Now it is a bit more... I am building agents in my day to day work, so I am kind of obligated to read about all the GenAI stuff. It paid off now, at least that's what I want to believe.
I did spend a lot of time reading about different fresh protocols, ideas etc. I played with those a lot, and understood that AG-UI + A2UI make a perfect combination and are extremely powerful.
It allows to make user interfaces that are personalised to each and every user. The demo attached highlights it.
It is extremely tricky though. I've spent a lot of time designing the API, but it still might change.
tl;dr: you can specify catalogs of already existing components and pass it to a view that agent can use.
@TandemCatalog([
ArrivalCard,
ArrivalColumn,
NextStop,
RideOption,
HostNote,
HotelNote,
])
final class const ArrivalCatalog() with _$ArrivalCatalog;
const TandemView(catalog: ArrivalCatalog()),If it sounds interesting, you can read more at the website with documentation -> https://tandem.leancode.co/
The demo is on the website above, but also here - https://x.com/creatixdev/status/2117230943975182340
It is just a beginning. Today, the 0.3.0 version is kind of an MVP I had in mind. A lot of polishing in improvements await. And.. facing the consequences of bad decisisions that probably happened along the way
Contributors are very welcome!! Users as well of course
2
u/Mathely-Caritino 28d ago
nice API design tbh. What happens if the LLM returns a malformed response or tries to call a component not in the catalog, is there a built-in fallback widget?
1
u/fabier 29d ago
I'm trying to understand. How is this different than building a handful of widgets and showing them based on the data available in some state object?
Sorry. I like to think of myself as pretty advanced when it comes to AI but this isn't clicking for me and I feel like it should be haha.