Documentation

Build AI Agents with Hare

Learn how to create, deploy, and manage AI agents on Cloudflare's edge network.

Getting Started
Learn the basics of creating your first AI agent
SDK Reference
Complete hareai SDK documentation
Tools Reference
Explore the 59+ built-in tools
API Reference
REST API & MCP documentation
Quick Start

Get started in minutes

1

Install the SDK

Add hareai to your Cloudflare Workers project.

npm install hareai ai zod agents
2

Create Your Agent

Use HareEdgeAgent for a simple, universal agent.

import { HareEdgeAgent } from 'hareai'

const agent = new HareEdgeAgent({
  name: 'My Agent',
  instructions: 'You are a helpful assistant.',
  model: '@cf/meta/llama-3.3-70b-instruct-fp8-fast',
  ai: env.AI,
})
3

Stream Responses

Get streaming responses from your agent.

const response = await agent.stream([
  { role: 'user', content: 'Hello!' }
])

for await (const chunk of response.textStream) {
  console.log(chunk)
}
4

Deploy

Your agent runs on Cloudflare's edge network.

wrangler deploy