Skip to content

v0.8.0 — Lazy-Loading Relationships

Choose a tag to compare

@flyersworder flyersworder released this 12 Apr 07:46
· 76 commits to main since this release
353b2ca

Added

  • Lazy-loading relationships: When a semantic source has more than 30 relationships, the system prompt switches to a compact per-table join-count summary instead of listing every relationship. The agent uses the new lookup_relationships tool to fetch details on demand — same progressive-disclosure pattern used for metrics since v0.2.6.
  • lookup_relationships tool: New tool (11th) that returns all relationships involving a given table. When target_table is provided, finds the shortest multi-hop join path via BFS (up to 3 hops).
  • get_relationships_for_table() protocol method: Added to SemanticSource for filtered relationship lookup by table name. Implemented in YamlSource with an O(1) index; DbtSource and CubeSource return empty (ready for future implementation).
  • build_relationship_index() helper: Standalone function that builds a dict[str, list[Relationship]] index from a relationship list, keyed by table name.
  • find_join_path() helper: BFS shortest-path function that finds a chain of relationships connecting two tables, bounded by max_hops (default 3).

Changed

  • Tool count: Factory now produces 11 tools (was 10), adding lookup_relationships.

Full changelog: https://github.com/flyersworder/agentic-data-contracts/blob/main/CHANGELOG.md