Skip to content

Example: Real-Time Agent

Build an agent for real-time predictions and streaming data.

Overview

Create an agent that: - Processes continuous data streams - Makes real-time predictions - Updates with new data

Real-Time Setup

iovalence create-agent --name realtime-agent --type streaming

Configuration

agent:
  type: classification
  streaming: true

data:
  type: stream
  batch_size: 1
  timeout: 100ms

output:
  format: json
  buffer_size: 1000

Deployment

Real-time agents work best with REST APIs:

iovalence serve --model model.pkl --port 5000

Use in your application:

import requests

response = requests.post(
    'http://localhost:5000/predict',
    json={'input': 'real-time data here'}
)
prediction = response.json()

Advanced Topics

See Deployment Guide →


Back to Examples →