What is a flow

A flow is a whole job done by several components together, such as a search: the bar, the screen it opens, your location and a place picked for you.

What you get

All its components and the glue between them. The glue remembers where the person is, what they picked and what opens next, so one part hands over to the other without a jump. One prompt brings all of it into your project.

Checked before it ships

Every flow goes through a careful review before it is released, and is tested in the main browsers: Safari, Chrome and Firefox, on computers and on phones. An AI agent also has to add it to an empty app from the prompt alone.

The awkward cases and the errors are built in, wherever they can happen to it:

  • Loading, nothing found, no connection, something failed, try again.
  • A finger that changes its mind halfway, a double tap, a very fast swipe.
  • Long words, narrow screens, light and dark.
  • A keyboard, a screen reader, and less motion for those who ask for it.

Your server and your data are yours: connect them, then try your own errors once.

Make it yours

There are four ways, lightest first, and your agent knows them from the prompt:

  1. Settings: switches, words and data the flow takes.
  2. Style: one font, colour or radius for every part, or for just one of them.
  3. Slots: your component in place of one of ours.
  4. Code: anything else. The files are yours.

I copied a flow. Can I change the buttons?

Yes. Their words, colours and corners are usually settings. For a button of a whole other design, your agent changes the component it belongs to.

Tell your agent: “Make the buttons in this flow look like the buttons in my app.”

Can I change the font?

Yes. Set --airflib-font once and every part of the flow follows.

Tell your agent: “Use my app's font everywhere in this flow.”

Can I swap one part for my own?

Yes. Every component in a flow sits in a slot: a place with a short list of what goes in and what comes back. Your component follows that list and the flow keeps working.

Tell your agent: “Put my own component in this flow's slot. Follow the slot's types.”

Can I throw a part of the flow away?

Yes. Some parts have a switch. For the others your agent takes the step out of your copy of the flow and joins up what is left.

Tell your agent: “Remove this step from the flow, connect what is left and check it still works from start to end.”

Can I add a step of my own?

Yes. A flow tells your app what happened: something picked, opened or closed. Your step starts from there. A step in the middle goes into your copy of the flow.

Tell your agent: “After someone picks an item, show my own confirmation screen.”

How does it get my real data?

It starts with samples, so it works at once. Then you give it your items, or your function where it needs to look something up.

Tell your agent: “Connect this flow to my real data. Show me which functions you will use before you change them.”

I only want one part of it.

Take that component by itself. Every component in a flow also works alone and has its own prompt.

How do I add one?

The same five steps as for a component, in pictures: How it works.