Industry observers note that TL;DR: Daggr is a new, open-source Python library for building AI workflows that connect Gradio apps, ML models, and custom functions. It automatically generates a visual canvas where you can inspect intermediate outputs, rerun individual steps, and manage state for complex pipelines, all in a few lines of Python code!
If you've built AI applications that combine multiple models or processing steps, you know the pain: chaining API calls, debugging pipelines, and losing track of intermediate results. When something goes wrong in step 5 of a 10-step workflow, you often have to re-run everything just to see what happened.
Most developers either build fragile scripts that are hard to debug or turn to heavy orchestration platforms designed for production pipelines—not rapid experimentation.
We've been working on Daggr to solve problems we kept running into when building AI demos and workflows:.
In a recent development, visualize your code flow: Unlike node-based GUI editors, where you drag and connect nodes visually, Daggr takes a code-first approach. You define workflows in Python, and a visual canvas is generated automatically. This means you get the best of both worlds: version-controllable code and visual inspection of intermediate outputs.
It has been revealed that inspect and Rerun Any Step: The visual canvas isn't just for show. You can inspect the output of any node, modify inputs, and rerun individual steps without executing the entire pipeline. This is invaluable when you're debugging a 10-step workflow and only step 7 is misbehaving. You can even provide “backup nodes” – replacing one model or Space with another – to build resilient workflows.
First-Class Gradio Integration: Since Daggr is built by the Gradio team, it works seamlessly with Gradio Spaces. Point to any public (or private) Space and you can use it as a node in your workflow. No adapters, no wrappers—just reference the Space name and API endpoint.
According to recent reports, state Persistence: Daggr automatically saves your workflow state, input values, cached results, canvas position—so you can pick up where you left off. Use "sheets" to maintain multiple workspaces within the same app.
Install daggr with pip or uv, it just requires Python 3.10 or higher:.
Here's a simple example that generates an image and removes its background. Check out this Space’s API reference from the bottom of the Space to see which inputs it takes and which outputs it yields. In this example, the Space returns both original image and the edited image, so we return only the edited image.
In a recent development, that's it. Run this script and you get a visual canvas served on port 7860 introduced automatically, as well as a shareable live link, showing both nodes connected, with inputs you can modify and outputs you can inspect at each step.
Daggr supports three types of nodes:.
Industry observers note that gradioNode calls a Gradio Space API endpoint or locally served Gradio app. Passing run_locally=True, Daggr automatically clones the Space, creates an isolated virtual environment, and releases the app. If local execution fails, it gracefully falls back to the remote API.
FnNode — runs a custom Python function:.
InferenceNode — calls a model via Hugging Face Inference Providers:.
Generate a public URL with Gradio's tunneling:.
For permanent hosting, deploy on Hugging Face Spaces using the Gradio SDK—just add daggr to your requirements.txt.
We will now develop an app that takes in an image and generates a 3D asset. This demo can run on daggr 0.4.3. Here are the steps:.
Spaces that are run locally might take models to CUDA (with to.(“cuda”)) or ZeroGPU within the application file. To disable this behavior to run the model on CPU (useful if you have a device with no NVIDIA GPU) duplicate the Space you want to use and clone it.
The resulting graph looks like below.
Let’s write the first step, which is the background remover. We will clone and run this Space locally. This Space runs on CPU, and takes ~13 seconds to run. You can swap with this app if you have an NVIDIA GPU.
For the second step, we need to write a helper function to downscale the image and pass it to FnNode.
We can now pass in the function to initialize the FnNode.
We will now write the InferenceNode with the Flux model.
When deploying apps with InferenceNode to Hugging Face Spaces, use a fine-grained Hugging Face access token with the option "Make calls to Inference Providers" only.
Last node is 3D generation with querying the Trellis.2 Space on Hugging Face.
Chaining them together and launching the app is as simple as follows.
You can find the complete example running in this Space, to run locally you just need to take app.py, install requirements and login to Hugging Face Hub.
Daggr is in beta and intentionally lightweight. APIs may change between versions, and while we persist workflow state locally, data loss is possible during updates. If you have feature requests or find bugs, please open an issue here. We’re looking forward to your feedback! Share your daggr workflows on socials with Gradio for a chance to be featured. Check out all the featured works here.
It has been revealed that what about conditional nodes? I mean the node where the next selected node is determined based on the current node's output.
Recent findings suggest that this is a great point. We'd like to support them, but are thinking about the right API because we'd also like programmatic inspection / API usage, which requires some level of determinism. If you have any suggestions, please feel free to open an matter here: https://github.com/gradio-app/daggr.
It has been revealed that do you have any concerns running Daggr in a jupyter notebook? It should be supported, but if run into issues, please feel free to open an problem here: https://github.com/gradio-app/daggr.
According to recent reports, the visual inspection capability for chained apps is brilliant! Being able to see the flow programmatically while maintaining visibility is so key for debugging and understanding system behavior. Speaking of visualizing system flows, I've been using InfraSketch (https://www.infrasketch.net/) for documenting our application architectures—it generates diagrams from plain English descriptions and lets you refine through conversation. It's been a great complement to tools like Daggr for communicating the overall system design to the broader team.
Recent findings suggest that this is a solid approach to pipeline transparency. Working with Funnelsflex deployments, we often see a friction point between rigid UI funnel builders and the flexibility of raw Python scripts. Daggr seems to bridge that gap by keeping the logic in the code where it belongs, while providing the visual state persistence that’s usually missing in standard Gradio chains.
Industry observers note that the ability to rerun individual nodes without triggering the entire inference stack is a huge win for debugging complex flexible workflows. I’m curious to see how it handles state management when scaling to high-concurrency environments, but for rapid prototyping and 'inspectable' AI apps, it’s a very clean implementation.https://funnelsflex.io/.