Skip to content

AI scenarios

Multi-step agent

Bit.BlazorUI.AI Scripted transport

A 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.

A run with a plan

Give it something to research
Ask a question to get started.

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

Feedback

Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.