Skip to main content

title: NodeNarrate 🔍 emoji: ⚡ colorFrom: indigo colorTo: purple sdk: static pinned: true license: apache-2.0

NodeNarrate 🔍

See exactly how your LangGraph agent thinks, step by step — free, open-source, and self-hosted. No LangSmith account required.

Python SDK Hugging Face Spaces License


✨ Features

  • 🐍 nodenarrate Python SDK: 2-line drop-in callback handler for any LangGraph agent in your local environment.
  • 🎨 Visual Execution Studio: Modern dark-mode web studio with interactive SVG flow diagrams, state diffs, and latency telemetry.
  • 📄 Standalone HTML Reports: Export self-contained, shareable HTML trace reports with zero external dependencies.
  • 🔒 Safe Sandboxed Execution: Runs pasted code in isolated subprocesses with import guards and execution timeouts.
  • 🐳 Hugging Face Docker Space Ready: Deploys the full FastAPI backend + React Vite frontend on Hugging Face's 100% free CPU tier.

🚀 1. Python SDK Usage (pip install nodenarrate)

Install in your local environment:

pip install nodenarrate

Add NodeNarrateTracer directly into your LangGraph invocation:

from langgraph.graph import StateGraph, END
from typing import TypedDict
from nodenarrate import NodeNarrateTracer

# 1. Initialize Tracer
tracer = NodeNarrateTracer()

# 2. Define your LangGraph agent
class State(TypedDict):
    count: int

def step_node(state: State) -> State:
    return {"count": state["count"] + 1}

builder = StateGraph(State)
builder.add_node("step_node", step_node)
builder.set_entry_point("step_node")
builder.add_edge("step_node", END)
graph = builder.compile()

# 3. Invoke with callback
result = graph.invoke({"count": 0}, config={"callbacks": [tracer]})

# 4. Export trace to JSON or standalone visual HTML
tracer.export_html("trace.html")  # Open in any browser!
tracer.export_json("trace.json")  # Load into NodeNarrate Web Studio

🌐 2. Hosted Web Studio

Try the live visual studio on Hugging Face Spaces: 👉 https://huggingface.co/spaces/swapnilsupe01/NodeNarrate


🛠️ 3. Run Locally (Full Studio)

Backend (FastAPI):

cd backend
pip install -r requirements.txt
pip install -e ..
uvicorn main:app --reload --port 8000

Frontend (React + Vite):

cd frontend
npm install
npm run dev

Open http://localhost:5173 in your browser.


🚢 4. Deploying to Hugging Face Spaces

  1. Create a new Space on Hugging Face and choose Docker as the SDK.
  2. Push this repository to your Hugging Face Space Git remote:
git remote add space https://huggingface.co/spaces/<your-username>/NodeNarrate
git push space main

Hugging Face will automatically build the multi-stage Dockerfile and serve both the React frontend and FastAPI backend on port 7860.


📂 Project Architecture

NodeNarrate/
├── nodenarrate/          # Python SDK package (pip installable)
│   ├── tracer.py         # LangGraph callback handler & trace engine
│   ├── html_template.py  # Standalone HTML report generator
│   └── __init__.py
├── backend/              # FastAPI backend
│   ├── api/routes.py     # Sandbox execution endpoint (/api/run)
│   ├── core/             # Sandbox process runner
│   └── main.py           # API & Static SPA server
├── frontend/             # React + Vite studio interface
│   ├── src/components/   # CodeEditor, FlowDiagram, TraceViewer, Header
│   ├── src/templates.js  # Built-in LangGraph agent examples
│   └── src/index.css     # Dark mode design system
├── Dockerfile            # Hugging Face Spaces multi-stage container
├── pyproject.toml        # Python packaging metadata
└── README.md

📜 License

Apache License 2.0 — see LICENSE.

Metadata

Release files for nodenarrate 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nodenarrate 0.1.0
File Size Uploaded
nodenarrate-0.1.0.tar.gz 10.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nodenarrate 0.1.0
File Interpreter ABI Platform
nodenarrate-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.2 kB

Release files / nodenarrate-0.1.0.tar.gz

Download URL nodenarrate-0.1.0.tar.gz
Size 10.8 kB
Tags Source
SHA-256 checksum
How to use checksums
9cbbc61b8548da844731bbb1d7dd656e97a054775c71d1f5e185524f8581a833
BLAKE2b-256 checksum
How to use checksums
821133a61c57462d1519fd6584bf374e402a1a0483d21cac7f696762c4cb25cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release files / nodenarrate-0.1.0-py3-none-any.whl

Download URL nodenarrate-0.1.0-py3-none-any.whl
Size 10.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
81307bf891e550b4589c0ee60ce9c8abd387732f82bc57a6293fb7e9b2a5020d
BLAKE2b-256 checksum
How to use checksums
10bf573cdfe42d836edda84ebde253e9227719c5a109897d6c4a7d9061c3f60f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page