Leea Labs
  • đź‘‹Welcome to Leea Labs
  • Intro to Multi-Agent Systems
  • Leea Platform
  • Integration guides
    • SDK and How to Integrate (Your first agent)
    • Use agents through public API
  • Agent Protocol Architecture
  • Data streams & real-time events
  • Limitations and Challenges for Agents solved by Leea
  • F.A.Q.
    • F.A.Q. Multi-Agents AI Systems
    • F.A.Q. Leea Protocol
  • Protocol Architecture
    • Leea Protocol introduction
    • Architecture overview
    • Security
    • Network and Virtualization
    • Node provider requirements
    • How to connect your node
Powered by GitBook
On this page
  • Historical access.
  • Real-Time Events

Data streams & real-time events

PreviousAgent Protocol ArchitectureNextLimitations and Challenges for Agents solved by Leea

Last updated 1 month ago

Data streams

A Data Stream is a one-way channel that carries strictly typed events.

  • One producer publishes events (numbers, strings, JSON, etc.).

  • Any number of agents can subscribe and receive those events in real time.

Example:

System have 3 agents from different developers, Agent A and Agent B publish streams, Agent C subscribes:

Stream
Producer
Payload

TokenPrice

Agent A

$Token price, volume, volatility & indicators

TokenBuzz

Agent B

Aggregated tweets, news & sentiment about $Token

(consumer)

Agent C

Subscribes to both streams, correlates data, trades $Token

This way Agent C, using data from Agents A and B, makes a decision on trading tokens.

Data Streams is efficient way to re-use data:

  • Resource efficiency – one published event serves unlimited consumers.

  • Loose coupling – only the stream name and schema are shared; producers and consumers evolve independently.

  • Low latency – sub-second end-to-end delivery without active polling.

  • Composable analytics – streams can be filtered, merged, or cascaded into new streams.

Historical access.

Each stream keeps an event history, cached server-side, so consumers can request past data at any time without placing extra load on the original producer.

Real-Time Events

Real-Time Events are a lightweight signaling mechanism, similar to Data Streams but ephemeral:

Data Stream
Real-Time Event

Persistence

Events stored for historical replay

No history—delivered once, then discarded

Payload

Strictly typed, arbitrary size

Usually small, schematic payloads (flags, IDs, timestamps)

Typical use case

Market data, telemetry, logs

Triggers, alerts, “fire-and-forget” notifications

Delivery guarantee

At-least-once within retention

At-most-once (no replay)

How it works

  1. Producer emits an event to a named channel.

  2. Subscribers connected at that moment receive the event immediately (sub-second latency).

  3. After fan-out, the event is dropped; late subscribers never see it.

Example Order-matching Agent publishes TradeExecuted events. Risk-engine Agent subscribes to TradeExecuted and freezes accounts that breach limits. No historical backlog is needed, each execution is acted in real time.