An AI Client You Can Program

A local-first AI client with multi-model support, programmable strategies, and long-term memory.

SUPPORTED PROVIDERS

OllamaLM StudioOpenAIGoogleAnthropicDeepSeek
OllamaLM StudioOpenAIGoogleAnthropicDeepSeek

Architecture

Three primitives for programmable AI systems

Separate orchestration, memory, and model execution.

Host Platform

Local-first host that handles UI rendering, SQLite storage, worker lifecycle, and model provider adapters.

Strategy Engine

Write strategies in TypeScript to control context building, memory routing, and tool orchestration.

Multi-Model Runtime

Run across GPT, Claude, Gemini, and local models without rewriting orchestration logic.

Developer Experience

Code-first strategy control

Define behavior in typed hooks and ship predictable strategy workflows.

Strategy.ts
export default {
  onContextBuild(ctx) {
    ctx.slots.add("system", {
      role: "system",
      content: "You are a helpful assistant."
    })

    ctx.slots.add("history", ctx.history.recent(10))
    ctx.slots.add("input", ctx.input)

    return ctx.slots.render()
  }
}

Strategy SDK

Build reusable strategy modules with explicit lifecycle control.

Type-safe hooks

Compose logic using typed interfaces and predictable contracts.

Memory-aware orchestration

Route context through persistent memory and retrieval.

Context slots

Inject dynamic data into prompts without rewriting strategies.

Open Source

Open. Hackable. Yours.

AfferLab is an extensible platform for programmable AI systems.