Skip to Content
Getting Started

Getting Started

Install the CLI

# homebrew brew install kernl # or npm npm install -g @kernl-sdk/cli

Create a project

kernl init my-project cd my-project

Set your API keys

# .env ANTHROPIC_API_KEY=sk-... OPENAI_API_KEY=sk-... GOOGLE_GENERATIVE_AI_API_KEY=sk-...

Make it yours

Open src/agents/jarvis.ts:

import { Agent } from "kernl"; import { anthropic } from "@kernl-sdk/ai/anthropic"; import { math } from "@/toolkits/math"; export const jarvis = new Agent({ id: "jarvis", name: "Jarvis", instructions: "You are Jarvis, a helpful assistant.", model: anthropic("claude-sonnet-4-5"), toolkits: [math], });

Change the instructions. Add a new toolkit. Make it do something useful.

Project structure

src/ ├── agents/ │ └── jarvis.ts ├── toolkits/ │ └── math/ │ ├── index.ts │ ├── add.ts │ └── ... ├── app.ts └── index.ts

agents/ — One file per agent. Export the agent instance.

toolkits/ — Group related tools together. Each toolkit exports from its index.ts.

index.ts — Entrypoint. Create a Kernl instance, register agents, run.

Next steps

  • Agents — deeper dive into agent configuration
  • Memory — give your agent persistent memory
  • Threads — manage execution state
Last updated on