Skip to content

Installation ​

Prerequisites ​

  • Node.js 18+
  • pnpm (recommended), npm, or yarn

Install ​

bash
pnpm add @halo-ai/core @halo-ai/adapters @halo-ai/stream

Optional strategies package:

bash
pnpm add @halo-ai/strategies

Environment 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.

Node.js → ​

Use Halo in a Node.js server or CLI script.

Released under the MIT License.