AI-powered interpretation of data science outputs with multi-backend support
Project description
kanoa
In-notebook AI interpretation of data science outputs, grounded in your project's knowledge base.
kanoa brings the power of a dedicated AI research assistant directly into your Python workflows — whether in Jupyter notebooks, Streamlit apps, or automated scripts. It programmatically interprets visualizations, tables, and results using multimodal LLMs (Molmo, Gemini, Claude, OpenAI), grounded in your project's documentation and literature.
Supported Backends
| Backend | Best For | Getting Started |
|---|---|---|
vllm |
Local inference with Molmo, Gemma 3, Olmo 3 | Guide |
gemini |
Free tier, native PDF support, Vertex AI RAG Engine | Guide |
gemini-deep-research |
Multi-step web research, GDrive integration | Guide |
claude |
Strong reasoning, vision support | Guide |
github-copilot |
GitHub Copilot SDK integration, GPT-5 models | Guide |
openai |
GPT models, Azure OpenAI | Guide |
For detailed backend comparison, see Backends Overview.
Features
- Multi-Backend Support: Seamlessly switch between vLLM (local), Gemini, Claude, GitHub Copilot, and OpenAI.
- Deep Research: Perform multi-step web research and synthesis using Gemini's Deep Research agent.
- Real-time Streaming: Get immediate feedback with streaming responses.
- Enterprise Grounding: Native integration with Vertex AI RAG Engine for scalable, secure knowledge retrieval from thousands of documents.
- Native Vision: Uses multimodal capabilities to "see" complex plots and diagrams.
- Cost Optimized: Intelligent context caching and token usage tracking.
- Knowledge Base: Support for text (Markdown), PDF, and managed RAG knowledge bases.
- Notebook-Native Logging: see the Logging Guide.
Quick Start
Check out 2 Minutes to kanoa for a hands-on introduction.
For a comprehensive feature overview, see the detailed quickstart.
Basic Usage: AI-assisted Debugging with Visual Interpretation
In this example, we use kanoa to identify a bug in a physics simulation.
import numpy as np
import matplotlib.pyplot as plt
from kanoa import AnalyticsInterpreter
# 1. Simulate a projectile (with a bug!)
t = np.linspace(0, 10, 100)
v0 = 50
g = 9.8
# BUG: Missing t**2 in the gravity term (should be 0.5 * g * t**2)
y = v0 * t - 0.5 * g * t
plt.figure(figsize=(10, 6))
plt.plot(t, y)
plt.title("Projectile Trajectory")
# 2. Ask kanoa to debug
interpreter = AnalyticsInterpreter(backend="gemini")
# Returns a stream by default
iterator = interpreter.interpret(
fig=plt.gcf(),
context="Simulating a projectile launch. Something looks wrong.",
focus="Identify the physics error in the trajectory.",
)
# Consume the stream
for chunk in iterator:
if chunk.type == "text":
print(chunk.content, end="")
kanoa's response:
"The plot shows a linear relationship between height and time..."
Using Claude
# Ensure ANTHROPIC_API_KEY is set
interpreter = AnalyticsInterpreter(backend='claude')
# Use stream=False for blocking behavior (returns legacy result object)
result = interpreter.interpret(
fig=plt.gcf(),
context="Analyzing environmental data for climate trends",
focus="Explain any regime changes in the data.",
stream=False
)
print(result.text)
Using a Knowledge Base
# Point to a directory of Markdown or PDF files
interpreter = AnalyticsInterpreter(
backend='gemini',
kb_path='./docs/literature',
kb_type='auto' # Detects if PDFs are present
)
# The interpreter will now use the knowledge base to ground its analysis
result = interpreter.interpret(
fig=plt.gcf(),
context="Analyzing marine biologger data from a whale shark deployment",
focus="Compare diving behavior with Braun et al. 2025 findings."
)
print(result.text)
Local Inference with vLLM
Connect to any model hosted via vLLM's OpenAI-compatible API. We've tested with
Molmo from AI2 and Google's Gemma 3 12B — fully-open multimodal models.
See kanoa-mlops for our local hosting setup.
# Molmo 7B (recommended for vision - 31 tok/s avg, 3x faster than Gemma)
interpreter = AnalyticsInterpreter(
backend='openai',
api_base='http://localhost:8000/v1',
model='allenai/Molmo-7B-D-0924'
)
# Gemma 3 12B (recommended for text reasoning - 10.3 tok/s avg)
interpreter = AnalyticsInterpreter(
backend='openai',
api_base='http://localhost:8000/v1',
model='google/gemma-3-12b-it'
)
result = interpreter.interpret(
fig=plt.gcf(),
context="Analyzing aquaculture sensor data",
focus="Identify drivers of dissolved oxygen levels"
)
Local & Edge Deployment
Run state-of-the-art open weights models locally using our companion library, kanoa-mlops.
- Privacy First: Your data never leaves your machine.
- Models: Support for Gemma 3, Molmo, and Olmo 3.
- Performance: Optimized for consumer hardware (RTX 4090/5080) and edge devices (NVIDIA Jetson Thor).
Benchmarks (NVIDIA RTX 5080)
| Model | Task | Speed |
|---|---|---|
| Molmo-7B | Complex Plot Interpretation | 92.8 tokens/sec |
| Molmo-7B | Data Interpretation | 59.5 tokens/sec |
Benchmarks (NVIDIA Jetson Thor)
| Model | Task | Speed |
|---|---|---|
| Molmo-7B | Complex Plot Interpretation | 9.6 tokens/sec |
| Molmo-7B | Data Interpretation | 9.5 tokens/sec |
| Gemma 3 12B | Vision (Chart Analysis) | 4.3 tokens/sec |
| Gemma 3 12B | Code Generation | 4.4 tokens/sec |
Installation
kanoa is modular — install only the backends you need:
# Local inference (vLLM — Molmo, Gemma 3)
pip install kanoa[local]
# Google Gemini (free tier available)
pip install kanoa[gemini]
# Anthropic Claude
pip install kanoa[claude]
# GitHub Copilot SDK
pip install kanoa[github-copilot]
# OpenAI API (GPT models, Azure OpenAI)
pip install kanoa[openai]
# Everything
pip install kanoa[all]
Development installation
git clone https://github.com/lhzn-io/kanoa.git
cd kanoa
pip install -e ".[dev]"
Pricing Configuration
kanoa includes up-to-date pricing for all supported models. You can override these values locally without waiting for a package update:
- Create
~/.config/kanoa/pricing.json - Add your custom pricing (merges with defaults):
{
"gemini": {
"gemini-3-pro-preview": {
"input_price": 2.00,
"output_price": 12.00
}
},
"claude": {
"claude-opus-4-5-20251101": {
"input_price": 5.00,
"output_price": 25.00
}
}
}
Pricing sources:
- Gemini: ai.google.dev/pricing
- Claude: anthropic.com/pricing
- OpenAI: openai.com/api/pricing
Documentation
📖 Full documentation — User guides, API reference, and examples.
Building docs locally
cd docs
pip install -r requirements-docs.txt
make html
Then open docs/build/html/index.html in your browser.
License
Copyright 2025 Long Horizon Observatory
This project is licensed under the MIT License — see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kanoa-0.5.0.tar.gz.
File metadata
- Download URL: kanoa-0.5.0.tar.gz
- Upload date:
- Size: 188.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b1972abdfdfaa6cc64d99d92b7e848393ac2571a64ee1ca82a0268d87ade58d
|
|
| MD5 |
386a0a27a5d36e9057518afa2d0b60e2
|
|
| BLAKE2b-256 |
74dc11771fbed491c65c66211a1ce3e6579e3c0fb35569f57e1706e897ebe395
|
Provenance
The following attestation bundles were made for kanoa-0.5.0.tar.gz:
Publisher:
publish.yml on lhzn-io/kanoa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kanoa-0.5.0.tar.gz -
Subject digest:
4b1972abdfdfaa6cc64d99d92b7e848393ac2571a64ee1ca82a0268d87ade58d - Sigstore transparency entry: 833836218
- Sigstore integration time:
-
Permalink:
lhzn-io/kanoa@284f7bedc2d068a022b1a8b051ab73570f1e07a0 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/lhzn-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@284f7bedc2d068a022b1a8b051ab73570f1e07a0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file kanoa-0.5.0-py3-none-any.whl.
File metadata
- Download URL: kanoa-0.5.0-py3-none-any.whl
- Upload date:
- Size: 94.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b55792103e482d89861cd29aa1ac8f68e6a288772e3ddaf37d8de8f650f4c2d8
|
|
| MD5 |
34b1d427bb18e0bdd301a1cd68d185c3
|
|
| BLAKE2b-256 |
05e67f8f0f40b17084a327d874b4fdd835747271bc75c18fa9b3678453e6c5a9
|
Provenance
The following attestation bundles were made for kanoa-0.5.0-py3-none-any.whl:
Publisher:
publish.yml on lhzn-io/kanoa
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
kanoa-0.5.0-py3-none-any.whl -
Subject digest:
b55792103e482d89861cd29aa1ac8f68e6a288772e3ddaf37d8de8f650f4c2d8 - Sigstore transparency entry: 833836219
- Sigstore integration time:
-
Permalink:
lhzn-io/kanoa@284f7bedc2d068a022b1a8b051ab73570f1e07a0 -
Branch / Tag:
refs/tags/v0.5.0 - Owner: https://github.com/lhzn-io
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@284f7bedc2d068a022b1a8b051ab73570f1e07a0 -
Trigger Event:
release
-
Statement type: