# Tutorial: Make the A.I Honeypot: fills, responses, and Hikvision photos

**Audience:** Operators who want the honeypot to use AI for realism, not only
static personas.

**Time:** about 45-70 minutes (broker setup + one deep-dive)  
**Outcome:** You enable Emulated + AI mode, understand which surfaces AI can
fill, then pick one hands-on path: **shell/HTTP responses**, **database bait**,
or **Hikvision scene photos**.

!!! warning "AI never owns the wire"
    The Go policy engine validates every broker fill (`ValidateSlotFill`).
    Scores never auto-enable AI (SEC-AI-001). Broker down → static/template
    fallback, never an empty world and never expanded attacker authority.
    See [Decoy realism & AI fills](../how-to/decoy-realism-ai.md).

## What “A.I Honeypot” means here

| You want… | Surface | How |
|-----------|---------|-----|
| **Answer responses with AI** | SSH/shell stdout, HTTP index bodies, VFS file bodies | Emulated + `--mode=ai` + broker; slots like `shell.stdout`, `http.index_body`, `vfs.file_body` |
| **Fill data with AI** | Redis / SQL / Mongo / ES bait | Emulated DB Listen + `*-ai-seed=1` + broker ([db-decoys-ai-emulated](db-decoys-ai-emulated.md)) |
| **Generate Hikvision photos with AI** | Camera snapshot / scene JPEG pool | Hikvision pack + `CYBERHALLUCINET_HTTP_HIKVISION_AI_IMAGE=1` + Ollama ([hikvision-http-decoy](hikvision-http-decoy.md) Path B) |

AI does **not** invent wire banners, open sockets, or replace protocol codecs.
Banners and binary fidelity stay in persona/code.

## Prerequisites

- Contained lab already works ([beginner-student-lab](beginner-student-lab.md))
- Docker (recommended) for research compose + AI broker UDS, **or** local broker + Ollama
- Optional: Ollama on the host for generative fills / scene images

## Step 1: Turn on Emulated + AI mode

AI fills require the Emulated interaction tier and a healthy broker UDS.

```bash
export CYBERHALLUCINET_INTERACTION=emulated
export CYBERHALLUCINET_MODE=ai
export CYBERHALLUCINET_BROKER_UDS=/ipc/broker.sock   # absolute path in your stack
```

Ops GUI path: **Launch → Interaction tier → Emulated**, with AI/broker enabled
per research compose.

Equivalent sensor flags:

```bash
./bin/sensor --profile=research --mode=ai \
  --broker-uds=/ipc/broker.sock \
  --listen-ssh=127.0.0.1:2222
```

Full Level-2 matrix: [Progressive onboarding](../how-to/progressive-onboarding.md).

## Step 2: Choose a broker adapter

| Adapter | When |
|---------|------|
| `static_stub` | Fast proof that the AI path is wired (deterministic templates that pass policy) |
| `local` | Low-latency structured SLM for `redis.value` / short shell lines |
| `ollama` | Generative shell / HTTP / scene-image related work (pin model digest) |
| `hosted` | External LLM via Go inference proxy: keys never on the broker ([hosted-llm-proxy](hosted-llm-proxy.md)) |

```bash
# Start deterministic, then move to Ollama when ready
export CYBERHALLUCINET_BROKER_ADAPTER=static_stub

# Later:
# export CYBERHALLUCINET_BROKER_ADAPTER=ollama
# export CYBERHALLUCINET_OLLAMA_URL=http://host.docker.internal:11434
# export CYBERHALLUCINET_OLLAMA_MODEL=llama3.2:1b
# export CYBERHALLUCINET_OLLAMA_MODEL_DIGEST=<sha256 hex without prefix>
```

Operator reference: [Decoy realism & AI fills](../how-to/decoy-realism-ai.md).

## Step 3: Pick one hands-on path

### A) Answer attacker commands / HTTP with AI

After Step 1-2, exercise allowlisted unknown shell leaves and HTTP content slots.
The broker may suggest `shell.stdout` / `http.index_body`; Go still validates
every byte. Fail-closed when the broker is down.

Continue with:

1. [Decoy realism & AI fills](../how-to/decoy-realism-ai.md): slot table and safety
2. [AI safety controls](ai-safety-controls.md): kill-switch, digest, guard
3. Optional: [AI eval & field monitoring](ai-eval-field-monitoring.md)

### B) Fill database decoy data with AI

Seed Redis keys, SQL rows, and document stores via schema-bound slots
(`redis.value`, `mysql.row`, …) and `*-ai-seed=1`.

**Open next:** [Database decoys with AI bait (Emulated)](db-decoys-ai-emulated.md)

### C) Generate Hikvision scene photos with AI

Enable the camera face first (deterministic Path A), then Path B for an async
JPEG scene pool when AI/Ollama is already healthy:

```bash
export CYBERHALLUCINET_HTTP_HIKVISION=1
export CYBERHALLUCINET_HTTP_HIKVISION_AI_IMAGE=1
export CYBERHALLUCINET_HIKVISION_IMAGE_POOL=/var/lib/chn/hikvision-scenes
# sensor --mode=ai + broker + Ollama already required
```

**Open next:** [Hikvision App-webs decoy](hikvision-http-decoy.md): follow **Path B: Scene images**.

Engagement traps (breadcrumbs / canaries) are separate and are **not**
score-gated AI: [hikvision-engagement-traps](hikvision-engagement-traps.md).

## Done when

- [ ] Emulated + `MODE=ai` + broker UDS are configured
- [ ] You know the difference between `static_stub` and `ollama` / `hosted`
- [ ] You completed at least one of: shell/HTTP fills, DB AI bait, or Hikvision Path B
- [ ] You verified broker-down still serves static/template content (fail-closed)

## Related

- Safety invariants: [docs/security/invariants.md](../security/invariants.md)
- Slot / adapter deep dive: [decoy-realism-ai.md](../how-to/decoy-realism-ai.md)
- Governance (after the practical path): [ai-guardrails-phase2.md](ai-guardrails-phase2.md)
