Steps
A run summary above a collapsible rail of steps.
A run summary above a collapsible rail of steps.
The widgets live in experimental package:remix/agent.dart, outside Remix's stability promise.
Import it explicitly; package:remix/remix.dart does not export it.
The registry installs editable preset recipes and their dependencies into your app.
Widget, model, and styler names keep the Agent prefix. Recipe names use your app's prefix.
Install
For a new app, initialize one preset, then add the recipe and glyphs:
remix init --prefix Ui --preset fortal
remix add steps_recipe agent_glyphs_recipeExisting apps keep their chosen preset. Vanilla and HeroUI provide the same recipe roles.
No consumer build.yaml is needed for these Agent recipes.
Behavior
Supply AgentStep values with stable ids and pending, active, complete, or cancelled status.
AgentRunStatus distinguishes working, waiting, and complete.
The default summary reads “Thinking…” during work, “Waiting for approval” while paused,
and “Thought for Ns” when settled. Supply duration or a host-started AgentRunClock for elapsed time.
labelBuilder customizes the summary. AgentDisclosurePolicy controls automatic expansion;
a reader's explicit toggle takes precedence within a run by default.
Use the recipe
This example assumes prefix Ui and the installed UiTheme above the widget.
Wrap the conversation in AgentGlyphs(builder: uiAgentGlyph, child: ...) to draw preset glyphs.
import 'package:flutter/widgets.dart';
import 'package:remix/agent.dart';
import 'ui/ui.dart';
Widget buildSteps() {
final recipe = uiAgentStepsRecipe();
return AgentSteps(
steps: const [
AgentStep(
id: 'read',
title: 'Read the cart',
status: AgentStepStatus.complete,
),
],
status: AgentRunStatus.complete,
duration: const Duration(seconds: 3),
style: recipe.style,
stepStyle: recipe.stepStyle,
disclosureStyle: recipe.disclosureStyle,
);
}The recipe returns these unresolved styles. Pass each into its matching widget parameter; child controls resolve hover, focus, and disabled state in their own context.
| Bundle field | Style type |
|---|---|
style | AgentStepsStyler |
stepStyle | AgentStepStyler |
disclosureStyle | DisclosureStyler |
Each factory merges same-named overrides after its preset defaults.
Edit the installed recipe to customize it. remix add steps_recipe --diff previews upstream differences.
See migration for the previous registry API.