picoflow.io Docs

BasicFlow tutorial

Start here — an eight-turn deterministic replay

See the whole BasicFlow profile path first: a corrective tool loop, two deterministic LogicSteps, response-driven favorites, validation, nested work, and terminal completion.

BasicFlow’s canonical replay is deliberately deterministic. The real Nest application is exercised end to end, while the test replaces the provider with the checked-in scripted model. That gives developers stable, inspectable responses for every framework behavior this track introduces.

Run it yourself

cd pico-demo
BASIC_FLOW_USE_SCRIPTED_MODEL=1 npm run test:basic-flow

The test sends all eight scenario turns through one session and verifies each active step plus the final persisted profile. No provider call is needed in scripted mode.

Captured deterministic transcript

  1. 1 · Weather

    You
    Hi
    Bot

    Only LA and NYC are supported. Which supported cities would you like to compare?

  2. 2 · Weather

    You
    PDX,PHX
    Bot

    PDX and PHX are unsupported. Only LA and NYC are supported; please enter LA or NYC.

  3. 3 · Weather → FooLogic → GooLogic → Favorites

    You
    LA,NYC
    Bot

    What are your favorite color (red, blue, or white), movie, and season (spring, summer, autumn, or winter)?

  4. 4 · Favorites → Name

    You
    blue, Star Wars, summer
    Bot

    Please provide your full name.

  5. 5 · Name

    You
    John Doe
    Bot

    John Doe cannot be accepted. Please provide a different full name.

  6. 6 · Name → nested InContext work → DOB

    You
    John Wick
    Bot

    Please provide your date of birth.

  7. 7 · DOB → Address

    You
    1/1/2000
    Bot

    Please provide your complete US mailing address.

  8. 8 · Address → completed · completed

    You
    123 K St. Portland, OR 97006
    Bot

    Your address was accepted and your profile collection is complete.

What this proves

PointContract
Turns 1–2WeatherStep stays active until a supported pair of cities is supplied.
Turn 3Tool work advances through two LogicSteps without a model decision before Favorites becomes active.
Turn 4FavoritesStep.onResponse() parses structured text and routes to Name.
Turns 5–6Name validation rejects a placeholder, then nested child work runs without taking the durable cursor.
Turn 8Address validation stores accepted state and the terminal step completes the session.

Next

Continue with 1. Bootstrapping PicoFlow in NestJS to build the application boundary that hosts this replay.