Skip to main content
The minimal Vibes agent: import, create, run.

What you’ll learn

  • Creating an Agent with a model and system prompt
  • Running the agent with agent.run()
  • Reading the output with result.output

Prerequisites

Complete example

Source: examples/hello-world.ts

Run it

How it works

Model: anthropic("claude-haiku-4-5-20251001") creates a model instance using the Vercel AI SDK Anthropic provider. Any Vercel AI SDK-compatible model works here. System Prompt: Sets the agent’s persona. Vibes supports both static strings and dynamic functions - see the Agents concept page. tool(): Defines a type-safe tool with Zod parameter validation. The agent automatically calls tools when relevant. parameters: z.object({}) means this tool takes no arguments. result.output: For agents without outputSchema, output is a string. Add outputSchema with a Zod schema to get structured output - see the Weather Agent example.

Next steps