Branch Isolation

Speculate Without Consequence

Instant zero-copy branches for speculative queries, A/B testing, and pipeline validation. Full production data. Zero production risk. Merge or discard.

HOW IT WORKS

Schema-Based Isolation

Branches are implemented as isolated schemas with zero-copy views on creation and copy-on-write materialization on first write. This means branch creation is instant (no data copying) and queries see the full production state. When you're done, merge the changes back or discard the branch entirely.

-- Create an isolated branch
SELECT hati_branch_create(
  'experiment-42');

-- Query with full production data
SELECT * FROM experiment_42.users
WHERE status = 'active';

-- Safe to write — branch only
INSERT INTO experiment_42.results
VALUES ('test', 0.95, NOW());

-- Merge back or discard
SELECT hati_branch_merge(
  'experiment-42', 'main');

WHY IT MATTERS

Why Agents Need This

Risk-Free Exploration

Agents need to explore hypotheses without corrupting production state. Branches provide a sandbox with real data.

Pipeline Testing

Validate dbt models, data transformations, and agent logic in isolated branches before promoting to production.

Conflict Detection

When merging, the engine detects conflicting writes and offers resolution strategies — branch wins, main wins, manual, or abort.

COMPARISON

Legacy Approach vs ANDI

Legacy Approach

ANDI Approach

Clone entire database (expensive)
Instant zero-copy branches
Minutes to create test environment
Milliseconds to create branch
Stale data in test copies
Live production state via views
Manual cleanup after testing
Discard branch, automatic cleanup
No merge conflict detection
Built-in conflict detection + strategies

ANDI SUBSTRATE

Explore the Full Platform

Agent-Native Data Infrastructure.
Production-Ready Today.

Persistent memory. Isolated state. Verifiable reasoning. Through standard SQL.