Kura includes a built-in web interface that provides an interactive way to explore your conversation clusters. This guide shows you how to start and use the web UI.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/jxnl/kura/llms.txt
Use this file to discover all available pages before exploring further.
Starting the Web UI
The web UI is launched using thekura start-app command.
Basic Usage
Start the server with default settings:- Use
./checkpointsdirectory for checkpoint files - Use JSONL format (legacy)
- Start server at http://localhost:8000
With Custom Checkpoint Directory
Specify a different checkpoint directory:With HuggingFace Datasets Format
For better performance with large datasets:- Datasets > 100MB
- Production deployments
- Datasets with 10,000+ conversations
CLI Implementation
The CLI is implemented in kura/cli/cli.py:10-30:Preparing Your Checkpoints
Before starting the web UI, you need to generate checkpoints by running your analysis pipeline.from kura.v1 import (
summarise_conversations,
generate_base_clusters_from_conversation_summaries,
generate_meta_clusters,
CheckpointManager
)
from kura.types import Conversation
from kura.summarisation import SummaryModel
from kura.cluster import ClusterDescriptionModel
# Load conversations
conversations = Conversation.from_hf_dataset(
"ivanleomk/synthetic-gemini-conversations",
max_conversations=1000
)
# Set up checkpoint manager
checkpoint_mgr = CheckpointManager("./checkpoints")
# Run pipeline
summary_model = SummaryModel()
summaries = await summarise_conversations(
conversations,
model=summary_model,
checkpoint_manager=checkpoint_mgr
)
cluster_model = ClusterDescriptionModel()
base_clusters = await generate_base_clusters_from_conversation_summaries(
summaries,
clustering_model=cluster_model,
checkpoint_manager=checkpoint_mgr
)
meta_clusters = await generate_meta_clusters(
base_clusters,
max_clusters=20,
checkpoint_manager=checkpoint_mgr
)
Using Environment Variables
You can configure the web UI using environment variables:Server Configuration
The server is implemented using FastAPI (from kura/cli/server.py:1-29):Web UI Features
The web interface provides several interactive features:Cluster Map
Visual representation of clusters in 2D space using dimensionality reduction.Cluster Tree
Hierarchical tree view showing parent-child relationships between clusters.Cluster Details
Detailed information about each cluster:- Cluster name and description
- Number of conversations
- Sample conversations
- Metadata statistics
Conversation Dialog
View individual conversations within clusters:- Full message history
- Metadata
- Timestamps
Upload Form
Upload new conversation datasets for analysis.Running in Production
For production deployments, consider these settings:Use Gunicorn
Use HuggingFace Datasets Format
- 10-100x faster loading
- 50-80% smaller storage
- Memory-mapped access
- Streaming support
Configure Reverse Proxy
Nginx configuration:Enable HTTPS
Using Let’s Encrypt:Docker Deployment
Create a Dockerfile:Customizing the UI
The UI is built with React and TypeScript. To customize:API Endpoints
The web UI communicates with these API endpoints:GET /api/clusters
Retrieve all clusters:GET /api/conversations
Retrieve conversations for a specific cluster:Troubleshooting
Port Already in Use
If port 8000 is already in use:Static Files Not Found
Checkpoint Files Not Loading
Ensure checkpoints exist:CORS Errors
The server is configured to allow all origins by default. If you’re still seeing CORS errors, check that:- The server is running
- You’re accessing the correct URL
- No browser extensions are blocking requests
Slow Loading with Large Datasets
Switch to HuggingFace datasets format:Best Practices
# Update checkpoints
summaries = await summarise_conversations(...)
meta_clusters = await generate_meta_clusters(...)
# Restart server to see changes
Next Steps
- Learn about data loading options
- Explore custom models for your use case
- Set up caching for better performance
- Try visualization in the terminal