This workshop is a docs transcript of
demos/enterprise/02_snippets_and_predicates.py and 03_agent_analysis_session.py. Live LLM analysis is optional (HVNB_RUN_LLM_DEMO=1).database MCP profile, and simulate an agent analysis session. MCP tool-call logging is documented but not yet shipped on the current release base.
1. Prerequisites
Complete Data connection or ensuredemos/data/warehouse.db exists:
2. Register Snippets and Predicates
Script:demos/enterprise/02_snippets_and_predicates.py
Store readonly SQL as db-snippet rows and reusable filters as db-predicate rows:
3. Run Snippets Through the Database Profile
Thedatabase profile extends read/query tool groups and adds run_snippet and suggest_sql. It auto-enables the extension on first use:
heavenbase.database.allow_write=true in CM_HVNB (default false).
4. Agent Analysis Session
Script:demos/enterprise/03_agent_analysis_session.py
Expose the database profile and simulate in-process agent calls:
deepseek-v4-flash and attaches the database MCP toolkit to an LLMSession.
5. Session Logging (Planned)
MCP tool-call logging viaheavenbase.mcp.log_sessions is specified in the prototype plan but not implemented on the current release base. CLI logging through hb llm chat and hb llm session is shipped today.
When MCP logging lands, enterprise demo 03 documents three meta-analysis queries over agent-message rows:
- Tool frequency — group by
tool_name - Error rate — filter rows where
error_flagis true - Slow calls — sort by
duration_msdescending
Summary
- Readonly
db-snippetrows execute safely through thedatabaseprofile; write access stays off by default. suggest_sqlsearches snippets and predicates by card text without calling an LLM inside the engine.- Agents connect through MCP with a small, schema-aware tool surface scoped to
db-*entities.

