From Signals to State: Building a Context Engine

Why event streams alone aren’t enough for intelligent automation.

Event-driven systems are powerful, but raw events don’t create understanding.

A log entry is not context.
A metric spike is not intent.

To build intelligent systems, we need a state model.

Event vs State

Events are instantaneous:

{
  "service": "api",
  "latency": 320,
  "timestamp": 1700000000
}
{
  "service": "api",
  "latency": 320,
  "timestamp": 1700000000
}
{
  "service": "api",
  "latency": 320,
  "timestamp": 1700000000
}

State is cumulative:

interface SystemState {
  averageLatency: number
  trafficRate: number
  dependencyHealth: "healthy" | "degraded" | "down"
}
interface SystemState {
  averageLatency: number
  trafficRate: number
  dependencyHealth: "healthy" | "degraded" | "down"
}
interface SystemState {
  averageLatency: number
  trafficRate: number
  dependencyHealth: "healthy" | "degraded" | "down"
}

Policies should evaluate state, not individual events.

State as a First-Class Layer

State should not be derived ad hoc inside dashboards. It should exist as an explicit, queryable layer.

Example:

const currentState = stateStore.getSnapshot()
const currentState = stateStore.getSnapshot()
const currentState = stateStore.getSnapshot()

Instead of recomputing logic across services, maintain a centralized state model that:

  • Updates incrementally

  • Supports policy queries

  • Stores execution outcomes

State becomes infrastructure — not a byproduct.

Final Thought

Scaling is not about adding capacity.
It’s about aligning resources with real system state.

Contextual scaling preserves stability under growth.

Sam Bergling

Checkout

Checkout

Buy template

Buy template

Create a free website with Framer, the website builder loved by startups, designers and agencies.