> ## Documentation Index
> Fetch the complete documentation index at: https://vibes-sdk.a7ul.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Hello World

> The simplest possible Vibes agent - create and run an agent in 5 lines.

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

* Vibes installed ([Installation guide](/getting-started/install))
* `ANTHROPIC_API_KEY` set in environment

## Complete example

*Source: [`examples/hello-world.ts`](https://github.com/a7ul/vibes/blob/main/packages/sdk/examples/hello-world.ts)*

```typescript theme={null}
import { Agent, tool } from "jsr:@vibesjs/sdk";
import { anthropic } from "npm:@ai-sdk/anthropic";
import { z } from "npm:zod";

const getCurrentTime = tool({
  name: "get_current_time",
  description: "Get the current date and time",
  parameters: z.object({}),
  execute: () => {
    return new Date().toISOString();
  },
});

const agent = new Agent({
  model: anthropic("claude-haiku-4-5-20251001"),
  systemPrompt: "You are a helpful assistant.",
  tools: [getCurrentTime],
});

const result = await agent.run("What is the capital of France and what time is it?");
console.log(result.output);
// "The capital of France is Paris. The current time is 2025-01-15T10:30:00.000Z."
```

## Run it

```bash theme={null}
deno run --allow-net --allow-env hello-world.ts
```

## 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](/concepts/agents).

**`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

* [Weather Agent](/examples/weather-agent) - add tools and structured output
* [Bank Support](/examples/bank-support) - dependency injection and complex output
