From e977ed118cac0c736f55d30911b6b4345f3ddabf Mon Sep 17 00:00:00 2001 From: "zhao.wang" Date: Tue, 18 Aug 2026 20:48:56 +0800 Subject: [PATCH] docs: fix the Graph API example on the applications page The snippet was missing a dot on .with_state, so it raised a SyntaxError when copied, and it imported default/expr while leaving GraphBuilder undefined. Co-authored-by: Cursor --- docs/concepts/state-machine.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/concepts/state-machine.rst b/docs/concepts/state-machine.rst index 2fea48aea..1e3ce10d7 100644 --- a/docs/concepts/state-machine.rst +++ b/docs/concepts/state-machine.rst @@ -171,7 +171,7 @@ in a web-server (create a graph once, application many times), import the graph .. code-block:: python - from burr.core import ApplicationBuilder, default, expr + from burr.core import ApplicationBuilder, GraphBuilder graph = ( GraphBuilder() .with_actions(human_input, ai_response) @@ -183,7 +183,7 @@ in a web-server (create a graph once, application many times), import the graph app = ( ApplicationBuilder() .with_graph(graph) - with_state(chat_history=[]) + .with_state(chat_history=[]) .with_entrypoint("human_input") .build() )