AI scenarios
Multi-step agent
Bit.BlazorUI.AI Scripted transportA plan published up front, then executed step by step with timings and per-step summaries.
Live demo
Give it something to research: the agent plans four steps, works through them, then answers.
How it works
A spinner is not an answer. A BitAiAgentRun holds the goal, the plan, the steps, their states
and the elapsed time, built from BitAiAgentRunStartedEvent, BitAiAgentPlanEvent,
BitAiAgentStepStartedEvent / BitAiAgentStepCompletedEvent and
BitAiAgentRunCompletedEvent. The run is attached to the message that produced it, so scrolling
back to an old answer still shows what the agent did to produce it.
In order, this transport sends BitAiAgentRunStartedEvent(runId) with the agent's
AgentName and its Goal (the question asked), the whole plan as a
BitAiAgentPlanEvent of four BitAiAgentPlanSteps, then for each step a
BitAiAgentStepStartedEvent and a BitAiAgentStepCompletedEvent with the
Summary of what it found, then BitAiAgentRunCompletedEvent - and only then the
answer, as ordinary text deltas under the run.
The first step searches, and the search runs on the provider's side, as a hosted web search does: the
transport reports the call (BitAiToolCallStartedEvent with its arguments) and its result
(BitAiToolResultEvent) itself, so the session shows the call without running anything, and the
step that was running when it started names it.
Plans are replaced rather than patched, because agents rewrite the tail of a plan as they learn. Steps that keep their identifier keep their state and timings.
Components used
BitAiAgentRunView- the run: its goal, its plan and where it stands.BitAiAgentStepView- each step, as an entry of a timeline.BitAiAgentStatusBadge- the one-word state, announced politely.BitAiToolCallView- the search the provider ran, with its result.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.