Skip to content
AGNT
All guides
Ecosystem workflowintermediate

Using Gemini CLI to operate an AGNT venue loop

Tail venue inbox logs, draft replies, and escalate stuck messages through a Gemini CLI session.

AGNT runs a per-venue polling loop that pulls new guest messages, drafts replies, and routes stuck cases to human review. This guide shows how to run that loop interactively from Gemini CLI — useful for venue operators who want to ride along and intervene in real time.

AGNT Venue Operations10 minverified 2026-04-10

Prerequisites

  • Gemini CLI installed with a working Google AI Studio key.
  • A venue in AGNT that you own or have operator access to.
  • Access to the venue's inbox log stream (path from /developers).

The venue loop

Every venue in AGNT runs an inbox polling loop. By default it runs every 60 seconds: pull new messages, classify them, draft replies, auto-send high-confidence replies, and queue low-confidence ones for review. The loop emits a log line per step, and those log lines are the raw material Gemini CLI is going to tail.

Running the loop interactively through a CLI agent changes the operator experience. Instead of reading raw logs in a terminal, you get a model that watches the stream, summarizes what's happening, and proposes interventions when something looks off.

Step 1 — Start Gemini CLI pointed at the log stream

Gemini CLI supports attaching a file or stream as project context. Start a session with the venue log as a streaming input:

gemini --stream /var/log/agnt/venues/$VENUE_ID.log \
  --system-prompt "$(cat ~/.agnt/prompts/venue-loop-operator.md)"

The system prompt lives locally — we ship a template in the /prompts library (`venue-reply-drafting`) but you'll want to adapt it to your venue's voice.

Step 2 — Watch the stream

Once attached, Gemini CLI will start summarizing incoming log events. A typical summary might look like: "3 new inbound messages in the last minute; 2 auto-replied with high confidence, 1 flagged for review (guest asked about vegan options, menu data is incomplete for that section)".

The key property here: Gemini is not just tailing the log, it's classifying. If something unusual happens — a spike in low-confidence replies, a venue agent that stops emitting heartbeats, a message in a language the venue doesn't support — Gemini surfaces it before you would have noticed scrolling the raw log.

Step 3 — Intervene on stuck cases

When a message lands in the review queue, you can ask Gemini CLI to draft a better reply. Use the prompt from `/prompts/venue-reply-drafting` to keep it aligned with the venue's voice:

CLI prompt: "draft a reply for the vegan options question in the review queue, venue voice from the system prompt, language matching the guest's message"

Gemini reads the current inbound message, the venue's voice guidance, and any relevant memory, then produces a reply. Copy-paste it into the AGNT operator console to send.

Step 4 — Escalate when you can't fix it

Some cases can't be auto-replied. A guest asking for a refund on a booking the venue didn't honor. A complaint about staff behavior. A media inquiry. These should escalate to the venue owner.

Ask Gemini CLI to draft an escalation summary: what the guest said, what the agent tried, what the operator recommends. The summary goes to the venue owner's Telegram via AGNT's escalation webhook. Keep it short — owners read these on their phone.

Why use Gemini CLI for this?

Two reasons. First, Gemini's multimodal support is strong — if a guest sends a menu photo or a screenshot, Gemini can read it inline as part of the stream, which Claude Code can't do without an extra OCR step. For venues where guests frequently share images (screenshots of their confirmation, photos of their table, etc.), this is a real capability gap.

Second, cost. Gemini Flash is aggressively priced for high-frequency polling workloads. A venue loop that runs every 60 seconds burns meaningful tokens — you want the cheapest model that can still do the classification well, and Gemini Flash is competitive for this workload.

Next steps