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

# Quickstart: KumoRFM

In this guide, we walk you through an end-to-end example using a multi-table E-Commerce dataset. You'll learn how to load data, auto-infer a relational graph, and run instant predictions: demand forecasting, churn prediction, item recommendations, and missing value imputation, all without training a model.

## Step 1: Install the SDK

Install the python SDK

```python theme={null}
pip install kumoai
```

## Step 2: Get an API key

You need an API key to make calls to KumoRFM. Use the API key and API URL provided for your KumoRFM environment.

## Step 3: Initialize a client

Use your API key to initialize a Kumo client:

```python theme={null}
import kumoai.experimental.rfm as rfm, os

os.environ["KUMO_API_KEY"] = "ENTER_YOUR_API_KEY_HERE"

rfm.init()
```

## Step 4: Import your data

We will use an E-Commerce dataset for this example:

```python theme={null}
import pandas as pd

dataset_url = "s3://kumo-sdk-public/rfm-datasets/online-shopping"

users_df = pd.read_parquet(f"{dataset_url}/users.parquet")
items_df = pd.read_parquet(f"{dataset_url}/items.parquet")
orders_df = pd.read_parquet(f"{dataset_url}/orders.parquet")
```

## Step 5: Create a graph

Auto infer links between tables to form a graph

```python theme={null}
graph = rfm.LocalGraph.from_data({
    "users": users_df,
    "items": items_df,
    "orders": orders_df,
})

# Inspect the graph - requires graphviz to be installed
graph.visualize()
```

## Step 6: Make a prediction

Write a predictive query to generate instant predictions:

```python theme={null}
model = rfm.KumoRFM(graph)

# Forecast 30-day product demand
query1 = "PREDICT SUM(orders.price, 0, 30, days) FOR items.item_id=1"
result1 = model.predict(query1)
display(result1)

# Predict customer churn
query2 = "PREDICT COUNT(orders.*, 0, 90, days)=0 FOR users.user_id IN (42, 123)"
result2 = model.predict(query2)
display(result2)

# Item recommendation
query3 = "PREDICT LIST_DISTINCT(orders.item_id, 0, 30, days) RANK TOP 10 FOR users.user_id=123"
result3 = model.predict(query3)
display(result3)

# Missing value imputation
query4 = "PREDICT users.age FOR users.user_id=8"
result4 = model.predict(query4)
display(result4)
```

## Notebooks

Explore practical examples and use cases through our interactive notebooks.

<CardGroup cols={2}>
  <Card title="Quickstart" icon="book-open" href="https://colab.research.google.com/drive/1v4eQbYmw3xWXX9gT7gPwtEtZU_15YXDH?usp=sharing">
    Use KumoRFM for instant predictions using your own dataset with no model training required.

    **KumoRFM · pandas**
  </Card>

  <Card title="E-commerce Agent" icon="cart-shopping" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/ecom_agent.ipynb">
    Build an e-commerce agent that identifies churn risk, predicts probabilities, and generates re-engagement emails.

    **KumoRFM · CrewAI · OpenAI · MCP**
  </Card>

  <Card title="Sales Agent" icon="chart-line" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/simple_sales_agent.ipynb">
    Build a sales agent for lead scoring that identifies high-value prospects and creates prioritized outreach lists.

    **KumoRFM · OpenAI Agents SDK · MCP**
  </Card>

  <Card title="Insurance Agent" icon="shield" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/insurance_agent.ipynb">
    Build an insurance agent that predicts policy expiration risks, recommends bundling, and generates retention emails.

    **KumoRFM · LangGraph · Anthropic · MCP**
  </Card>

  <Card title="Handbook" icon="book" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/handbook.ipynb">
    Comprehensive guide showing graph schema definition, predictive queries, and model evaluation using Formula 1 data.

    **KumoRFM · RelBench · scikit-learn**
  </Card>

  <Card title="Hands-on Tutorial" icon="circle-play" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/hands_on.ipynb">
    Interactive tutorial demonstrating predictive analytics on multi-table datasets using Super Mario Maker game data.

    **KumoRFM · pandas**
  </Card>

  <Card title="Predictive Query Language" icon="database" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/predictive_query.ipynb">
    Learn PQL to frame entire ML tasks in SQL-like statements using the Steam gaming dataset.

    **KumoRFM · PQL**
  </Card>

  <Card title="RelBench Evaluation" icon="chart-bar" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/relbench.ipynb">
    Step-by-step guide for evaluating KumoRFM performance on custom datasets using rel-bench.

    **KumoRFM · RelBench · scikit-learn**
  </Card>

  <Card title="SALT Dataset" icon="building" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/salt.ipynb">
    Advanced evaluation on complex enterprise ERP dataset for multi-class classification.

    **KumoRFM · Hugging Face · datasets**
  </Card>

  <Card title="Single Table Classification" icon="table" href="https://github.com/kumo-ai/kumo-rfm/blob/master/notebooks/single_table.ipynb">
    Demonstrates binary classification on single tabular data using the scikit-learn breast cancer dataset.

    **KumoRFM · scikit-learn · NumPy**
  </Card>
</CardGroup>
