Publish events and query shared world state via Flux state engine. Use when agents need to share observations, coordinate on shared data, or track entity state across systems.
Flux is a persistent, shared, event-sourced world state engine. Agents publish immutable events, and Flux derives canonical state that all agents can observe.
Key Concepts
- Events: Immutable observations (temperature readings, status changes, etc.)
Entities: State objects derived from events (sensors, devices, agents)
Properties: Key-value attributes of entities (merged on update — only changed properties need to be sent)
Namespaces: Multi-tenant isolation with token auth (optional, for public instances)
Prerequisites
Public instance:https://api.flux-universe.com (namespace purchased at flux-universe.com — name auto-assigned at purchase, e.g. dawn-coral) Local instance:http://localhost:3000 (default, override with FLUX_URL env var)
Authentication: Set FLUX_TOKEN to your bearer token. Required for the public instance. Optional for local instances with auth disabled.
Namespace Prefix
All entity IDs must be prefixed with your namespace:
INLINECODE5
Example with namespace dawn-coral:
CODEBLOCK0
Entity IDs without a namespace prefix will be rejected on auth-enabled instances.
Getting Started
First, verify your connection:
CODEBLOCK1
Then check the directory to see what's available on the Flux Universe:
CODEBLOCK2
The directory lists all active namespaces, entity counts, and total entities — a good way to discover what data is flowing through the system.
Scripts
Use the provided bash script in the scripts/ directory:
- flux.sh - Main CLI tool
Common Operations
Publish Event
CODEBLOCK3
Query Entity State
CODEBLOCK4
List All Entities
CODEBLOCK5
Delete Entity
CODEBLOCK6
Batch Publish Events
CODEBLOCK7
Check Connector Status
CODEBLOCK8
Admin Config
CODEBLOCK9
Use Cases
Multi-Agent Coordination
Agents publish observations to shared entities:
CODEBLOCK10
Status Tracking
Track service/system state:
CODEBLOCK11
API Endpoints
Event Ingestion:
- POST /api/events — Publish single event (1 MB limit)