Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.trymaitai.com/llms.txt

Use this file to discover all available pages before exploring further.

A Monitor Target wires a Monitor to a specific production surface and tells the runtime how often to sample it. A Monitor is inert until at least one target is attached and the Monitor’s status is ACTIVE.

Target types

target_typeWhat it watches
intentEvery chat completion request that lands on this Intent (across all applications using this intent type)
workflowEvery completed workflow_run for this Workflow
agentEvery completed root agent_request for this Agent (sub-agent steps are not double-counted)

Attaching a target

In the Monitor detail page, open the Targets tab and click Attach Target. Pick the resource type, search for the target, and set:
  • Sample rate0100. The runtime takes a uniform random roll on each completion; a sample rate of 5.0 means roughly 5% of invocations will fire a monitor_run. Set to 100 to evaluate every invocation.
  • Enabled — toggles sampling for this attachment without detaching it.
Each target carries its own sample rate. The same Monitor watching intent: order_intake at 5% and workflow: order-intake-workflow at 100% is a normal pattern.

Sampling decision

When a production event completes (chat request, workflow run, or agent request), the runtime:
  1. Looks up active Monitors attached to that target
  2. For each, takes a uniform random roll vs the target’s sample_rate
  3. If the roll passes, dispatches a runner invocation (model / workflow / direct) on the latest published version of the Monitor
  4. Inserts a monitor_run row with the verdict + decorated trace
Steps 1–3 happen out-of-band — they never block the production response. If sampling errors out for any reason it’s logged but doesn’t affect the user-facing call.

Editing a target

From the Targets tab you can:
  • Update the sample rate (raise it during incident triage, lower it once the Monitor is stable)
  • Disable a target (sampling stops; history is preserved)
  • Re-enable a previously disabled target
  • Detach a target entirely (soft-delete; history is preserved but no new runs)
Updating a target is immediate — the runtime picks up the new sample rate on the next event.

Per-target metrics

The Monitor’s At-a-Glance section shows per-target rollups: sample count, error count, error rate, and a sparkline trend. This is the fastest way to spot which target is misbehaving when the same Monitor watches multiple resources. Next: Versions and releases.