> ## Documentation Index
> Fetch the complete documentation index at: https://kenpachi.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Add kenpachi to your TypeScript project in one command.

## Requirements

* **Node.js** 18+
* **TypeScript** 5+ (recommended)

***

## Install

kenpachi uses [Zod](https://zod.dev) for tool schemas — install both:

<CodeGroup>
  ```bash npm theme={null}
  npm install kenpachi zod
  ```

  ```bash pnpm theme={null}
  pnpm add kenpachi zod
  ```

  ```bash yarn theme={null}
  yarn add kenpachi zod
  ```
</CodeGroup>

***

## API keys

Set environment variables for the provider you use:

```bash theme={null}
# Anthropic (Claude)
export ANTHROPIC_API_KEY="sk-ant-..."

# OpenAI (GPT)
export OPENAI_API_KEY="sk-proj-..."
```

In Node, load them with `process.env.ANTHROPIC_API_KEY` — or use a `.env` file with your preferred loader (`dotenv`, etc.).

***

## Verify the install

```typescript theme={null}
import { Agent, createAnthropicProvider } from "kenpachi";

const provider = createAnthropicProvider({
  apiKey: process.env.ANTHROPIC_API_KEY!,
  model: "claude-sonnet-4-6",
});
const agent = new Agent(provider, []);

const result = await agent.run("Say hello in one sentence.");
console.log(result.text);
```

If that prints a response, you're ready for the [Quickstart](/quickstart).
