ArcFlow
Company
Managed Services
Markets
  • News
  • LOG IN
  • GET STARTED

OZ brings Visual Intelligence to physical venues, a managed edge layer that lets real-world environments see, understand, and act in real time.

Talk to us

ArcFlow

  • World Models
  • Sensors

Managed Services

  • OZ VI Venue 1
  • Case Studies

Markets

  • Sports
  • Broadcasting
  • Robotics

Company

  • About
  • Technology
  • Careers
  • Contact

Ready to see it live?

Talk to the OZ team about deploying at your venues, from a single pilot match to a full regional rollout.

Schedule a deployment review

© 2026 OZ. All rights reserved.

LinkedIn
ArcFlow Docs
Start
  • Quickstart
  • Installation
  • Bindings
  • Platforms
  • Get Started
  • Cookbook
Concepts
  • World Model
  • Graph Model
  • Evidence Model
  • Observations
  • Confidence & Provenance
  • Proof Artifacts & Gates
  • SQL vs GQL
  • Graph Patterns
  • Parameters
  • Query Results
  • Persistence & WAL
  • Snapshot-Pinned Reads
  • Error Handling
  • Execution Models
  • Causal Edges
  • Adapter Discipline
  • Time Decay
  • Layers
  • 1. World Store
  • 1a. World Store · Smart Reader
  • 2. Perception Lake
  • 3. World Graph
  • 4. Query Engine
  • 5. Live Surface
  • 6. Event Bus
  • 7. Behavior Engine
  • 8. Algorithm Library
  • Virtual Computed Columns
  • Threading Model
  • Typed ID Contract
WorldCypher
  • Overview
  • Execution Options
  • Statements
  • MATCH
  • WHERE
  • RETURN
  • OPTIONAL MATCH
  • CREATE
  • SET
  • MERGE
  • DELETE
  • REMOVE
  • Composition
  • WITH
  • UNION
  • UNWIND
  • CASE
  • Schema
  • Schema Overview
  • Indexes
  • Constraints
  • Functions
  • Built-in Functions
  • Aggregations
  • Procedures
  • Shortest Path
  • EXPLAIN
  • PROFILE
  • Temporal Queriesfacet
  • Spatial Queriesfacet
  • Algorithmsfacet
  • Triggers
Capabilities
  • Live Queries
  • Vector Search
  • Trusted RAG
  • Spatial Knowledge
  • Temporal
  • Behavior Graphs
  • Graph Algorithms
  • Skills
  • CREATE SKILL
  • PROCESS NODE
  • REPROCESS EDGES
  • Sync
  • Programs
  • GPU Acceleration
  • Agent-Native
  • MCP Server
  • Event Sourcing
  • Intent Relay
  • Event Bus
Use Cases
  • Agent Tooling
  • Trusted RAG
  • Knowledge Management
  • Behavior Graphs
  • Autonomous Systems
  • Physical AI
  • Digital Twins
  • Robotics & Perception
  • Sports Analytics
  • Grounded Neural Objects
  • Fraud Detection
Walkthroughs
    Guides
  • Agent Integration
  • Building a World Model
  • Modeling a Social Graph
  • Build a RAG Pipeline
  • Using Skills
  • Behavior Graphs
  • Swarm & Multi-Agent
  • Fleet Coordination
  • Migrate from Cypher / Neo4j
  • From SQL to GQL
  • Filesystem Workspace
  • Data Quality
  • Code Intelligence
  • Scale Patterns
  • v0.7 → v0.8 Lakehouse Fast-Path
  • Tutorials
  • Knowledge Graph
  • Entity Linking
  • Vector Search
  • Graph Algorithms
  • Recipes
  • CRUD
  • Multi-MATCH
  • MERGE (Upsert)
  • Full-Text Search
  • Batch Projection
  • Multi-Source Observation
  • Sports Analytics
Operations
  • CLI
  • REPL Commands
  • Snapshot & Restore
  • Filesystem Projection
  • Plugin Management
  • Agent Governance
  • Server Modes & PG Wire
  • Persistence (ops)
  • Import & Export
  • Deployment
  • Deployment Modes
  • Daemon (UDS)
  • Why not Docker
  • Architecture
  • Engine Architecture
  • Cloud Architecture
  • Sync Protocol (Deep Dive)
  • World Graph Substrate (Preview)
Reference
  • TypeScript API
  • Glossary
  • Naming & Domain Map
  • Data Types
  • Operators
  • Error Codes
  • GQL Reference
  • Known Issues
  • Versioning
  • Licensing
  • Conformance
  • GQL Conformance
  • openCypher TCK
  • Extension Regressions
GQL Reference
    Conformance
  • Conformance Dashboard
  • openCypher TCK Results
  • Extension Regressions
  • Features
  • MATCH Basic
  • CREATE Nodes Edges
  • SET REMOVE Properties
  • DELETE Detach DELETE
  • RETURN WITH WHERE
  • Order BY Limit Skip
  • Order BY Nulls First Last
  • UNWIND
  • Aggregate Functions
  • OPTIONAL MATCH
  • Variable Length Paths
  • Label OR AND NOT Expressions
  • Label Wildcard
  • Quantified Path Sugar
  • Path Modes Walk Trail Simple Acyclic
  • Shortest Path Variants
  • IS Labeled Predicate
  • Element ID Function
  • IS Type Predicate
  • Binary Literals
  • Line Comments Solidus
  • Line Comments Minus
  • GQLSTATUS Result Codes
  • GQL Error Code Mapping
  • Transaction Control Syntax
  • SET Session
  • Conditional Execution WHEN THEN ELSE
  • RETURN NEXT Pipeline
  • Primary Key Constraint
  • Unique Constraint
  • Deterministic MERGE Via PK
  • Undirected Edge MATCH
  • Cast Type Conversion
  • GQL Directories
  • Multiple Labels Per Node
  • GQL Flagger
  • NEXT Linear Composition
  • Cardinality Function
  • INT64 BIGINT Type Names
  • FLOAT64 Double Type Names
  • Log10 Log2 Functions
  • Trim Leading Trailing Both
  • FILTER Clause
  • LET Statement
  • Group BY Explicit
  • EXCEPT SET Operations
  • INTERSECT SET Operations
  • ALL Different Predicate
  • Same Predicate
  • Property Exists Function
  • Path Variable Binding
  • USE Graph Clause
  • FOR IN List
  • Typed Temporal Literals
  • Session SET Value Params
  • Typed List Annotations
  • arcflow.cosine() function
  • arcflow.embed() function
  • arcflow.similar() procedure
  • arcflow.graphrag() procedure
  • ArcFlow Extensions
  • LIVE Queries
  • Triggered Write-Back Views
  • Evidence Algebra
  • Relationship Skills
  • AI Function Namespace
  • Graph Embedding Algorithms
  • ASOF JOIN
  • Durable Workflows
  • Incremental Z-Set Engine
  • GPU GraphBLAS
  • Triggers
  • HNSW Vector Index
  • Extensions Moat

Triggers

A trigger is a pre-planned response to a graph event. You declare it before the event happens. When the event occurs — a node is created, a property changes, a node is deleted — the trigger fires once and does its work.

-- When a frame arrives, run the detection skill
CREATE TRIGGER detect_on_frame
    ON :ImageFrame WHEN CREATED
    RUN SKILL detect_objects

This is different from a live query. A live query maintains a result set continuously — it is always true. A trigger fires once per matching event — it is a deliberate response.

ConceptSyntaxSemantics
LIVECREATE LIVE VIEW, LIVE MATCH, LIVE CALLContinuous — always current, maintained as the graph mutates
TRIGGERCREATE TRIGGERFire-once — executes exactly once per matching graph event
SKILLCREATE SKILLLogic definition — invoked by a trigger or called explicitly

Choose LIVE when you need a result set that is always current. Choose TRIGGER when you need to act once in response to a specific event.


Syntax#

CREATE TRIGGER#

CREATE TRIGGER <name>
    ON :<Label> WHEN CREATED | MODIFIED | DELETED
    RUN SKILL <skill_name>

ON :<Label> — The label that determines which nodes are watched. Only nodes with this label will match.

WHEN CREATED — Fires when a new node with the label enters the graph.

WHEN MODIFIED — Fires when a property on a matching node changes.

WHEN DELETED — Fires when a matching node is removed from the graph.

RUN SKILL <name> — The skill to execute. The skill receives the triggering node as input.

DROP TRIGGER#

DROP TRIGGER detect_on_frame

Deregisters the trigger. In-flight executions are not interrupted.


Event types#

CREATED — respond when a node arrives#

-- Run enrichment whenever a new Person node is added
CREATE TRIGGER enrich_person
    ON :Person WHEN CREATED
    RUN SKILL extract_relationships
 
-- Start detection when a new frame is captured
CREATE TRIGGER detect_on_frame
    ON :ImageFrame WHEN CREATED
    RUN SKILL detect_objects
 
-- Index a document when it enters the workspace
CREATE TRIGGER index_document
    ON :Document WHEN CREATED
    RUN SKILL embed_and_link

MODIFIED — respond when state changes#

-- Re-score when a detection's confidence is updated
CREATE TRIGGER rescore_on_update
    ON :Detection WHEN MODIFIED
    RUN SKILL score_and_link
 
-- Recalculate risk when an entity's position changes
CREATE TRIGGER position_risk_update
    ON :Entity WHEN MODIFIED
    RUN SKILL recalculate_risk_score

DELETED — respond when a node leaves#

-- Clean up linked evidence when a session ends
CREATE TRIGGER cleanup_on_session_end
    ON :Session WHEN DELETED
    RUN SKILL archive_session_evidence

Trigger vs Live: choosing the right primitive#

The same scenario can often be written two ways. The semantics are different.

Scenario: index documents as they arrive.

With a trigger — fire once per document:

CREATE TRIGGER index_on_arrival
    ON :Document WHEN CREATED
    RUN SKILL embed_and_link

With a live query — maintain the set of unindexed documents continuously:

CREATE LIVE VIEW unindexed_documents AS
  MATCH (d:Document)
  WHERE d.indexed IS NULL OR d.indexed = false
  RETURN d.id, d.content, d.created_at

The trigger is better when the action is a one-time side effect — index this document, enrich this node, start this workflow. The live query is better when you need to know the current state — what documents still need indexing — across restarts, failures, or batches.

Use a trigger when:

  • The action is a side effect that should happen once per event
  • You are invoking a skill against each new or changed node
  • You are wiring a program's output stage to a downstream skill

Use a live query when:

  • You need a continuously maintained result set
  • Multiple consumers read the same derived data
  • The view should survive session ends and restarts

Triggers inside Programs#

Programs can declare triggers inline. This is the recommended pattern for production deployments — the trigger's lifecycle is tied to the program's install/remove cycle:

CREATE PROGRAM yolo_v11 VERSION '1.0' (
    ...
    SKILLS [detect_objects, score_balls],
    TRIGGERS [ON :ImageFrame WHEN CREATED]
)

When the program is installed, the trigger is registered. When the program is removed with DROP PROGRAM, the trigger is dropped. There is no orphaned trigger to clean up.

Standalone CREATE TRIGGER is for cases where the trigger is not part of a program — ad hoc automation, scripted pipelines, or development workflows.


Inspecting triggers#

-- List all registered triggers
CALL db.triggers()
YIELD name, skill, trigger, max_cascade_depth
RETURN *
| name                   | skill            | trigger                          | max_cascade_depth |
|------------------------|------------------|----------------------------------|-------------------|
| detect_on_frame        | detect_objects   | OnCreate(:ImageFrame)            | 3                 |
| enrich_person          | extract_rels     | OnCreate(:Person)                | 3                 |
| rescore_on_update      | score_and_link   | OnModify(:Detection.bbox)        | 3                 |

See also#

  • Programs — CREATE PROGRAM bundles triggers, skills, and executor endpoints into a single installable manifest
  • Live Queries — CREATE LIVE VIEW and LIVE MATCH for continuously maintained result sets
  • Skills — CREATE SKILL, PROCESS NODE, REPROCESS EDGES
  • Event Sourcing — CDC and mutation log for downstream event pipelines
← PreviousAlgorithmsNext →Live Queries