# kosa8 ai

Chat with kosa8's embedded assistant (approval-first, live state)

An assistant that sees your live container/image state and can run
read-only queries freely; anything that changes state asks first.

Provider: with ANTHROPIC_API_KEY set it uses the Anthropic API
(--provider anthropic); otherwise it uses a local model gateway
(`kosa8 model serve NAME`, --provider local). No code content is
sent anywhere except the provider you choose.

## Flags

| Flag | Type | What it does | Default |
|---|---|---|---|
| `--message, -m` | string | ask one question and exit |  |
| `--model` | string | override the model id |  |
| `--provider` | string | anthropic \| local \| auto (default: auto) |  |

## Example

```
  kosa8 ai
  kosa8 ai -m 'why did my sandbox stop?'
  kosa8 ai --provider anthropic --model claude-sonnet-4-5
```

## Subcommands

- [`kosa8 ai bom`](https://docs.kosa8.com/reference/ai-bom.md): Write a CycloneDX 1.6 AI bill of materials for a sandbox, session or model
- [`kosa8 ai replay`](https://docs.kosa8.com/reference/ai-replay.md): Read back a model gateway session's replay record and check it against the audit log

---
Source: https://docs.kosa8.com/reference/ai/
