AI Agent & Autonomy

Configure the AI agent that classifies and drafts replies to inbound mail: auto-reply settings, the health dashboard, circuit breakers, autonomy rules, and the knowledge backfill.

The AI agent reads every inbound message in your Team Inbox, classifies it by intent, and drafts a suggested reply. With auto-reply enabled, high-confidence drafts can go out without a human ever touching them; everything else lands in the review queue. This page is the admin's guide to turning the agent on and tuning how far you let it run on its own.

All of these controls live under Settings, are admin-only, and depend on the AI feature flags being enabled.

Enabling the agent

The agent is gated behind a small cascade of feature flags. Each one requires the one above it, so turning a child on automatically pulls in its parents:

FlagLabelWhat it unlocks
aiAI featuresMaster toggle for everything AI. Requires an LLM provider (LLM_PROVIDER, LLM_API_KEY).
ai.agentAI agent (classify + draft)Classifies inbound mail and drafts replies. Requires ai and inbox.
ai.autonomyAutonomous actionsPer-category autonomy rules. Requires ai and ai.agent.

Turning ai off cascades off every AI feature; turning ai.agent off also turns off ai.autonomy and code tasks. You can flip flags from Settings > Features, or from the AI Agent settings page described below.

An LLM provider is required

The agent calls a language model for classification and drafting. Set LLM_PROVIDER and LLM_API_KEY before enabling ai — see Feature flags and Environment Variables.

What the agent does to each message

When ai.agent is on, every inbound message runs through a fixed pipeline in this order: the content is security-scanned (prompt-injection and spam heuristics), context is assembled (contact profile, recent activity, and thread history), the message is classified (category, priority, sentiment, intent), a reply is drafted, and finally the draft is routed to either auto-approval or human review. The scan can quarantine likely prompt injections and archive high-scoring spam before the agent ever drafts; messages the classifier marks as spam are archived; complaints and anything marked urgent skip the drafter and go straight to review.

Context assembly includes the Knowledge Graph

Context assembly draws on the contact profile, recent activity, and thread history, plus semantically-retrieved Knowledge Graph entries and relevant source files. Knowledge and file retrieval is contact-scoped, so the drafter only sees entries visible for that contact.

The classifier sorts each message into one of eight categories: support, sales, billing, feature_request, complaint, spam, internal, and other.

Agent configuration

Open Settings > AI Agent (/dashboard/settings/agent) to tune how the agent behaves. The page is split into the master toggle, confidence and rate limits, and tone.

Enable Agent Pipeline & Auto-Reply

Two switches sit at the top:

  • Enable Agent Pipeline mirrors the ai.agent feature flag. Saving with this on (the first time) kicks off the knowledge backfill.
  • Auto-Reply lets the agent send replies without human approval when its confidence clears the threshold. With it off, every draft goes to the review queue regardless of confidence.

Confidence threshold

A slider from 0–100%. It's the minimum confidence score a draft needs to be auto-approved. Drafts below it route to human review. At 100% nothing is ever auto-approved; at 0% every draft is (subject to the daily cap). The default is 70%.

Daily auto-reply limit

The maximum number of auto-approved replies the agent may send per day. Once the cap is hit, further high-confidence drafts go to the review queue until the count resets. The default is 50.

Message coalescing window

How long (in seconds) the agent waits for additional messages in a thread before it starts processing, so a burst of replies is handled as one. The default is 30 seconds.

Tone & signature

Two free-text fields that shape the drafts:

  • Tone Description — a plain-language description of the voice you want (e.g. "Professional and friendly. Use the customer's first name. Keep responses concise."). It's injected into the drafting prompt.
  • Email Signature — a signature appended to the end of agent-drafted email replies.
Replies also go out over SMS, WhatsApp & webhook

Auto-reply isn't email-only. When a draft is approved (or auto-sent) for a message that arrived over a configured channel — SMS, WhatsApp, or the generic webhook — the agent dispatches the reply through that channel's provider rather than the email pipeline, gated on ai.agent plus the channel being configured and enabled. (Admins can also send a manual outbound message on these channels from a contact's Unified Timeline.) The Email Signature is appended to email replies only.

Agent health & metrics

Settings > Agent Health (/dashboard/settings/agent-health) is a live dashboard of how the pipeline is performing. A rollup job recomputes the metrics every five minutes.

MetricWhat it shows
Queue DepthInbound messages waiting to be processed.
ProcessingMessages currently being classified.
Processing LatencyAverage time to process a message over the last window.
Error RateShare of agent actions that failed. Drives the circuit breaker.
Auto-Approve RatioAuto-approved actions vs. total.
LLM CostReal model spend (USD) for the current window.

The page also charts processing latency, error rate, and queue depth over the last 24 hours.

Circuit breakers

The health page shows three circuit breakers, each with a closed (healthy), open (tripped), or half_open (testing recovery) state. The five-minute rollup evaluates all three each run, tripping a breaker open when its signal exceeds the threshold and recovering it through half_open back to closed as the signal subsides.

BreakerThresholdSignal
LLM Failure20%Rolling agent error rate.
Confidence Degradation30%Share of drafts with degraded confidence.
Rejection Spike40%Rolling draft rejection rate.
Breakers are an automatic kill-switch

Breaker state gates the live auto-reply pipeline. The routing step's first-tier check reads circuit-breaker state and forces every draft to human review whenever any breaker is open, regardless of the global Auto-Reply switch, Confidence Threshold, or autonomy rules. Auto-replies resume only once the breakers recover. Treat an open breaker as an active auto-reply kill-switch, not just a health signal.

Beyond breakers and confidence, a final per-draft safety gate runs before any auto-send: an otherwise-approved draft is downgraded to human review if the inbound prompt-injection guard couldn't run on the message, if the generated draft itself trips an injection pattern, or if the draft contains a credential/secret fingerprint. It's a fail-closed check on autonomous sends — when in doubt, a human looks first.

Graduated autonomy rules

Settings > Graduated Autonomy (/dashboard/settings/autonomy, behind the ai.autonomy flag) lets you set per-category rules instead of one global threshold. Each rule targets one of the eight classifier categories and carries its own:

  • Auto-approve threshold — the confidence required to auto-approve actions in that category.
  • Daily auto-action limit — a per-category cap on auto-approved actions.
  • Enabled toggle.

The page also shows 24-hour feedback stats per category (approved / rejected / edited) and a panel describing the intended behaviour: the agent classifies a message, auto-approves if confidence clears the category threshold and the daily limit isn't reached, and otherwise routes to review. A weekly job is designed to nudge thresholds — tightening a category whose rejection rate climbs past 40%, loosening one with a low rejection rate.

How autonomy rules interact with the global controls

When ai.autonomy is enabled, the routing step consults these per-category rules: a draft is auto-approved only if its confidence clears that category's threshold and the category's daily cap isn't reached, and a category with no rule is never auto-approved. The global Auto-Reply switch, Confidence Threshold, and Daily auto-reply limit on the AI Agent page are the fallback, used only when ai.autonomy is off.

Knowledge backfill

The first time you flip Enable Agent Pipeline on (an explicit ai.agent off→on toggle), Owlat kicks off a one-time scan of your existing inbound mail history. It walks past messages through the Knowledge Graph extraction pipeline so your graph is seeded from existing mail rather than starting empty.

The backfill feeds the drafter

The scan populates the Knowledge Graph, which you can browse and search by hand. Those entries also feed the agent's drafting context: the drafter semantically retrieves from the graph during context assembly (subject to contact-scope), so a richer graph means better-grounded drafts.

A progress card appears on the AI Agent settings page while a job exists, showing:

FieldMeaning
StatusQueued, Scanning mail history, Complete, Cancelled, or Failed.
Scanned / totalProgress through your message history (capped for the progress bar).
ExtractedMessages that produced at least one knowledge entry.
SkippedAlready-extracted or too-short messages.
ErrorsMessages that errored during extraction.

You can Cancel a running job; the scan stops cleanly at the next chunk. The backfill is strictly first-run: it runs once ever. Cancelling and re-enabling the toggle does not start a second scan, and an enable that happens as a cascade side effect (rather than a direct toggle) never triggers it.

Re-enabling won't re-scan

If you need the agent off temporarily, toggling it back on later is safe and cheap — there is no repeated history scan. The backfill only ever runs on the very first activation.

Visualization agent & adaptive dashboards

Behind the ai.visualizations flag, Owlat ships a small visualization agent: you describe a chart or dashboard in natural language and the agent generates a self-contained, sandboxed HTML visualization you can pin to your dashboard. Pinned visualizations and a configurable card layout make up the adaptive dashboard.

By default a chart uses clearly-labelled illustrative sample data — free-form prompts are never routed to your real numbers, so it's a safe layout-and-design tool. To chart real account numbers, opt in explicitly with the dataset picker, which exposes a fixed allowlist of four read-only datasets: email delivery (last 30 days), agent health, contact growth, and campaign performance. A chart built on a live dataset carries a Live data badge and can be refreshed on demand to pull current numbers; illustrative charts have no dataset and cannot be refreshed.

Where to go next