new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

AI SDK · Cookbook · all subjects

streaming & ui

3 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

createAgentUIStreamResponse streaming platform support

createAgentUIStreamResponse leverages ReadableStream so the platform/client must support HTTP streaming consumption.

StepResultPerformance metrics structure

StepResultPerformance contains: effectiveOutputTokensPerSecond (number, effective output tokens per second over full response), outputTokensPerSecond (number | undefined, only for streamed responses), inputTokensPerSecond (number | undefined, only for streamed responses), effectiveTotalTokensPerSecond (number, effective input and output tokens per second), stepTimeMs (number, total time including model response and tool execution), responseTimeMs (number, time waiting for model response), toolExecutionMs (Readonly<Record<string, number>>, keyed by tool call ID), timeToFirstOutputMs (number | undefined, only for streamed responses), and timeBetweenOutputChunksMs (OutputChunkTimingStats | undefined, only for streamed responses).

Streaming metrics undefined for generateText

For generateText, streaming-only performance metrics are undefined: inputTokensPerSecond, outputTokensPerSecond, timeToFirstOutputMs, and timeBetweenOutputChunksMs are all undefined because generateText does not stream the response.

Give your agent this brain