# Agent Ops Console

**Operations for AI agents in production.**
`agent-ops.infinity-sdg.com`. An Infinity Software Development Group product built on Kalos/ADL.

```
agent → release (model + prompt hash + tools) → evaluation gate → deployed → runs → approvals → incidents → budget
```

## What it enforces

The rules below are enforced on the server, so no screen or API call can skip them.

- **A release is approved only after it passes an evaluation.** The pass is checked: passed must equal score ≥ threshold. Evaluation results are append-only.
- **An approved release is immutable.** Changing the model or prompt means creating a new release.
- **Production runs use deployed releases only.**
- **High-risk tools need a human decision on each call.** A run can't complete while one of its approvals is pending.
- **No self-approval.** The person who decides can't be the one who requested.
- **Undecided approvals expire after 24 hours.** An hourly schedule enforces this, and the agent has to ask again.
- **An incident is resolved only with a written resolution.** Critical incidents are raised to reviewers immediately.
- **Every change is audited** with the old and new values, who made it and when. Releases and incidents also appear in a readable history timeline.

## Resources

`agent` · `tool` · `release` · `evaluation` · `run` · `approval` · `incident` · `budget`

Views: **pendingApprovals**, **openIncidents**, **runCost**.
Roles: `engineer`, `operator`, `reviewer`, `admin`.

## Demo data

A month of 10 enterprise agents: invoice triage, support replies, refunds, code review, the IT helpdesk and more.
- **Releases:** every agent has a deployed release that passed its evaluation, and two older releases were rolled back.
- **Blocked candidates:** one code-review candidate scored 84 against a 90 threshold, so it can't be approved. Another candidate hasn't been evaluated yet.
- **Runs:** 14 runs with token counts and cost.
- **Approvals:** 10 in all. Two were denied: a refund over the limit and an auth-change merge. One refund approval is still pending, so its run stays open.
- **Incidents:** 10, covering prompt injection, data leaks, fabrication and tool misuse. Most are resolved, one critical one is under investigation, and some are still open.
- **Budgets:** December budgets for every agent.

Regenerate the seed with `python3 seeds/gen_seed.py`.

## Run it

This repo runs on a [Kalos](https://github.com/datajango/kalos) checkout, as one of its `*.infinity-sdg.com` sub-domain sites.

```bash
export KALOS_REPO=~/kalos        # defaults to ../kalos beside this repo
scripts/kalos.sh validate        # static checks (adlref + config + seed)
scripts/kalos.sh start           # certs + fresh DB + kalosd on :9207
scripts/kalos.sh verify          # boot, seed, exercise over TLS, stop
```

Sign in as `admin` / `Admin123!`, or as `engineer1`, `operator1` or `reviewer1` / `Demo123!`.

## Reselling

The product is generic. To brand it for a customer, change `site.json`, the port in `config.json`, and the data in `seeds/gen_seed.py`.
