This document describes the current local agentic service surface implemented by
python/velaria_service/.
It is the repository-facing reference for:
- external event source registration
- external event ingestion payload shape
- monitor creation and lifecycle endpoints
- focus-event and signal consumption endpoints
- current realtime processing semantics from the local sidecar
This is a Python ecosystem / local service document.
It is not part of the core kernel runtime contract in docs/runtime-contract.md.
The current service is a local HTTP API served by velaria-service.
The service owns:
- local
external_eventsource definitions - event normalization into standard event rows
- monitor CRUD and intent-based creation
- monitor validation, enable/disable, and manual run
- focus-event listing and polling
- signal listing
- search and grounding endpoints for templates/events/datasets/fields
The service does not currently define:
- a network-distributed control plane
- a public cloud API
- push subscription delivery such as WebSocket/SSE/webhook callbacks
Current event delivery is pull-based:
GET /api/v1/focus-eventsPOST /api/v1/focus-events/poll
An external_event source defines the schema contract for realtime JSON events
ingested from outside Velaria.
Minimum shape:
{
"source_id": "market_ticks",
"name": "Market Ticks",
"schema_binding": {
"time_field": "ts",
"type_field": "kind",
"key_field": "symbol",
"field_mappings": {
"price": "price"
}
}
}The source definition maps raw payload fields onto the standard event columns used by monitor execution.
All external events are normalized into at least these columns:
event_timeevent_typesource_keypayload_jsoningested_atsource_id
Additional mapped fields are exposed using the keys from field_mappings.
Example:
Raw event payload:
{
"ts": "2026-04-18T14:30:00Z",
"kind": "tick",
"symbol": "BTC",
"price": 68000
}Standardized row:
{
"event_time": "2026-04-18T14:30:00Z",
"event_type": "tick",
"source_key": "BTC",
"payload_json": {
"ts": "2026-04-18T14:30:00Z",
"kind": "tick",
"symbol": "BTC",
"price": 68000
},
"ingested_at": "2026-04-18T14:30:01Z",
"source_id": "market_ticks",
"price": 68000
}A monitor binds a source, a template/DSL rule, and an execution mode:
batchstream
For external_event sources, the canonical stream-facing columns are the
standard event columns listed above.
Monitor rules should use canonical column names such as:
source_keyevent_type- mapped fields like
price
They should not use the raw source binding field names such as symbol or
kind inside the compiled rule.
A FocusEvent is the main consumable event object emitted after a monitor rule
produces result rows and the promotion rule upgrades them into a durable event.
Each focus event links back to:
run_idartifact_ids- key fields and summary
Current realtime path:
external event ingest
-> normalized observation
-> realtime Arrow push into local stream source
-> long-running StreamingQuery
-> result rows
-> Signal
-> FocusEvent
Current delivery characteristics:
- realtime ingest: supported
- realtime processing: supported
- focus-event delivery: pull-based
- subscription push delivery: not yet supported
GET /health
Returns local service readiness metadata.
GET /api/v1/external-events/sourcesPOST /api/v1/external-events/sourcesPOST /api/v1/external-events/sources/<source_id>/ingest
Create source example:
{
"source_id": "market_ticks",
"name": "Market Ticks",
"schema_binding": {
"time_field": "ts",
"type_field": "kind",
"key_field": "symbol",
"field_mappings": {
"price": "price"
}
}
}Ingest example:
{
"ts": "2026-04-18T14:30:00Z",
"kind": "tick",
"symbol": "BTC",
"price": 68000
}POST /api/v1/search/templatesPOST /api/v1/search/eventsPOST /api/v1/search/datasetsPOST /api/v1/search/fieldsPOST /api/v1/grounding
These endpoints serve monitor creation and reuse workflows.
GET /api/v1/monitorsGET /api/v1/monitors/<monitor_id>POST /api/v1/monitorsPOST /api/v1/monitors/from-intentPATCH /api/v1/monitors/<monitor_id>DELETE /api/v1/monitors/<monitor_id>POST /api/v1/monitors/<monitor_id>/validatePOST /api/v1/monitors/<monitor_id>/enablePOST /api/v1/monitors/<monitor_id>/disablePOST /api/v1/monitors/<monitor_id>/run
from-intent example:
{
"name": "BTC burst count",
"intent_text": "count events in a window",
"source": {
"kind": "external_event",
"source_id": "market_ticks"
},
"execution_mode": "stream",
"template_params": {
"group_by": ["source_key", "event_type"],
"count_threshold": 2
}
}Validation currently rejects invalid group_by fields for external_event
monitors and returns the canonical available column set.
GET /api/v1/focus-eventsGET /api/v1/focus-events/<event_id>POST /api/v1/focus-events/pollPOST /api/v1/focus-events/<event_id>/consumePOST /api/v1/focus-events/<event_id>/archive
Polling example:
{
"consumer_id": "agent",
"limit": 20
}GET /api/v1/signalsGET /api/v1/signals/<signal_id>
The current desktop prototype exposes source creation and monitor creation in the Monitors page, but the underlying semantics are:
- create an external event source schema
- create and validate a monitor against canonical event columns
- enable the monitor
- ingest events
- poll or inspect focus events
The current UI is a local prototype and does not yet expose a first-class "send test event" control or push subscription delivery.
For design intent, future scope, and non-contract modeling detail, see:
plans/agentic-event-data-platform-v1.mdplans/agentic-user-journeys-v1.mdplans/agentic-event-model-v1.mdplans/agentic-search-grounding-v1.mdplans/agentic-monitor-execution-v1.mdplans/agentic-rule-dsl-v1.md