> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.nvidia.com/sdgm/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.nvidia.com/sdgm/_mcp/server.

# Claude Code

> Use Claude Code with the Kumo RFM SDK

<img src="/sdgm/_files/nvidia-sdgm.docs.buildwithfern.com/9e6623e9c03462c51f0cf71f24e38bec8e6e1b93092363e63df580a6f0a4dbe0/images/rfm/agent-claude.svg" alt="Claude" />

## Overview

This guide walks you through setting up the **KumoSDK** and **Kumo Coding Agent** with **Anthropic Claude Code** in desktop and CLI environments.

Claude Code is an AI coding agent by Anthropic. It can read your project files, write code, run commands, and iterate on errors. You interact with it by typing natural language prompts.

## Prerequisites

Make sure you have:

1. Python **3.10 to 3.13** installed
2. Access to a KumoRFM environment, including an API key and any required API URL
3. An Anthropic account
4. Claude Code installed and authenticated. See the [official Claude Code docs](https://code.claude.com/docs/en/overview) for desktop app and CLI installation.

## Step 1: Create a Project

Create or open a project directory:

```bash
mkdir my-kumo-project
cd my-kumo-project
```

**Desktop app:** Open Claude Code and select your project folder.

**CLI:** Navigate to your project in the terminal.

## Step 2: Install KumoSDK

```bash
pip install kumoai
```

Verify:

```bash
python -c "import kumoai; print(f'kumoai {kumoai.__version__} installed')"
```

## Step 3: Authenticate with Kumo

Set your API key:

```bash
export KUMO_API_KEY="YOUR_API_KEY_HERE"
```

## Step 4: Install Kumo Coding Agent

The Kumo Coding Agent has two parts:

* **Context** (knowledge base): Documentation, PQL rules, workflow guides, and data connector references that teach the agent how to use the Kumo platform. Installed by cloning the repository.
* **Skills** (slash commands): Actions like `/kumo-issue` and `/kumo-pr` for reporting bugs and contributing fixes. Installed via `npx skills add`.

**Install the context:**

```bash
git clone https://github.com/kumo-ai/kumo-coding-agent.git kumo-coding-agent
echo 'Also read kumo-coding-agent/CLAUDE.md for Kumo agent capabilities.' >> CLAUDE.md
```

The second line tells Claude Code to read the agent's knowledge base on startup.

**Install the skills (optional):**

```bash
npx skills add kumo-ai/kumo-coding-agent --agent claude-code
```

## Step 5: Use the Kumo Coding Agent

**Desktop app:**

1. Open Claude Code
2. Select your project folder (if not already open)
3. Type a prompt in the chat panel:

```text
Load the RelBench F1 dataset and predict whether each driver will finish in the top 3 in the next race
```

4. Claude Code will read the Kumo Coding Agent context, inspect the data, build a graph, write PQL, and run the prediction.
5. Review the changes Claude proposes. You can approve, edit, or reject each change before it is applied.

**CLI:**

Start an interactive session:

```bash
cd my-kumo-project
claude
```

This opens an interactive prompt. Type your request:

```text
Load the RelBench F1 dataset and predict whether each driver will finish in the top 3 in the next race
```

You can also run a single prompt directly:

```bash
claude "Load the RelBench F1 dataset and predict whether each driver will finish in the top 3 in the next race"
```

## Step 6 (Optional): Upgrade

**Upgrade KumoSDK:**

```bash
pip install --upgrade kumoai
```

**Upgrade the Kumo Coding Agent:**

```bash
cd kumo-coding-agent && git pull
```

To pin to a specific version:

```bash
cd kumo-coding-agent && git checkout v1.0.0
```

## Troubleshooting

### `kumoai` cannot be imported

```bash
pip install kumoai
```

### API key is missing

```bash
export KUMO_API_KEY="YOUR_API_KEY_HERE"
```

### Agent does not respond with Kumo knowledge

* Verify `kumo-coding-agent/` exists in your project directory
* Verify your project's `CLAUDE.md` contains the line referencing `kumo-coding-agent/CLAUDE.md`
* Restart Claude Code or start a new session with `claude`

### Claude Code CLI not found

```bash
npm install -g @anthropic-ai/claude-code
```

## Next Steps

* [Setup](/rfm/sdk-getting-started) for SDK fundamentals
* [Make Predictions](/rfm/make-predictions) for PQL query reference
* [Kumo Coding Agent](https://github.com/kumo-ai/kumo-coding-agent) for agent source and skills