Skip to main content

Visualize complex LLM conversation flows in infinite canvases

Project description

LLM Canvas logo

LLM Canvas

Visualize complex LLM conversation flows in infinite canvas.

PyPI License MIT Python 3.9+

As LLM applications evolve, conversation flows become increasingly complex. Conversations may branch into multiple paths, run in parallel, or require summarization across different threads. Managing and understanding these intricate conversation flows becomes a significant challenge in LLM ops.

LLM Canvas solves this by providing a powerful visualization tool for complex conversation flows. Create branching conversation trees, explore different response paths, and visualize tool interactions through an intuitive web interface — all while maintaining complete privacy with local deployment.

📰 News

🎉 August 2025: LLM Canvas v0.1.1 released with improved branching API and enhanced web UI

🌟 Key Features

  • 🌳 Branching Conversations: Create and explore multiple conversation paths from any message
  • 🔧 Tool Call Visualization: See how your LLM uses tools with clear input/output flows
  • 📦 Zero Dependencies: Self-contained with built-in web UI

🚀 Quick Start

Installation

pip install llm-canvas

Start Local Server

# Start the local server
llm-canvas server --port 8000

# Server starts at http://localhost:8000
# Create and view your canvases in the web interface

Basic Usage

from llm_canvas import CanvasClient

# Create a client and canvas
client = CanvasClient()
canvas = client.create_canvas("My Conversation", "Exploring LLM interactions")

# Add messages
user_msg_id = client.add_message(canvas.canvas_id, "What is machine learning?", "user")
client.add_message(
    canvas.canvas_id,
    "Machine learning is a subset of AI that enables computers to learn from data...",
    "assistant",
    parent_node_id=user_msg_id
)

Use Cases

1. Conversation Branching

# Create different response paths
main_branch = canvas.checkout("main", create_if_not_exists=True)
main_branch.commit_message({"role": "user", "content": "Explain quantum computing"})

# Create alternative explanations
simple_branch = canvas.checkout("simple-explanation", create_if_not_exists=True)
simple_branch.commit_message({"role": "assistant", "content": "Quantum computing uses quantum mechanics..."})

technical_branch = canvas.checkout("technical-explanation", create_if_not_exists=True)
technical_branch.commit_message({"role": "assistant", "content": "Quantum computing leverages superposition and entanglement..."})

2. Tool Usage Visualization

# Visualize how LLMs use tools
client.add_message(canvas_id, [
    {"type": "text", "text": "I'll check the weather for you."},
    {"type": "tool_use", "id": "weather_001", "name": "get_weather", "input": {"location": "San Francisco"}}
], "assistant")

client.add_message(canvas_id, [
    {"type": "tool_result", "tool_use_id": "weather_001", "content": '{"temperature": 72, "condition": "sunny"}'}
], "user")

📝 More examplesexamples/README.md

🤝 Contributing

We welcome contributions! LLM Canvas is open source and community-driven.

LLM Canvas: Story Behind

Check out the full story to learn about the inspiration and development journey of LLM Canvas.

📄 License

MIT License - see LICENSE for details.


Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_canvas-0.1.4.tar.gz (579.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_canvas-0.1.4-py3-none-any.whl (624.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_canvas-0.1.4.tar.gz.

File metadata

  • Download URL: llm_canvas-0.1.4.tar.gz
  • Upload date:
  • Size: 579.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_canvas-0.1.4.tar.gz
Algorithm Hash digest
SHA256 13e30619dfbba67909acf2930722ecf87b2a793b372ef1d5f0567a80320c1edc
MD5 a5e1e2c9480cdb74f0bb35fa9cda45af
BLAKE2b-256 248d60c1ee6f74bcc25efc7bccc320dab3d922a1e333cbfcbc5e3372eabbf551

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_canvas-0.1.4.tar.gz:

Publisher: release.yml on LittleLittleCloud/llm-canvas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_canvas-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: llm_canvas-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 624.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_canvas-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 46291e9139d20a716e0ee62a81302da105f03284b71f44e56ed734f9aa3a8d9e
MD5 b6fb69b12598f06d7bb4f17a5931db05
BLAKE2b-256 a230ff88ba1feab2fdc48db4182c64bf503f02a3fe6396ccf2d4dfc12c0aee25

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_canvas-0.1.4-py3-none-any.whl:

Publisher: release.yml on LittleLittleCloud/llm-canvas

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page