Start or replace a tagged sensor runtime owned by the current agent runtime.
Sensors are tracked separately from child agents under {:sensor, tag} and
do not participate in child-agent hierarchy signals.
By default sensors are unlinked but owner-monitored: a sensor crash emits
jido.agent.sensor.exit to the owning agent, and the sensor stops itself if
the owner exits. Use link?: true only for fail-fast input paths where a
sensor crash should also crash the owning agent runtime.
Fields
tag- Agent-local tag for the sensor runtimesensor- Sensor module to run underJido.Sensor.Runtimeconfig- Sensor configuration map (default:%{})meta- Metadata stored on the tracked sensor child info (default:%{})replace?- Stop and replace an existing sensor with this tag (default:true)link?- Link the sensor to the owning AgentServer so abnormal sensor exits can take the owner down (default:false)
Examples
%StartSensor{tag: :market_data, sensor: MyApp.MarketDataSensor}
%StartSensor{
tag: {:poller, "AAPL"},
sensor: MyApp.MarketDataSensor,
config: %{symbol: "AAPL", interval: 1000}
}
Summary
Types
Functions
@spec schema() :: Zoi.schema()
Returns the Zoi schema for StartSensor.