API¶
vitel implements the agentsensory sensing contract.
All grading functions are async and return an agentsensory-typed Report (perceive returns a
Handoff).
Sensing functions¶
check
async
¶
check(source: str, *, slo: SLO | None = None, settings: Settings | None = None, backend: str | None = None, window_s: float | None = None) -> Report
Grade a telemetry source deterministically against slo (thresholds / SLO / budget).
analyze
async
¶
analyze(source: str, *, slo: SLO | None = None, settings: Settings | None = None, backend: str | None = None, window_s: float | None = None, use_llm: bool = True) -> Report
Grade deterministically, add anomaly/trend issues, and (optionally) an LLM critique.
watch
async
¶
watch(source: str, *, window: float | None = None, interval: float | None = None, slo: SLO | None = None, settings: Settings | None = None, backend: str | None = None) -> Report
Grade source over a window, flagging temporal degradation.
render
async
¶
render(source: str, *, settings: Settings | None = None, backend: str | None = None, window_s: float | None = None) -> RenderResult
Fetch source via the selected backend and summarize each series.
perceive
async
¶
perceive(source: str, *, slo: SLO | None = None, settings: Settings | None = None, backend: str | None = None, window_s: float | None = None) -> Handoff
Grade source deterministically and return the distilled Handoff for the brain.
The Sense¶
Vitals ¶
analyze
async
¶
Grade source (deterministic + anomaly + optional LLM critique).
Accepts slo, backend, window_s and use_llm keyword args.
SLO / BudgetSpec¶
SLO ¶
Bases: BaseModel
A service-level objective / error-budget spec: the intent vitals are graded against.
from_inputs
classmethod
¶
from_inputs(*, text: str | None = None, expect: list[str] | None = None, availability_target: float | None = None, error_metric: str = 'error_rate', budget_reducer: str = 'mean') -> SLO
Build from CLI/REST-style inputs (--slo text + repeated --expect).
Each expect string is parsed for a must:/should:/nice: prefix (via the
contract) then for an availability directive or a threshold expression. Unparseable
expectations are skipped.
parse_threshold ¶
Parse a single threshold expression. None if it is not a recognizable threshold.
Models¶
Metric ¶
Bases: BaseModel
The grounding object behind every vitals finding.
Report ¶
Bases: ReportBase
A vitals report: ReportBase + the measured signal.