AI scenarios
Agent failure
Bit.BlazorUI.AI Scripted transportA step that fails, with the failure attached to the step rather than replacing the whole run.
Live demo
Ship the release: the build passes, the test suite does not, and the agent stops before deploying.
A run with a failed step
How it works
The transport fails the second step with
BitAiAgentStepCompletedEvent(runId, "s2", BitAiAgentStepStatus.Failed), carrying a
BitAiError - its message, the failing tests as its Detail, and
IsRetryable - then ends the run with
BitAiAgentRunCompletedEvent(runId, BitAiAgentRunStatus.Failed), and still writes its answer.
The failing step keeps its error, shown on the step itself; the completed steps keep their summaries; the
step the run never reached (Deploy) is marked Skipped rather than left pending; and the run is
marked Failed. Nothing that already succeeded is lost, which is what lets the answer explain
what happened rather than just report that something did.
The failure is the step's, not the reply's: the turn itself succeeds. A failure that ends the reply is a
terminal BitAiErrorEvent (see Errors and retry),
and one that does not - one of several parallel calls failed, and the rest are still worth showing - is
the same event with isTerminal: false, which adds a BitAiErrorPart inside the
message and lets it stream on.
Components used
BitAiAgentStepView- the failed step, with its error.BitAiAgentRunView- the run, marked failed, with everything that went right.
Feedback
Found a mistake, a gap, or something that could be clearer? Every page and every component is one click from its source.