← Integration Examples

LangGraph / Restaurant reservation

Protect a LangGraph restaurant tool

Run a restaurant reservation through a normal LangGraph ToolNode. When the booking response disappears, AnswerUp keeps the result uncertain until an independent check finds the same reservation. The example makes one booking and never sends the write again during recovery.

Run the local example

Download the Apache 2.0 source and obtain the three selected AnswerUp SDK archives separately through Package access. The archive includes the adapter, example, tests, QUICKSTART.md, LICENSE and NOTICE; it contains no private SDK packages. Use Linux, Node 22.23.2, npm 10.9.8, a Bash-compatible shell and a writable directory. Framework dependencies may require registry access; no model key or provider account is needed.

From the folder containing the source download, set ANSWERUP_SDK_DIR to the absolute folder containing your entitled archives, then run:

mkdir langgraph-source
tar -xzf langgraph-source.tar.gz -C langgraph-source
cd langgraph-source
export ANSWERUP_SDK_DIR=/absolute/path/to/your/sdk-archives
mkdir -p vendor
cp "$ANSWERUP_SDK_DIR/answerup-core-1.0.0-rc.1.tgz" vendor/
cp "$ANSWERUP_SDK_DIR/answerup-runtime-0.2.0-preview.5.tgz" vendor/
cp "$ANSWERUP_SDK_DIR/answerup-actions-0.2.0-preview.8.tgz" vendor/
npm ci --no-audit --no-fund
node scripts/quickstart.mjs
npm test

Use the included QUICKSTART.md for the exact dependency list, native SQLite prerequisites, full walkthrough and expected test output. The tested set includes TypeScript 5.9.3, LangGraph 1.5.3, LangChain Core 1.3.2, SQLite checkpointer 1.1.0, Zod 4.2.1, Core 1.0.0-rc.1, Runtime 0.2.0-preview.5 and Actions 0.2.0-preview.8.

What the example shows

The local run returned UNKNOWN → UNKNOWN → COMMITTED → COMMITTED: one booking, three independent reads and zero recovery redispatches. The accepted suite passed 13 tests, including graceful restart across four local processes and checkpoint replay before the original tool execution. These are local tests with a scripted tool call and sample restaurant, not a live voice, provider or model integration.

LangGraph checkpoints restore graph progress. They do not prove whether a business action happened. The AnswerUp host keeps the original effect binding and permits a current, verifier-only check before a confirmation. Your application still owns authentication, saved intent, authorization, the business-system writer, authoritative verification, protected storage and the customer message.

Before adapting it

The protected file host supports one trusted filesystem writer and graceful close and restart. It does not establish arbitrary-crash safety, distributed operation, production durability or exactly-once external execution. An unresolved UNKNOWN needs an authorized check or operator handling, never a blind retry of the write.

The source archive contains the complete runnable path. For the HTTP version of this restaurant scenario, see the Restaurant HTTP quickstart.