kernl

kernl

A Typescript framework for building AI agents that remember, reason, and act.

Introduction

Most agent frameworks give you a chat loop and call it a day. You're left stitching together:

  • Conversation persistence
  • Memory that outlives a single session
  • Tool execution
  • Voice / realtime

kernl treats these as first-class concerns, not afterthoughts. It's also the only framework with provider-agnostic realtime support — build voice agents that work across OpenAI, Google, and others without rewriting your code.

Basic usage

Agents run on threads (persistent conversation state) and build memories (knowledge that spans threads). The Kernl runtime orchestrates execution and storage.

import { Kernl, Agent } from "kernl";
import { postgres } from "@kernl-sdk/pg";
import { openai } from "@kernl-sdk/ai/openai";

const kernl = new Kernl({
  storage: {
    db: postgres({ url: process.env.DATABASE_URL })
  }
});

const jarvis = new Agent({
  id: "jarvis",
  name: "Jarvis",
  model: openai("gpt-5.2"),
  instructions: "Help Tony Stark save the world from destruction.",
  memory: { enabled: true },
});

// thread persistence is handled for you
const result = await jarvis.run("Jarvis, remember that I prefer dark mode.", {
  threadId: "thread_123",
});

Philosophy

  • The future is async: Task horizons are increasing. This will change how we build.
  • Memory is not optional: Memory is the bottleneck to personalization and utility. It shouldn't be hard.
  • Provider agnostic: No vendor lock-in. Swap models per-agent or per-request.
  • Open by default: Standardization brings interoperability. The ecosystem is fragmented — we're building for a world where things work together.
  • Opinionated, but not constricting: Strong defaults, clear patterns. But you can always do what you need to do.

On this page