# A manager’s team KPIs

See each member’s work and availability, and rebalance it.

## Goal

See each member’s work and availability, and rebalance it.

## The prompt

```text
Show me each member’s work this week: tickets created and closed, response time, messages sent per day, and available hours. Then suggest how to rebalance the tickets and do not act before I approve.
```

## What your agent does

**Reads:**

- `list_members` and `get_member` (role, seat, spaces).
- `get_ticket_metrics` with `group_by: member` (created, closed, open at the end, response and resolution times, reopened; a null key means unassigned).
- `aggregate_messages` with `group_by: member` and `interval: day` (messages sent per member per day).
- `get_availability_totals` (time available per member) and `get_availability_log` (changes): a maximum number of days per call, so loop by period.

**Acts:**

- `assign_ticket`, `move_ticket` (between spaces), `set_member_availability` (Available or Unavailable) and `update_member` (name, job title, call ringing).
- Deactivate or reactivate a seat: `set_member_seat` (an inactive member can sign in and view, nothing more; reactivating bills the seat again). `remove_member` removes the member.

## Pitfalls

- Medians and the 90th percentile never add up across calls: take them per period.
- Every call acts as you and with your permissions; a manager sees the team only with the permissions to view all tickets and manage members, and a refusal is a plain answer with its code.

> **Recommendation:** Build and check everything with a test key (`rbk_test_…`): sends are simulated, nothing is charged and nothing reaches a customer.

> **Limits:** no SLA, business hours or satisfaction score exists in Rabt; metrics count member work only (no spam or imported history).
