Docs · Quick start
LangGraph
Your graph on the board while it runs: each node updates its card as it finishes.
Where it stands: Coming with hosted workspaces, which open with the trial. Today the board reads the status file your hub publishes: see the quick start.
Steps
- Make a write key. In your workspace, open Keys and make a write key for this bot. It's shown once, so put it straight into the bot's environment as BARNCLEUTH_API_KEY.
- Run the graph through this. It streams the compiled graph's updates, the same ones you'd get yourself.
import json, os, urllib.request def barncleuth(state, note=""): body = json.dumps({"bot_id": "my-graph", "state": state, "note": note}).encode() request = urllib.request.Request("https://barncleuth.com/api/heartbeat", data=body, headers={ "Authorization": "Bearer " + os.environ["BARNCLEUTH_API_KEY"], "Content-Type": "application/json", }) urllib.request.urlopen(request, timeout=10).read() def run(app, inputs): barncleuth("LIVE", "Graph started") for update in app.stream(inputs, stream_mode="updates"): for node in update: barncleuth("LIVE", f"Finished {node}") barncleuth("DONE", "Graph finished") - Use it. Compile as usual, then run.
app = builder.compile() run(app, {"topic": "Mars"})
What it sends
The bot's id, its state and node names. Never the graph's state.
How it's tested
Tested in Python against a stand-in shaped like a compiled graph's stream. Not against a live LangGraph install yet.