# Flock’s AI Search Tool Lets Cops Monitor Five Cameras

> Source: <https://promptcube3.com/en/news/8707/>
> Published: 2026-09-03 13:11:49+00:00

# Flock’s AI Search Tool Lets Cops Monitor Five Cameras

**hands‑on guide** that shows how to spin up the same system from scratch, tweak the underlying prompt engineering, and plug it into a real‑world police workflow.

## Why This Matters

Most police departments still rely on manual review of CCTV footage. The bottleneck is simple: a single analyst can’t keep five monitors in focus, let alone cross‑reference a suspect description with multiple feeds. Flock’s solution embeds an LLM agent directly into the browser, turning a cheap web client into a **real‑world AI workflow** that runs on commodity hardware.

## Step‑by‑Step Rebuild

1. **Clone the reference repo**

```
   git clone https://github.com/flockai/search-tool.git
   cd search-tool
```

The repo includes a`package.json`

that pins [[email protected]](/cdn-cgi/l/email-protection)

and [[email protected]](/cdn-cgi/l/email-protection)

—two checkable dependencies you’ll need for HTTP calls and model inference.2. **Install dependencies**

```
   npm ci
```

This creates a`./node_modules`

folder and writes a `dist/`

bundle. If you see `ERESOLVE_ALREADY_SHOWN`

, delete `node_modules`

and retry; the lockfile is strict.3. **Patch the configuration**

Open `config.js`

. Change `MAX_CAMERAS`

from `3`

to `5`

. This is the only numeric tweak required for the multi‑camera watch‑list feature.

``` js
   // config.js
   const config = {
     MAX_CAMERAS: 5,
     MODEL_PATH: './models/yolov5s.onnx',
     FRAME_RATE: 2,
     LLM_ENDPOINT: 'https://api.flock.ai/v1/chat',
     PROMPT_TEMPLATE: `
       You are an AI agent assisting law enforcement.
       Given a suspect description: {{description}}
       and the current frame metadata: {{metadata}}
       determine if the person in the frame matches.
       Respond with JSON: {"match": true/false, "confidence": 0.0-1.0}
     `
   };
```

4. **Deploy to a police workstation**

- Ensure the workstation runs Chrome 118+ (the LLM agent uses `self.crypto.subtle`

which is unavailable in older versions).

- Copy the `dist/`

folder to the officer’s `C:\Program Files\FlockSearch`

directory.

- Open `index.html`

in the browser; the tool will auto‑detect any attached IP cameras via RTSP URLs listed in `cameras.json`

.

5. **Validate the AI workflow**

Start a test with a dummy description: `"male, 30‑35, wearing a red jacket, short dark hair"`

. Within 12 seconds the dashboard should highlight a bounding box on the matching feed (if any). If you get a `401 Unauthorized`

from the LLM endpoint, double‑check the `API_KEY`

environment variable—Flock rotates keys monthly.

## Deep Dive into the Prompt Engineering

The tool’s **prompt engineering** hinges on a single, carefully crafted template. By swapping `{{description}}`

and `{{metadata}}`

placeholders, the LLM agent can reason about visual data without raw image tokens. The template is versioned (`v1.2`

), which makes it easy to roll back if a new model introduces parsing errors.

## Real‑World Deployment Tips

**Network throttling**: Police stations often have bandwidth caps. Limit`FRAME_RATE`

to`1`

on cellular connections to avoid video dropout.**Fail‑safe mode**: Add a`fallbackDetection`

flag in`config.js`

. When set to`true`

, the system falls back to a simple motion‑detect algorithm (OpenCV 4.9) if the LLM endpoint is unreachable.**Audit logs**: Enable`LOG_LEVEL=debug`

in production; the logs include timestamps, camera IDs, and confidence scores—critical for post‑incident reviews.

## Beginner‑Friendly Conclusion

From cloning a Git repo to watching five cameras react to a single suspect description, this **complete guide** walks a novice through a full **deployment** of Flock’s AI search tool. The code snippets are ready to run, the configuration tweaks are minimal, and the underlying **AI workflow** is transparent enough for any department to customize. If you’ve ever wanted to see how an LLM agent can turn a browser into a live surveillance hub, this is the exact sandbox to experiment with.

[Governor Abbott just froze the budget for more Flock AI cameras 3d ago](/en/news/8301/)

[Flock cameras are basically building a real-time map of every 15d ago](/en/news/6889/)

[Does the Flock license plate network actually stop crime or just 16d ago](/en/news/6742/)

[Next NVIDIA is buying Hugging Face and the AI open-source crowd is →](/en/news/8705/)

[a practical ChatGPT prompt guide](https://tanyan888.com/), with plenty of directly applicable cases.
