Core Concepts
Reference definitions for Neusnap primitives.
Transaction
A strict execution boundary around tool calls, model invocations, and state writes.
All operations within the boundary commit together or roll back together.
Commit / Rollback
Commit finalizes all staged writes atomically; rollback discards all staged changes.
Happens automatically on success or failure.
State Buffer
A staging area where writes are held until commit.
External systems see nothing until commit completes.
Deterministic Retry
On failure, execution retries from a clean slate with identical inputs.
Tool calls are not re-executed if results were cached.
Router Policy
JSON configuration defining model selection, fallback rules, and cost constraints.
Enables switching providers without changing workflow code.
Vendor Adapter
Abstraction layer normalizing API calls across OpenAI, Anthropic, and local models.
Swap providers by changing configuration, not code.