By the end of this guide you will have OntoBricks running locally and connected to your Databricks workspace, ready to design your first ontology and explore a graph viewer.
Before you begin, ensure you have:
- Python 3.10+ installed on your system
- Databricks workspace access (Databricks Apps must be enabled)
- Personal Access Token from Databricks (local dev) or service-principal auth (Databricks Apps)
- SQL Warehouse in the workspace (you will need its ID for local dev)
- Databricks Lakebase Autoscaling project + branch + Postgres database — used for the domain registry (domains, versions, permissions, schedules, global config) and for the Graph DB triple store. Required since v0.4.0. Provisioned Lakebase instances are not supported.
- Unity Catalog Volume — reserved for binary artefacts (
documents/uploads — domain-scoped attachments imported by the ontology designer). The same catalog/schema that hosts the volume is also used by OntoBricks for the Delta triple-store family (triplestore_<domain>_V<n>VIEW plus_data/_inferredtables and the_graphunion VIEW — see Architecture → Lakehouse Unity Catalog objects). psql(libpq client) onPATHfor the Lakebase permission bootstrap scripts. On macOS:brew install libpq && brew link --force libpq.
Lakebase note. OntoBricks targets Lakebase Autoscaling exclusively. Create a project + branch from the Databricks workspace UI (Compute → Postgres → New project) or via
databricks api post /api/2.0/postgres/projects …, then create at least one Postgres database in it. Note thedb-…resource id fromdatabricks postgres list-databases "projects/<id>/branches/<branch>" -o json— you'll need it for the deployment bundle.
# Clone the repository
git clone <repository-url>
cd OntoBricks
# Make the setup script executable and run it
chmod +x scripts/setup.sh
scripts/setup.shThe setup script will:
- Check your Python version
- Install uv package manager (if not present)
- Create a virtual environment
- Install all dependencies
- Create a
.envtemplate file
# Clone the repository
cd OntoBricks
# Create virtual environment
python -m venv .venv
# Activate virtual environment
source .venv/bin/activate # On macOS/Linux
# .venv\Scripts\activate # On Windows
# Install dependencies (Lakebase Postgres driver is mandatory since v0.4.0)
uv sync --frozen --extra lakebase
# Or with pip:
pip install -e ".[lakebase]"Why
--extra lakebase? Since v0.4.0 the domain registry lives in Lakebase Postgres, sopsycopg[binary]andpsycopg-poolare required at runtime. They are declared as optional inpyproject.toml([project.optional-dependencies] lakebase) so volume-only forks can opt out, but every standard deployment must install them.
Your workspace URL, for example:
- Azure:
https://adb-1234567890123456.7.azuredatabricks.net - AWS:
https://dbc-a1b2c3d4-e5f6.cloud.databricks.com - GCP:
https://12345678901234.8.gcp.databricks.com
- In Databricks, click your username (top right)
- Select User Settings
- Go to Access tokens tab
- Click Generate new token
- Give it a name (e.g., "OntoBricks")
- Set expiration (e.g., 90 days)
- Click Generate and copy the token immediately
- In Databricks, go to SQL Warehouses
- Click on your warehouse
- Find the ID in the URL or Connection Details tab:
/sql/1.0/warehouses/abc123def456 ↑ This is your ID
Create a .env file in the OntoBricks directory:
# Databricks Configuration (Required)
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=dapi1234567890abcdef
DATABRICKS_SQL_WAREHOUSE_ID=abc123def456
# Registry Volume — required if you want the binary-artefact volume
# to be available in local dev. The volume must already exist in UC.
REGISTRY_CATALOG=<your-catalog>
REGISTRY_SCHEMA=<your-schema>
REGISTRY_VOLUME=OntoBricksRegistry
# Lakebase (Required since v0.4.0 for the domain registry)
# When deployed as a Databricks App with a `database` resource bound,
# Databricks auto-injects PG* — leave these unset in that case.
# For local dev use the semantic coordinates below:
LAKEBASE_PROJECT=ontobricks-app # Autoscaling project name
LAKEBASE_BRANCH=develop # Branch to connect to
LAKEBASE_DATABASE=ontobricks_registry # Postgres database (datname)
LAKEBASE_SCHEMA=ontobricks_registry # Postgres schema for the registry
PGUSER=you@example.com # Your Databricks email (local dev)
# Postgres password is minted at runtime via `LakebaseAuth.password()`,
# do NOT set PGPASSWORD here.
# Optional Configuration
SECRET_KEY=your-secret-key-here
DATABRICKS_APP_PORT=8000Lakebase auth in local dev. The Postgres password is a short-lived JWT minted by
LakebaseAuthviaPOST /api/2.0/postgres/credentialsusing yourDATABRICKS_TOKEN. SetLAKEBASE_PROJECT+LAKEBASE_BRANCH(and optionallyLAKEBASE_DATABASE) in.env—LakebaseAuthresolves the endpoint hostname automatically via the Postgres API. In a deployed App,PGHOST/PGDATABASE/PGUSERare auto-injected by the platform;LAKEBASE_*vars then serve as informational labels only.
# Using the start script (recommended)
scripts/start.sh
# Run in background
scripts/start.sh --background
# Or using make
make run
# Or manually
source .venv/bin/activate
python run.py# Using the stop script
scripts/stop.sh
# Or press Ctrl+C if running in foregroundOpen your browser to: http://localhost:8000
When running as a Databricks App, OntoBricks enforces role-based access control:
- Admin: Users with CAN_MANAGE on the Databricks App. They can manage per-domain roles in Settings → Admin → Teams.
- Editor: Full read/write access to all features.
- Viewer: Read-only access.
- No role: Blocked from accessing the app entirely.
First-time setup: When no permissions are configured yet, only users with CAN_MANAGE on the Databricks App have access. Everyone else is blocked. Grant app access in Databricks → Apps → Permissions, then assign domain roles via Settings → Admin → Teams.
To manage permissions, you must:
- Have CAN_MANAGE set on the app in the Databricks UI (Compute → Apps → ontobricks → Permissions)
- The app's service principal must have CAN_MANAGE on itself —
make deployrunsscripts/bootstrap/app-permissions.shautomatically; otherwise runmake bootstrap-perms. See the Deployment Guide. - The app's service principal must have USAGE + DML on the Lakebase
registry / graph / sync schemas —
scripts/deploy.shrunsscripts/bootstrap/lakebase-perms.shautomatically on thedev-lakebasetarget; otherwise runmake bootstrap-lakebase. See the Deployment Guide §2 Step 5b. - The app's service principal must have Unity Catalog privileges on the registry catalog/schema/volume and on every source table referenced by an R2RML mapping. See the Deployment Guide §3 for the exact grants.
In local development mode, there are no restrictions — all users have full admin access.
- Click Settings in the navigation bar
- Your credentials should be loaded from
.env - Select a SQL Warehouse from the dropdown
- Click Test Connection to verify
- You should see "Connection successful"
- Open Settings → Registry. On a fresh Lakebase database the
registry tables don't exist yet — click Initialize. This runs
the schema migration in
LAKEBASE_SCHEMA(defaultontobricks_registry) and creates the registry Volume if missing. Then runmake bootstrap-lakebaseonce to grant the app SP USAGE/DML on the freshly-created schema.
The fastest way to create an ontology is using the visual Business Views interface:
- Go to the Ontology page (click on "Ontology" in the navbar)
- Click Business Views in the sidebar
- Click + Add Entity button
- A new entity appears on the canvas
- Click on the entity name to edit it (e.g., "Person")
- Click the + button on the entity to add attributes
- Click the 🎨 button to add an icon
- Click the 📝 button to add a description
- Click and drag from one entity's connector (○) to another
- Click on the relationship label to rename it (e.g., "worksIn")
- Click the direction button (→/←/↔) to set the relationship direction
- Click + on the relationship to add attributes
- Drag entities to reposition them
- Click Auto Layout to organize automatically
- Click Center to fit everything in view
- Use the scroll wheel to zoom
All changes are automatically saved.
Alternatively, use the traditional form interface:
- Click Information in the sidebar
- Set an Ontology Name (e.g., "MyOrganization")
- The Base URI is auto-generated from the configured domain
- Click Entities in the sidebar
- Click "Add Class"
- Enter a name (e.g., "Person", "Department")
- Add attributes in the Attributes section
- Choose an icon
- Click "Add"
- Click Relationships in the sidebar
- Click "Add Property"
- Select source entity (Domain)
- Select target entity (Range)
- Set the direction (Forward/Reverse/Bidirectional)
- Add relationship attributes if needed
- Click "Add"
- Click OWL to see your generated ontology in Turtle format
- Click Validate to check your ontology
- Click Save to store in Unity Catalog
Load Unity Catalog tables from Domain → Data Sources → Add Data Source
(catalog and schema picker). Editors and Builders can do this with CAN_USE;
they do not need CAN_MANAGE. Viewers cannot import or remove sources.
Then map those tables on the Mapping page:
- Go to the Mapping page (click on "Mapping" in the navbar)
- Your ontology must be loaded (indicated by green checkmark)
- Click Designer in the sidebar to use the visual mapping interface
- Click on entities to open the mapping dialog:
- Enter a SQL query that returns entity data (e.g.,
SELECT * FROM main.default.person) - Click Test Query to validate and preview results
- Select the ID Column for generating unique URIs
- Select the Label Column for display names
- Map each entity attribute to a query column
- Click "Save Mapping"
- Enter a SQL query that returns entity data (e.g.,
- Click on relationships to map them:
- Write a SQL query that returns source and target IDs
- Click Test Query to validate
- Select source and target ID columns from results
- Click "Save Mapping"
- Click Manual in the sidebar for advanced mapping options
-
Navigate to Domain → Export
-
View the auto-generated R2RML mapping
-
Copy or download as needed
-
Click Validate (in navbar) to verify all mappings are complete
- Go to the Knowledge Graph page
- Click Build in the sidebar, then click Synchronize to generate triples from your mappings and write them to Unity Catalog and Lakebase
- Click Explorer in the sidebar to explore your graph viewer interactively:
- Click on entities to see details in the right panel
- Use Find to search for specific entities
- Use Filters to narrow down by entity type, field, or depth
- View all mapped attributes, values, and relationships
- Run Data Quality checks from the Data Quality sidebar section — validates cardinality, datatypes, patterns, and custom SPARQL rules against the triple store
- Run inference from the Inference sidebar section — executes OWL 2 RL inference and SWRL business rules to discover inferred triples
- Access the Query sidebar section to query your graph viewer with auto-generated typed GraphQL queries
# Start application
scripts/start.sh
# Start in background
scripts/start.sh --background
# Stop application
scripts/stop.sh
# Run tests
make test
# Format code
make format
# Clean up
make clean
# Show all make commands
make helpThe OntoBricks interface has a navigation bar with status indicators:
| Element | Description |
|---|---|
| SQL Warehouse | Dropdown to select/switch SQL warehouses |
| Ontology | Shows ✓ (green) when ontology is loaded, ✗ (red) otherwise |
| Mapping | Shows ✓ (green) when R2RML mapping exists, ✗ (red) otherwise |
| Knowledge Graph | Access the sync, graph viewer, and quality checks interface |
| Settings | Manage Databricks connection and settings |
| Menu Item | Description |
|---|---|
| Information | Basic ontology settings (name, URI) |
| Import | Import OWL, RDFS, FIBO, CDISC, IOF standards |
| Generate | AI-powered ontology generation from database schema using an LLM |
| Designer | Interactive force-directed ontology graph (OntoViz canvas) |
| Groups | Manage entity groupings |
| Business Views | Visual drag-and-drop business view designer |
| Entities | Manage classes with form interface |
| Relationships | Manage object properties |
| Data Quality | SHACL shape-based data quality rules |
| Business Rules | Define SWRL inference rules (graphical D3 editor) |
| Cohorts | Define cohort queries for data slicing |
| Expr. & Axioms | OWL class expressions and axioms |
| Pitfalls | Automated ontology pitfall detection |
| OWL | View generated Turtle/OWL |
Tip: The Generate wizard provides domain-specific quick templates (CRM, E-Commerce, IoT, Healthcare, Energy). These are defined in
src/shared/config/constants.pyand can be customised or extended.
- Verify your
DATABRICKS_HOSTincludeshttps:// - Check your token hasn't expired
- Ensure the SQL Warehouse is running (check Databricks UI)
- Verify network connectivity
- Check catalog and schema names are correct (case-sensitive)
- Verify you have permissions to access the schema
- Try listing tables directly in Databricks SQL
Change the port in .env:
DATABRICKS_APP_PORT=8080Then restart the application.
If you have issues with the virtual environment:
# Remove existing environment
rm -rf .venv
# Run setup again
scripts/setup.sh- Ensure both Ontology and Mapping have green checkmarks in the navbar
- Check that the R2RML mapping is generated (visible in Domain → Export)
- Verify the SQL Warehouse is running and accessible
- Check browser console for any errors
- Wait for the "Saving..." indicator to complete
- Switch to another tab and back to refresh
- Check browser console for any errors
- Read the User Guide for detailed instructions
- See the Architecture for technical details
- Check Deployment for Databricks Apps deployment
- Explore the MCP Server for Databricks Playground integration
- Review Data Quality for SHACL shape validation
- Explore Reasoning for OWL 2 RL and SWRL inference
- See the External API for REST and GraphQL programmatic access
Need help? Check the troubleshooting section or review the logs in .ontobricks.log when running in background mode.
OntoBricks uses environment variables for configuration, making it easy to deploy in different environments without code changes.
| Variable | Description | Example |
|---|---|---|
DATABRICKS_HOST |
Your Databricks workspace URL | https://your-workspace.cloud.databricks.com |
DATABRICKS_TOKEN |
Personal access token or service principal token | dapi1234567890abcdef... |
DATABRICKS_SQL_WAREHOUSE_ID |
SQL Warehouse identifier | abc123def456... |
| Variable | Description | Default |
|---|---|---|
SECRET_KEY |
Secret key for session encryption | Random (dev only) |
DATABRICKS_APP_PORT |
Port the application listens on | 8000 |
REGISTRY_VOLUME_PATH |
Full volume path injected by the Databricks App volume resource (/Volumes/<catalog>/<schema>/<volume>). When set, overrides the three REGISTRY_* variables below. |
(from volume resource) |
REGISTRY_CATALOG |
Unity Catalog catalog for the domain registry (local dev fallback) | (from session or Settings) |
REGISTRY_SCHEMA |
Schema for the domain registry (local dev fallback) | (from session or Settings) |
REGISTRY_VOLUME |
Volume name for domain storage (local dev fallback) | OntoBricksRegistry |
DATABRICKS_TRIPLESTORE_TABLE |
Default triple store table (catalog.schema.table) | (none) |
DATABRICKS_SQL_WAREHOUSE_ID_DEFAULT |
Fallback SQL Warehouse ID for MCP/API calls | (none) |
| Variable | Description | Default / Source |
|---|---|---|
LAKEBASE_SCHEMA |
Postgres schema used by the registry inside PGDATABASE. Mirror the bundle's lakebase_registry_schema. |
ontobricks_registry |
LAKEBASE_PROJECT |
Lakebase Autoscaling project id (projects/<this>/...). Used by LakebaseAuth for local dev host resolution. In deployed Apps, informational only (injected via app.yaml). |
(set in .env for local dev) |
LAKEBASE_BRANCH |
Branch to connect to (e.g. develop, production). Used together with LAKEBASE_PROJECT to resolve the endpoint hostname locally. |
(set in .env for local dev) |
LAKEBASE_DATABASE |
Postgres database name (datname). Resolved from the branch when unset. |
(set in .env for local dev) |
PGHOST |
Lakebase Autoscaling endpoint (ep-<id>.database.<region>.cloud.databricks.com). Auto-injected by the database Apps resource binding — do not set in .env. |
(auto-injected by the Apps platform) |
PGPORT |
Postgres port. | 5432 |
PGDATABASE |
Postgres database name. Auto-injected by the Apps platform. | (auto-injected) |
PGUSER |
Postgres role — for local dev, your Databricks email; in Apps, the SP client id. | (auto-injected in Apps; set in .env locally) |
The Postgres password is never set via env var — LakebaseAuth
mints a short-lived JWT via POST /api/2.0/postgres/credentials using
the workspace token (locally) or the SP token (in Apps).
| Variable | Description | Default |
|---|---|---|
MLFLOW_TRACKING_URI |
Set to databricks to persist agent traces to the workspace tracking server. When unset, traces go to a local mlflow.db file. |
(none) |
ONTOBRICKS_MLFLOW_EXPERIMENT |
Experiment name for agent traces. On Databricks, relative names are automatically prefixed with /Shared/. |
ontobricks-agents |
| Variable | Description | Default |
|---|---|---|
ONTOBRICKS_URL |
URL of the main OntoBricks app (used by the MCP server) | http://localhost:8000 |
| Variable | Description | Default |
|---|---|---|
ONTOBRICKS_ANALYTICS_MAX_TRIPLES |
Max triples loaded into memory for community detection (POST /clusters/detect). Not used by graph analytics, which always runs on the Lakeflow job. |
500000 |
ONTOBRICKS_ANALYTICS_TOP_N |
How many top-ranked nodes per metric the job returns per output table. Keeps the persisted payload bounded on very large graphs; must stay above the Analytics page "Top N" selector maximum (50). | 100 |
ONTOBRICKS_ANALYTICS_JOB_ENABLED |
Initial value only — admins override this in Settings → Global (Compute large-graph metrics on Databricks), and their choice wins, including an explicit "off". Enables the serverless Lakeflow job that computes all graph KPIs. Requires the bundle to be deployed and the domain to have been built (which materialises the …_data Delta snapshot the job reads). |
false |
ONTOBRICKS_ANALYTICS_JOB_NAME |
Deployed name of that job. Empty derives <app name>-graph-analytics, matching the bundle. A bundle deployed in development mode prefixes the name with [dev <user>] , which is matched automatically. |
(derived) |
ONTOBRICKS_ANALYTICS_JOB_OUTPUT_SCHEMA |
catalog.schema holding the job's per-node output tables (one per domain version). Empty uses the registry catalog/schema. |
(registry) |
ONTOBRICKS_ANALYTICS_JOB_TIMEOUT_S |
How long to follow a job run before giving up waiting. The run itself is not cancelled. | 3600 |
ONTOBRICKS_ANALYTICS_JOB_PAGERANK_ITERATIONS |
PageRank power iterations the job runs. 20 fixes the top-N ordering; raise for converged absolute scores. | 20 |
ONTOBRICKS_ANALYTICS_JOB_PIVOTS |
Source nodes sampled for the betweenness/closeness estimates. Dominant cost of the job — the intermediate search holds one row per (pivot, reachable node). 0 skips both metrics; a value at or above the node count makes them exact. |
64 |
ONTOBRICKS_ANALYTICS_JOB_MAX_DEPTH |
How many levels the pivot breadth-first search may explore. A runaway guard, not a tuning knob: the search stops as soon as it runs out of frontier, so headroom costs nothing on a shallow graph. Hitting the cap withholds betweenness and closeness rather than reporting truncated values, so raise this if the Analytics page reports them as unavailable. | 32 |
| Variable | Description | Set By |
|---|---|---|
DATABRICKS_RUNTIME_VERSION |
Databricks runtime version | Databricks (automatic) |
When this variable is present, OntoBricks automatically switches to production mode and uses service principal authentication.
Create a .env file in the project root:
## Databricks Configuration
DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
DATABRICKS_TOKEN=dapi1234567890abcdef...
DATABRICKS_SQL_WAREHOUSE_ID=abc123def456...
## Optional Configuration
SECRET_KEY=your-secret-key-here
DATABRICKS_APP_PORT=8000
## Performance / Observability (optional)
LOG_FORMAT=json # Structured JSON logging (default: text)
LOG_LEVEL=INFO # DEBUG, INFO, WARNING, ERROR, CRITICAL
ONTOBRICKS_THREAD_POOL_SIZE=20 # Max threads for blocking I/O
ONTOBRICKS_ANALYTICS_MAX_TRIPLES=500000 # Community detection in-memory triple cap
ONTOBRICKS_ANALYTICS_TOP_N=100 # Top nodes per metric returned by the Lakeflow job
ONTOBRICKS_ANALYTICS_JOB_ENABLED=false # Initial value; admins override it in Settings → Globalexport DATABRICKS_HOST=https://your-workspace.cloud.databricks.com
export DATABRICKS_TOKEN=dapi1234567890abcdef...
export DATABRICKS_SQL_WAREHOUSE_ID=abc123def456...When deploying to Databricks Apps, set environment variables in the app configuration:
- Navigate to your app in Databricks UI
- Go to Configuration → Environment Variables
- Add the required variables
- Restart the app
Note: In Databricks Apps, DATABRICKS_HOST and authentication are typically handled automatically by the service principal.
OntoBricks automatically detects and uses environment variables in the following priority:
- Environment Variables: Direct OS environment variables
- App Settings: Application configuration (loaded from environment via Pydantic)
- Manual Entry: User input through the settings page
When you open the Settings page:
- Environment Variables Set: Fields are pre-populated and marked as read-only
- No Environment Variables: Fields are empty and editable
- Partial Configuration: Mix of pre-populated and editable fields
When the app is deployed with Databricks App resource bindings (sql-warehouse and/or volume), the corresponding Settings controls are locked:
- SQL Warehouse: The warehouse dropdown and refresh button are disabled. A lock icon indicates the value is configured via the Databricks App resource.
- Registry: The Change button is disabled. If the volume is bound but the registry is not yet initialized, the Initialize button remains available so an admin can bootstrap the registry.
To change these values, update the resource bindings in Compute > Apps > Resources and restart the app.
The configuration page shows:
ℹ️ Using credentials from environment
And individual fields show:
✓ Loaded from environment
For fields that are automatically configured.
- Use .env file: Keep credentials in
.env(never commit to git) - Add to .gitignore: Ensure
.envis in.gitignore - Use example file: Provide
.env.examplefor team members
- Use Service Principal: Avoid personal access tokens in production
- Environment-Only: Set all credentials as environment variables
- Secret Management: Use Databricks Secrets or similar
- Rotate Regularly: Change tokens and secrets periodically
Problem: Configuration page is empty despite setting environment variables
Solutions:
- Restart the application after setting variables
- Check variable names match exactly (case-sensitive)
- Verify variables are exported in the shell
- Check
.envfile location (must be in project root)
Problem: Can't edit configuration fields
Reason: Fields are loaded from environment variables
Solutions:
- Unset environment variables to allow manual entry:
unset DATABRICKS_HOST unset DATABRICKS_TOKEN
- Or override by restarting app without loading
.env
Problem: Connection fails despite token being set
Solutions:
- Verify token hasn't expired
- Check token has correct permissions
- Ensure no extra spaces or quotes in
.envfile - Test token with curl:
curl -H "Authorization: Bearer $DATABRICKS_TOKEN" \ $DATABRICKS_HOST/api/2.0/clusters/list
## .env
DATABRICKS_HOST=https://my-workspace.cloud.databricks.com
DATABRICKS_TOKEN=dapi1234567890abcdef
DATABRICKS_SQL_WAREHOUSE_ID=abc123
SECRET_KEY=dev-secret-key
DATABRICKS_APP_PORT=8000
## MLflow (optional — persist traces to Databricks)
MLFLOW_TRACKING_URI=databricks## Injected from app.yaml resource bindings
DATABRICKS_SQL_WAREHOUSE_ID=<from sql-warehouse resource>
REGISTRY_VOLUME_PATH=<from volume resource, e.g. /Volumes/catalog/schema/volume>
## Set via app.yaml env section
MLFLOW_TRACKING_URI=databricks
DATABRICKS_APP_PORT=8000
## Static fallbacks (used for local dev / MCP when no resource is bound)
REGISTRY_CATALOG=main
REGISTRY_SCHEMA=default
REGISTRY_VOLUME=OntoBricksRegistry
## MCP server (when deployed as separate app)
ONTOBRICKS_URL=https://your-ontobricks-app-url.databricks-apps.com
## Automatically set by Databricks
DATABRICKS_HOST=<automatically-configured>
## Authentication via service principal (automatic)When both the sql-warehouse and volume resources are bound, the Settings UI locks the warehouse and registry controls. See the Deployment Guide for details.
## Set as secrets in CI/CD system
DATABRICKS_HOST=${{ secrets.DATABRICKS_HOST }}
DATABRICKS_TOKEN=${{ secrets.DATABRICKS_TOKEN }}
DATABRICKS_SQL_WAREHOUSE_ID=${{ secrets.WAREHOUSE_ID }}Some application-wide constants are not controlled by environment variables. These live in src/shared/config/constants.py and include:
| Constant | Default | Description |
|---|---|---|
APP_NAME |
"OntoBricks" |
Application display name |
APP_VERSION |
(read from pyproject.toml) |
Current version string, resolved at runtime by _read_version() |
ONTOBRICKS_NS |
http://ontobricks.com/schema# |
RDF namespace for OntoBricks extensions |
DEFAULT_BASE_URI |
http://ontobricks.com/ontology# |
Default ontology base URI |
LLM_DEFAULT_MAX_TOKENS |
4096 |
Default max tokens for LLM generation |
LLM_DEFAULT_TEMPERATURE |
0.1 |
Default temperature for LLM generation |
WIZARD_TEMPLATES |
(dict) | Ontology Wizard quick-template definitions (CRM, IoT, Energy, etc.) |
MAX_NOTIFICATIONS |
10 |
Max notification messages shown in the notification center |
AUTO_ASSIGN_CHUNK_SIZE |
5 |
Max entities + relationships per auto-map agent run |
AUTO_ASSIGN_CHUNK_COOLDOWN |
15 |
Seconds to wait between auto-map chunks (avoids LLM rate limits) |
These values are edited directly in the Python file. They do not depend on .env or OS environment variables.
When the application starts, configuration is loaded in this order (later values override earlier ones):
- Default values in code (including
src/shared/config/constants.py) - Environment variables from OS
.envfile (if present)- Manual user input (stored in session)
The application validates environment variables on startup:
- ✅ Valid: All required variables present and well-formed
⚠️ Partial: Some variables missing (manual input required)- ❌ Invalid: Variables present but malformed (check format)
Check the terminal output on startup for validation messages.