I want to run the example apps
For anyone evaluating or learning the library · 20 min · a Snowflake connection for the CoCo-backed demos
You end up with each of the repo's example apps running locally, and know which one demonstrates which part of the API.
Before you start#
streamlit-coco[sdk]installed andcheck_environment().readyisTrue(see Getting started).
- A checkout of the repo (the examples run from
maketargets, not from apip install alone).
headless_pipeline.pyand the BI → Semantic estate-map/KPI screens runwithout a live Snowflake connection; the rest need one.
Steps#
- Run the preferred-pattern chat demo:
make chatThis is
examples/chat_app.py— the smallest working app built oncheck_environment→render_start_gate→get_or_create_session→panel()+chat_input_bar(). Its sidebar includes a test-prompt runner backed byexamples/testdata/prompts.json. - Run the legacy all-in-one demo:
make approvalThis is
examples/approval_gate.py, built on the legacy CCv2chat()helper instead ofpanel(). - Run the structured-output demo:
make structuredThis is
examples/structured_output.py— it setsoutput_schemaand routes the agent's JSON into a widget viaon_structured_outputinstead of chat text. - Run the headless demo from a terminal, no browser:
make headlessThis is
examples/headless_pipeline.py— pure async Python with no Streamlit import, drivingquery()andCocoSessiondirectly. - Run the file-upload demo:
make cwd-uploadThis is
examples/cwd_upload_chat.py—chat_input_bar(accept_file=...)andcwd_uploader()wiring browser uploads into the agent'scwd. - Run the two multipage, right-rail demos:
make backlog # Product Backlog Desk — file/JSON-backed, no SQL make bi-semantic # BI -> Semantic (alias: make tableau-semantic) - Run the guided app-generation demo:
make app-builder
Each make target and its variables are listed in Command reference; what each example demonstrates and what it needs is in Example apps reference.
Result#
Each make target opens (or prints, for make headless) a running app on its own port. Nothing outside examples/ is modified by running a demo; generated artifacts land under each example's own out/ or data/ directory — see Outputs.
Variations#
make runrunsexamples/chat_app.pyby default; setEXAMPLE=to pointit at a different example file.
make tableau-semanticis a deprecated alias formake bi-semantic— usethe latter.