Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Wraps the Agent class for multi-step tool loops, conversation history, streaming progress, and structured output in Output LLM workflows.
52% 96%+43 ptsof test cases passed
Passed 22 of 23 test cases with the skill, and 12 of 23 without it.
In an Output LLM codebase, when creating a validation schema for agent variables, which package export path should `z` be imported from?
Specifies importing z from @outputai/core
This test ran on v3. v4 is the current version and hasn’t been tested on gemini-3.6-flash yet.
3 of 3 safety checks passed
The Agent class uses an internal AI SDK ToolLoopAgent through composition with Output prompt files and the skills system. It does not inherit from ToolLoopAgent. Use it when you need multi-step tool execution, conversation history, or a reusable agent instance. For single-shot LLM calls without tools, generateText is simpler.
aiSdk.Output.object()messageStoreonChunkAgent and generateTextimport { Agent, aiSdk } from '@outputai/core/llm';
import type { MessageStore } from '@outputai/core/llm';
import { z } from '@outputai/core';
Agent comes from @outputai/core/llm. Use aiSdk.Output for structured output. Import z from @outputai/core (never from zod directly). MessageStore is the type for a pluggable getMessages / addMessages store; implement it yourself.
The prompt file is loaded and rendered at construction time. Variables and tools are fixed at construction. Skills and maxSteps come from the prompt file. The agent is ready to call generate(), generateWithStreaming(), or stream() immediately.
const agent = new Agent( {
prompt: 'writing_assistant@v1',
variables: {
content_type: input.contentType,
focus: input.focus,
content: input.content
},
output: aiSdk.Output.object( { schema: reviewSchema } )
} );
Next to this one in the catalogue, plus more from the same author.