Creating Agent-Ready Knowledge Bundles: A Step-by-Step Guide with Disaster Database Example

October 3, 2026
Creating Agent-Ready Knowledge Bundles: A Step-by-Step Guide with Disaster Database Example
  • Three code examples illustrate the core components: readers.py handles parsing the schema, meanings, and rules; concept.py manages the frontmatter and body writer; and tables.py generates a table concept with columns, meanings, joins, and embedded JSON fields.

  • The final project layout centers on a disaster bundle, with bundles/compiled/disaster housing 10 table concept files, illustrating the repository structure needed to reproduce the workflow.

  • An OKF-based pipeline is introduced to convert database documentation into an agent-ready knowledge bundle, featuring a compiler, an agent, and a comparison workflow.

  • The workflow extends to generating table concepts and rule concepts, linking rules to tables, producing human-readable descriptions, and creating cross-links between related rules; the CLI is updated to emit the compiled bundle.

  • A diagnostic tool, inspect_db.py, outputs a summary of tables, columns, and rules, identifies gaps where meanings are missing, and demonstrates validation on disaster and mental health databases.

  • Design choices include using plain-text descriptions derived from column names for table descriptions and preserving LaTeX formulas within rule definitions.

  • The disaster LiveSQLBench database—consisting of 10 tables and 54 business rules—is used as the example to generate a bundle that maps schemas, meanings, and rules to concepts for an agent.

  • The project layout specifies required files and directories, including data/, bundles/, okf_compiler/ with modules (readers.py, concept.py, tables.py, rules.py, cli.py), a docker-compose.yml, inspect_db.py, and a README.md.

  • The compiler ingests three raw inputs (SQL schema, JSON for column meanings, and JSONL rules), constructs Python objects (Table, Column, ForeignKey, Rule), attaches column meanings, and detects missing descriptions.

Summary based on 1 source


Get a daily email with more Tech stories

More Stories