Skip to content

Example Graphs

The demo API registers the following graphs. They demonstrate LGOS features; none is installed as a built-in model by the langgraph-openai-serve package. Each registration also supplies a short GraphConfig.description used by the demo model catalogs.

Model Demonstrates Graph feature Graph-specific dependency
custom-input-output-context Request, output, and typed runtime-context adapters None None
citation-events Structured OpenAI URL citations with portable Markdown content None None
file-input Central Files API IDs resolved into OpenAI Responses file inputs file_inputs Central Files API and upstream Responses model
advanced-mcp-tools Async graph factories and a mock MCP-style tool None None
complex-subgraphs Router-selected subgraphs, status, and nested streamed output client_events None
custom-event-showcase Filtering internal progress and artifact events at the API boundary client_events None
multi-node-streaming Two sequential fake-model nodes contributing ordered text to one assistant message None None
status-events Portable status updates for native client UI client_events None
persistent-plot-agent A tool-calling agent with an editable thread-scoped chart None Upstream model, Files API, and PostgreSQL store
interruptible-approval Durable choice-or-text human review before protected actions interrupts PostgreSQL checkpointer and run coordinator
simple-graph Streamed model output and discoverable runtime settings None Upstream chat model
simple-graph-external-tools Client-provided function tools returned as model tool calls None Upstream chat model
hosted-tool A client-requested time tool executed on LGOS None Upstream chat model
lgos-rag Agentic retrieval with structured URL citations over the packaged demo corpus client_events Upstream chat and embedding models

The demo API opens its PostgreSQL runtime during application startup, so PostgreSQL must be available even when you call a provider-free graph. Start it with the demo API instructions.

persistent-plot-agent stores application data with a LangGraph Store. interruptible-approval checkpoints graph execution. Neither mechanism makes LGOS the owner of UI conversation history.

Source Map

All graph code is owned by the independent demo/api project:

  • demo/api/src/lgos_demo_api/app.py registers graph names as OpenAI model names.
  • demo/api/src/lgos_demo_api/graphs/ contains every graph and adapter listed above.
  • demo/api/src/lgos_demo_api/corpus/ contains the Markdown packaged with the lgos-rag example.

Continue with Run the Demo API for request examples or Chainlit and Open WebUI for UI behavior.