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

Behavior Graphs

A behavior tree is only as good as the world model it reads from. A tree that ticks against stale state makes decisions on stale information. A tree that crashes loses its context. A tree that coordinates with other agents needs a shared medium.

ArcFlow solves all three: behavior trees as graph subgraphs, ticking against a live, persistent, spatial-temporal world model. The tree's decisions are grounded in real sensor state — position, confidence, observation class — and its execution history is queryable with the same GQL used for everything else.

How it works#

In ArcFlow, the behavior tree IS the world graph. Nodes are graph nodes. Execution order is edge traversal. The blackboard is node properties. The world state the tree reads from is the same graph it lives in.

What this gives you:

  • Live world state — conditions read _observation_class, _confidence, spatial position directly from the graph
  • Runtime modification — add, remove, or rewire behaviors with MERGE/DELETE at runtime
  • Persistent — behavior state survives process restarts (WAL-backed)
  • Temporal audit — AS OF seq N shows what the tree's blackboard looked like at any past tick
  • Multi-agent — multiple agents share one world model; their trees coordinate through shared graph state

Define a behavior tree#

-- Root: execute children in order, fail on first failure
CREATE (root:BT_Sequence {name: 'patrol', status: 'idle'})
 
-- Condition: checks the world model for a specific state
CREATE (check:BT_Condition {
  name: 'obstacle_ahead',
  query: 'MATCH (o:Obstacle) WHERE o._observation_class = "observed" AND o._confidence > 0.8 AND distance(o.position, ego.position) < 5.0 RETURN o',
  status: 'idle'
})
 
-- Actions: perform work or modify the world model
CREATE (navigate:BT_Action {name: 'navigate_to_waypoint', status: 'idle', waypoint: 'wp_3'})
CREATE (avoid:BT_Action {name: 'avoid_obstacle', status: 'idle'})
CREATE (alert:BT_Action {name: 'send_alert', status: 'idle'})
 
-- Wire the tree
MATCH (root:BT_Sequence {name: 'patrol'})
MATCH (check:BT_Condition {name: 'obstacle_ahead'})
MERGE (root)-[:CHILD {order: 0}]->(check)
 
MATCH (root:BT_Sequence {name: 'patrol'})
MATCH (navigate:BT_Action {name: 'navigate_to_waypoint'})
MERGE (root)-[:CHILD {order: 1}]->(navigate)
 
-- Conditional branch on obstacle detection
MATCH (check:BT_Condition {name: 'obstacle_ahead'})
MATCH (avoid:BT_Action {name: 'avoid_obstacle'})
MERGE (check)-[:ON_SUCCESS]->(avoid)
 
MATCH (check:BT_Condition {name: 'obstacle_ahead'})
MATCH (alert:BT_Action {name: 'send_alert'})
MERGE (avoid)-[:ON_FAILURE]->(alert)

Tick against live world state#

import { open } from '@ozinc/arcflow'
 
const db = open('./data/world-model')
 
// Tick reads live world model state — positions, confidence, observation class
function tick() {
  db.query("CALL behavior.tick()")
  const status = db.query("CALL behavior.status()")
  for (const row of status.rows) {
    console.log(`${row.get('name')}: ${row.get('status')}`)
  }
}
 
// Run at 20Hz — behavior tree ticks against current world model state each time
setInterval(tick, 50)

The world model is updated by sensors independently. When the spatial index changes (a new obstacle enters range), the next tick's condition check reflects it automatically.

Conditions that read world model state#

Behavior conditions can query the world model directly — confidence, observation class, spatial proximity:

-- Is there a high-confidence observed obstacle within 5 meters?
MATCH (ego:Robot {id: $robot_id})
CALL algo.nearestNodes(point({x: ego.x, y: ego.y}), 'Obstacle', 5)
  YIELD node AS obs, distance
WHERE distance < 5.0
  AND obs._observation_class = 'observed'
  AND obs._confidence > 0.80
RETURN count(obs) AS blocking_count
 
-- Is the target zone clear?
MATCH (z:Zone {id: $target_zone})
MATCH (e:Entity)
WHERE e._observation_class IN ['observed', 'inferred']
  AND distance(point({x: e.x, y: e.y}), point({x: z.x, y: z.y})) < 10.0
RETURN count(e) AS zone_occupancy

These queries fire inside the behavior tree tick — the tree sees the world at the exact moment of decision.

Dynamic modification at runtime#

// Enemy detected — inject an attack behavior without restarting
db.mutate("CREATE (attack:BT_Action {name: 'engage_target', status: 'idle', target_id: $id})", { id: contactId })
db.mutate(`
  MATCH (root:BT_Sequence {name: 'patrol'})
  MATCH (attack:BT_Action {name: 'engage_target'})
  MERGE (root)-[:CHILD {order: 0}]->(attack)
`)
 
// Objective complete — remove the completed action
db.mutate("MATCH (a:BT_Action {name: 'engage_target'}) DETACH DELETE a")

Temporal audit — what did the tree decide and why?#

Every tick is versioned in the world model:

-- What was the tree's blackboard state at tick 5000?
MATCH (n:BT_Sequence) AS OF seq 5000
RETURN n.name, n.status
 
-- What was the world model state when the tree failed?
MATCH (e:Entity) AS OF seq 4821
RETURN e.name, e.x, e.y, e._observation_class, e._confidence

Post-incident analysis: replay the exact world state at the moment a decision was made. No log reconstruction — query the versioned graph directly.

Multi-agent behavior coordination#

Multiple agents share one world model. Their trees read the same ground truth:

-- Formation members sorted by position
MATCH (r:Robot)-[m:MEMBER_OF]->(f:Formation {name: 'Alpha'})
RETURN r.id, r.x, r.y, m.position
ORDER BY m.position
 
-- Assign the nearest idle robot to a task
MATCH (task:Task {status: 'pending'})
CALL algo.nearestNodes(point({x: task.x, y: task.y}), 'Robot', 5)
  YIELD node AS robot, distance
WHERE robot.status = 'idle'
WITH robot, task ORDER BY distance LIMIT 1
SET robot.status = 'assigned', task.status = 'assigned'

No message bus between agents. No shared-state synchronization layer. The world model is the shared state.

Node types#

TypePurposeWorld Model integration
BT_SequenceExecute children left-to-right, fail on first failureReads spatial, confidence, observation class
BT_SelectorTry children until one succeedsFalls back on lower-confidence information
BT_ConditionCheck a predicate against the world modelDirect GQL query on graph state
BT_ActionPerform work or mutate the world modelWrites back sensor readings, updates positions

Edge types#

TypePurpose
CHILDParent-to-child with order property for execution sequence
ON_SUCCESSConditional branch on success
ON_FAILUREConditional branch on failure

Use cases#

  • Autonomous robots — task planning, obstacle avoidance, sensor-driven recovery sequences grounded in live world model state
  • UAV fleets — formation maintenance, mission assignment, live waypoint navigation
  • Game AI — NPC decision-making that reads spatial proximity, inventory, and social state from a unified graph
  • Simulation — population behavior modeling with persistent history and temporal replay

See Also#

  • Building a World Model — the spatial-temporal foundation behavior trees read from
  • Autonomous Systems — behavior trees in multi-robot coordination
  • Live Queries — standing queries that trigger tree re-evaluation
  • Skills — dynamic edge materialization from behavior outcomes
Try it
Open ↗⌘↵ to run
Loading engine…
← PreviousUsing SkillsNext →Swarm & Multi-Agent