> ## Documentation Index
> Fetch the complete documentation index at: https://sariva.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Agents & request flow

> How a Slack message becomes an answer or a change — the orchestrator and the agents.

When you message Sariva, an **orchestrator** reads your intent and routes it to the right agent. You don't pick an agent or learn a command syntax — you ask in plain language.

```mermaid theme={null}
flowchart TD
  msg["Slack message or DM"] --> router["Orchestrator<br/>intent routing"]
  router -->|"a question"| obs["Observability agent"]
  router -->|"a change"| dep["Deployment agent"]
  obs --> read["Read metrics & admin describes"]
  read --> ans["Answer in Slack"]
  dep --> tf["Generate Terraform → open PR"]
  tf --> appr["Human approves in #kafka-approvals"]
```

## The agents

* **Observability agent** — answers questions about clusters and registered apps: health, consumer lag, topic/group counts, and duplicate/loss *risk* (from a configuration audit, not per-message tracking). It reads metrics and runs admin describes; it never changes anything.
* **Deployment agent** — handles change requests ("add a stage / environment / cluster / topic"). It generates Terraform and opens a pull request; it does not apply changes itself. Without Slack configured, it runs read-only.
* **Alert engines** — two background loops. The per-app engine checks registered apps (lag, error patterns, pod restarts, rebalances) and cluster reachability; the cluster-infra engine watches CFK pods for OOMKilled and CPU. Alerts post to the install's chat surface — Slack or Teams. Repeats are stopped by the alert lifecycle, not a timer: a condition that stays true posts once, re-fires only if it gets materially worse, and posts one recovery when it clears. See [Alerting](https://sariva.mintlify.site/concepts/alerting.md).

## How it answers about your apps

For questions like "is payments-consumer lagging?", the observability agent resolves the **registered app** named in your message, looks up its cluster and consumer group, and scopes the answer to it. (Apps are registered explicitly — see [For application teams](https://sariva.mintlify.site/app-teams/overview.md).)

> [!NOTE]
>
> Sariva works through a **REST API spine** — Slack is one adapter on top of it. The same operations are available over REST, which is how application teams register apps and how integrations are built.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.