Setup guide
Get the development repository running locally and verify you are ready for the guided tour and the hands-on exercises. Full reference: doc/deployment/local.md — this page is the condensed, training-specific path through it.
Required accounts and permissions#
- A Snowflake account with Cortex Code access. Ask your asset owner if
you do not have one for training — a shared/sandbox connection may be available.
- Git access to
DevoteamSP/streamlit-coco-dev(the development repository).If you only need the published package,
pip install "streamlit-coco[sdk]"from PyPI is enough and you can skip step 1 below.
1. Clone and install#
git clone https://github.com/DevoteamSP/streamlit-coco-dev.git
cd streamlit-coco-dev
make install # uv sync --extra devVerify the package imports and check the version:
uv run python -c "import streamlit_coco as c; print(c.__version__)"2. Install and verify the CoCo CLI#
cortex --versionIf it is not on PATH, either install it or point at the binary:
export CORTEX_CODE_CLI_PATH=/path/to/cortexCocoOptions(cli_path=...) also works, in code, as an alternative to the environment variable.
3. Set up a Snowflake connection#
Create or confirm ~/.snowflake/connections.toml:
[connections.analytics]
account = "xy12345"
user = "you@company.com"
authenticator = "externalbrowser"Legacy ~/.snowflake/config.toml is also detected. When connection is omitted in CocoOptions, the SDK uses the Snowflake CLI's default connection.
4. Environment check (no agent started yet)#
uv run python -c "
import streamlit_coco as st_coco
env = st_coco.check_environment(connection='analytics')
print(env.ready, env.sdk_version, env.cli_version, env.snowflake_config_display)
"env.ready should print True. If not, see the troubleshooting table in doc/deployment/local.md §7 before continuing.
5. Run the test suite#
make check # ruff + unit/smoke pytest (excludes tests/e2e)All tests should pass. This confirms your Python environment matches CI.
6. Run your first demo#
make chatA browser tab opens with the panel() + chat_input_bar() demo (examples/chat_app.py). Type a prompt — for example *"What tables are available in SNOWFLAKE_SAMPLE_DATA.TPCH_SF1?"* — and confirm you see a streaming response with at least one tool card.
Verification checklist — you're ready when...#
uv run python -c "import streamlit_coco as c; print(c.__version__)"prints0.1.9cortex --versionsucceedscheck_environment(...).readyisTruemake checkpasses with no failuresmake chatopens a working app and you get a streamed response with at least one tool card
If every box is checked, move on to guided-tour.md.
Troubleshooting quick reference#
| Symptom | Fix |
|---|---|
SDKNotInstalledError | make install again, or pip install streamlit-coco[sdk] |
CLINotFoundError | Install the CLI; set CORTEX_CODE_CLI_PATH |
CocoConnectionError | Fix connections.toml; test with cortex --version and the Snowflake CLI directly |
| Session stuck on "Starting CoCo…" | Check terminal logs; set STREAMLIT_COCO_DEBUG=1 |
Full table: doc/deployment/local.md §7. The Technical Guide has the complete reference: help.html.