Getting Started
Install the CLI
# homebrew
brew install kernl
# or npm
npm install -g @kernl-sdk/cliCreate a project
kernl init my-project
cd my-projectSet 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.tsagents/ — 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
Last updated on