Installation
Prerequisites
- Node.js 18+
- pnpm (recommended), npm, or yarn
Install
bash
pnpm add @halo-ai/core @halo-ai/adapters @halo-ai/streamOptional strategies package:
bash
pnpm add @halo-ai/strategiesEnvironment Variables
Create a .env.local file:
bash
# DeepSeek (primary)
DEEPSEEK_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# For other providers when their adapters are available:
# OPENAI_API_KEY=sk-...
# ANTHROPIC_API_KEY=sk-ant-...Verify Installation
ts
import { Halo } from "@halo-ai/core";
import { DeepSeekAdapter } from "@halo-ai/adapters";
const halo = new Halo({
adapter: new DeepSeekAdapter({
apiKey: process.env.DEEPSEEK_API_KEY!,
}),
});
const agent = halo.agent({
system: "You are a helpful assistant.",
});
const result = await agent.send("Hello!");
console.log(result.content); // "Hello! How can I help you today?"Next Steps
Next.js App Router →
Build a chat app with App Router + useChat.