// 🧠 Initialize Cache-First Agentic Loop
import { Halo, StablePrefix } from "@halo-ai/core";
import { deepseek } from "@halo-ai/adapters";
const halo = new Halo({
model: deepseek("deepseek-chat"),
prefix: new StablePrefix({
system: "You are a highly accurate codebase analysis assistant.",
tools: { getCodeContext, searchFiles },
}),
});
const stream = await halo.run({
prompt: "Optimize this algorithm and find best practices...",
// Automatic prefix caching for instant responses in multi-turn chat
cache: "first",
});benchmarks/).Traditional frameworks only concatenate Prompts. Halo is built from the ground up to solve latency and cost pain points in enterprise-scale agent loops.
Halo follows the Unix philosophy, separating agent complexity into distinct, high-cohesion packages
Core Agent Engine
Manages the main Agent execution loop, context lifecycles, stable prefixes, and event stream lifecycles.Multi-Provider Adapters
Provides native bindings for DeepSeek, OpenAI, and Anthropic, mapping raw API models to standard Cache-First interfaces.Resilience Strategies
Provides truncation policies (Truncate Strategy) and tool calling self-healing rules (Basic Repair Strategy) to prevent loops from failing.Say goodbye to slow response times and heavy token bills. Start building cache-first agent systems optimized for production today.