Skip to main content
kenpachi is a small TypeScript SDK for building tool-using LLM agents — without pulling in a heavy vendor framework. You get a typed agent loop, pluggable providers (Anthropic & OpenAI over raw fetch), and a handful of production features that most minimal agent loops skip.
Start here if you’re evaluating: read this page, then follow Quickstart. You’ll have a working agent with tools in under 5 minutes.

What you get out of the box


Minimal example

This is the whole mental model: provider → tools → agent → run.
No boilerplate loop, no manual tool-call parsing — agent.run() handles the back-and-forth until the model finishes.

How it compares

Most teams building agents today either:
  1. Roll their own loop — fast to start, painful when you need undo, argument coercion, streaming, or multi-agent routing.
  2. Adopt a large framework — powerful, but heavy and opinionated.
kenpachi sits in the middle: small surface area, production-shaped defaults. You keep control of your stack (plain TypeScript, zero vendor SDK deps) while getting the guardrails that matter once you ship to real users.

When kenpachi is a good fit

  • You’re building a chat product and need undo / edit / regenerate without duplicate API costs.
  • Your agents call external APIs via tools and you want validation + rollback when things go wrong.
  • You want specialist sub-agents (billing, support, research) behind a single front-door agent.
  • You need streaming text in your UI without rewriting your agent loop.

Next steps

Install

Add kenpachi to your project and set up API keys.

Quickstart

Build your first tool-using agent in a few lines.

Streaming

Stream tokens to your UI as the model responds.

Handoffs

Route work to specialist agents automatically.