Skip to main content
HeavenBase reads the warehouse map before it starts moving any boxes.

1. Motivation

Agents can reason about an external database more safely when tables, columns, enums, and connection summaries are ordinary typed rows. The optional database extension introspects schema metadata without copying source table data into HeavenBase.

2. Install SQL Support

This example uses SQLite, but ingestion also accepts a workspace SQL Backend name, DSN, or hb.Database instance.

3. Create a Tiny Source

The file is the external source. HeavenBase will store only redacted connection metadata and the discovered schema rows.

4. Enable and Ingest

Ingestion creates or updates six Entity kinds: db-database, db-table, db-column, db-enum, db-snippet, and db-predicate. Credentials are redacted from stored summaries.

5. Browse the Schema

The rows use normal HeavenBase Query, Catalog, search, and MCP surfaces. They describe the source; they do not mirror its business rows.

6. Understand Reconnection

The db-database row keeps a redacted source description. Live execution still needs the target environment to provide reachable connection information and credentials. After replaying a workspace manifest, call ws.database.ingest(...) again when live external metadata is required. Manifests do not export source databases or db-* row data.

Summary

  • The Database extension turns external schema into typed HeavenBase rows.
  • Ingestion redacts credentials and does not copy business data.
  • ws.database is the workspace-attached API for ingestion and snippet execution.
  • Re-ingest after reconstruction when live metadata is needed.

Further Exploration

Related resources: