kernl
kernl is a Typescript framework for building AI agents that remember, reason, and act.
Who is it for?
- Teams building production AI products, not prototypes
- Developers who want structure without lock-in
- Projects that need agents to remember context over time
So why kernl?
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
- Multi-turn reasoning
kernl treats these as first-class concerns, not afterthoughts.
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({ connstr: 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.
- Governance / policy as first-class citizens: Permissions, policies, and controls aren’t bolted on. They’re built in.
- 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.
- TypeScript-native: Full type safety. Your IDE knows what’s happening.
Last updated on