GOOSE · FLIGHT DECK KEEPALIVE 5s
CALLSIGN · TELLO@172.16.10.168 · SDK v3

The drone that
answers to prose.

A Ryze RoboMaster TT flown by AI agents — telemetry, flight, and camera as plain English, routed through agentgateway as MCP. Then the real question: fly the same mission on gpt-5.5, Claude, and grokwhich model saves money?

3
models benchmarked
cost gap · dearest vs cheapest
28
MCP tools per flight
−39%
CodeSearch saving · gpt-5.5
01 · THE AIRCRAFT

A palm-sized quadcopter,
on the lab network.

The bird is a Ryze RoboMaster TT (Tello) in station mode — it joins the lab Wi-Fi at a reserved address and speaks the Tello SDK over three UDP channels. Everything the agents do bottoms out in those datagrams.

🛰️

:8889 command

Flight & query commands in, ACKs back.

takeoff · move · battery?
📡

:8890 state

Telemetry broadcast ~10 Hz while in SDK mode.

bat · height · attitude
🎥

:11111 video

H.264 stream for photos & recording.

take_photo · record
02 · SIGNAL CHAIN

From a sentence to a spinning rotor.

A request crosses four boundaries — model, gateway, MCP server, radio — and the telemetry comes back the same way. The gateway is the one control point: it prices, traces, and shapes every tool call.

🧑‍✈️

You

Plain English in the kagent UI.

"do a flip"
A2A
🤖

Agent · gpt-5.5

Reasons, picks a tool.

kagent · declarative
MCP
🚦

agentgateway

Tool-mode proxy, tracing, budgets.

/drone · :31606
🖥️

drone MCP server

Owns the UDP link · hostNetwork pod · 5s keepalive.

drone-system ns
UDP
🚁

The drone

Executes, streams telemetry back up the chain.

Tello SDK
03 · COMMAND LIFECYCLE

What happens when you ask.

A real trip through the stack — "what's the battery?" — plus the heartbeat that runs the whole time in the background so the answer is never stale.

1

Prompt

You type it (or tap an example). The agent, on gpt-5.5, decides get_battery is the right tool.

2

Through the gateway

The call hits agentgateway at /drone, which routes it to the drone MCP server — and traces it to Langfuse.

3

Onto the radio

The server sends battery? as a UDP datagram to the drone on port 8889 and waits for the reply.

4

Answer returns

The drone replies 76; it flows back up the same chain and the agent says it in plain English.

Meanwhile — the heartbeat

Every 5s the server re-sends command, keeping the drone in SDK mode so telemetry never stops.

Freshness, not fiction

get_state reports connected / stale / state_age_s — a dead link reads false, never a frozen value.

04 · FOUR WAYS TO HOLD THE STICK

One drone, four tool modes.

agentgateway can present the same 28 tools four different ways — from the full list to a single code sandbox — trading model context for directness. Each mode is its own agent and endpoint, all flying the same aircraft.

standard

drone-agent

All 28 tools, exposed directly. The simplest path — the model sees everything.

:31606/droneget_state · takeoff · orbit · panorama · celebrate …
search

drone-agent-search

Two meta-tools. The model looks a tool up, then invokes it — keeps context small.

:31606/drone-searchget_tool · invoke_tool
code

drone-agent-code

One tool: the model writes JavaScript that calls the drone in a 15s sandbox.

:31606/drone-coderun_code
codesearch

drone-agent-codesearch

Discover typed signatures, then write code against them. Smallest footprint of all.

:31606/drone-codesearchget_tool · run_code
05 · THE CODESEARCH FEATURE

CodeSearch cuts the tool tax.

Every MCP turn re-injects the 28-tool catalog into the prompt — pure token overhead. agentgateway's CodeSearch tool mode replaces it with two meta-tools (get_tool + run_code), so the model discovers only what it needs and batches calls in code. To prove it, the same flight ran on all four modes (Standard, Search, Code, CodeSearch) on gpt-5.5 — measured in tokens, straight from the kagent trace store. Money lives in §06; this is about the token tax.

TEST PROTOCOL · 5 prompts, one flightsame prompts, every agent
#PromptTools exercised
1“Take off and hover.”takeoff · get_state
2“Do a flip.”flip
3“Take a photo and describe what you see.”take_photo (vision)
4“Spin around 360 degrees.”rotate
5“Land and give me a status report.”land · status_report
RESULTS · 28-tool run · 2026-07-06
Agent · modeModel callsTotal tokensTurn latencyTokens vs Standard
drone-agentStandard3598.3k47sbaseline
drone-agent-searchSearch43123.0k68s+25%
drone-agent-codeCode2280.5k46s-18%
drone-agent-codesearchCodeSearch2153.1k37s-46%

CodeSearch — the agentgateway tool mode that swaps the 28-tool catalog for two meta-tools (get_tool + run_code) — is the focal point: same standard 5-prompt flight on 46% fewer tokens than Standard, the leanest of all four modes. Token counts pulled per call from the kagent Langfuse project. Per-prompt detail below.

READING THE RESULTS

Two forces set each mode's token count. Context tax — Standard puts all 28 tool schemas in front of the model on every call, so each prompt it sends is large. Search and CodeSearch keep context tiny by discovering tools on demand, but that buys extra round-trips (a get_tool/invoke_tool hop before the real call) — which is why Search racks up the most model calls. Code collapses a whole task into one run_code call, cutting round-trips but paying for the model to write JavaScript. CodeSearch gets both wins — typed signatures on demand plus a single code call — and lands leanest. One pattern holds across all four modes: the Land + status report prompt dominates, because the agent polls get_state repeatedly to compose the report (see the per-call detail — it's the biggest row in every mode).

PER-CALL DETAIL · tokens by prompt
Agent#PromptCallsInOut
Standard1Take off and hover.37.4k243
Standard2Do a flip.410.8k150
Standard3Take a photo and describe what you see.617.7k182
Standard4Spin around 360 degrees.515.9k116
Standard5Land and give me a status report.1745.1k667
Search1Take off and hover.917.5k341
Search2Do a flip.716.5k260
Search3Take a photo and describe what you see.719.1k262
Search4Spin around 360 degrees.722.0k170
Search5Land and give me a status report.1345.8k1.1k
Code1Take off and hover.39.5k690
Code2Do a flip.310.6k1.4k
Code3Take a photo and describe what you see.415.8k498
Code4Spin around 360 degrees.312.7k1.1k
Code5Land and give me a status report.927.0k1.2k
CodeSearch1Take off and hover.48.6k205
CodeSearch2Do a flip.49.2k378
CodeSearch3Take a photo and describe what you see.37.2k336
CodeSearch4Spin around 360 degrees.512.7k397
CodeSearch5Land and give me a status report.513.3k864
FLIGHT LOG · Standard agent — live kagent transcript
1 ▸ Take off and hover.
The drone is already airborne and hovering at about 80 cm. Battery is 90%, connection is live, and attitude is stable.
3 calls · 7.6k tok · 8s · completed
2 ▸ Do a flip.
Front flip complete. The drone should be back in hover at about 80 cm.
4 calls · 10.9k tok · 8s · completed
3 ▸ Take a photo and describe what you see.
Photo captured. I see a bright indoor lab with a desk and two monitors, a potted plant near a large window, pale grey walls, and a person waving in the background.
6 calls · 17.8k tok · 16s · completed
4 ▸ Spin around 360 degrees.
360° clockwise spin complete. The drone is back in hover.
5 calls · 16.1k tok · 6s · completed
5 ▸ Land and give me a status report.
Landed successfully.

Status report: drone is landed at 0 cm, connection is live, attitude is stable at roll 0 / pitch 0 / yaw 0, and the current battery reading is 86%.
17 calls · 45.8k tok · 9s · completed
06 · GPT vs CLAUDE vs GROK — WHO SAVES MONEY

Which model saves money?

The whole point. The identical flight, flown on three models — gpt-5.5, Claude (claude-fable-5), and xAI (grok-4.3) — each swapped in with a one-line agentgateway ModelConfig, every token metered in Langfuse. Verdict up front: grok-4.3 is cheapest and fastest, gpt-5.5 is the token-leanest and CodeSearch cuts it further, and claude-fable-5 is the most thorough but runs ~5× the cost. Same agent, same drone, same gateway — the model is the biggest lever on the bill.

MODEL COMPARISON · same flight, three models

How to read it. Cost = tokens × each model's price — gpt-5.5 and Claude priced by Langfuse, grok-4.3 from models.dev (grok-4 rate, $3/M in · $15/M out). The CodeSearch saves column compares each model's CodeSearch run to its own Standard run, so it isolates the tool mode from the model choice.

ModelModeCallsTokensLatencyCostCodeSearch saves
gpt-5.5Standard3598.3k47s$0.5252baseline
gpt-5.5CodeSearch helps mostCodeSearch2153.1k37s$0.3201−39%
claude-fable-5dearestStandard26159.5k79s$1.6676baseline
claude-fable-5CodeSearch33165.6k101s$1.5167−9%
grok-4.3fastestStandard34113.0k25s$0.3441baseline
grok-4.3cheapestCodeSearch3399.5k31s$0.3050−11%

Takeaways — two levers, one lesson. Tool mode: CodeSearch is a big win for gpt-5.5 (−46% tokens, −39% cost) but a wash for claude-fable-5 — it doesn't shrink Claude's verbose runs. Model: grok-4.3 is cheapest and fastest (CodeSearch $0.3050, ~25–31s); gpt-5.5 is the token-leanest; Claude is the most thorough but roughly 5× the cost of grok. The winning tool mode is model-dependent — benchmark the mode with the model you'll actually ship.

COST PER FLIGHT · lower is better
Cost per flight — Standard vs CodeSearch, three models Standard CodeSearch $0.00 $0.45 $0.90 $1.35 $1.80 $0.53 $0.32 gpt-5.5 $1.67 $1.52 claude-fable-5 $0.34 $0.30 grok-4.3 cost per full flight (USD) · lower is better
TOKENS PER FLIGHT · lower is better
Tokens per flight — Standard vs CodeSearch, three models Standard CodeSearch 0k 45k 90k 135k 180k 98k 53k gpt-5.5 160k 166k claude-fable-5 113k 100k grok-4.3 total tokens per flight (thousands) · lower is better
KAGENT TRACING · every flight, every call, metered

These numbers aren't estimated — they're read straight from kagent's built-in tracing (Solo Enterprise for kagent), the same spans that flow to Langfuse. Every prompt is a trace with its input, output, duration, and token count; drill in and you see the agent's execution flow and each tool call.

Tracingone trace per prompt
Take off and hover1.11s2,815
Do a flip0.74s2,925
Take a photo1.51s3,104
Spin 360°1.03s3,229
Land + status report1.46s3,614
duration & tokens, per prompt · exported to Langfuse
drone_agent_cs_claudeCodeSearch · claude-fable-5
get_toolrun_code
prompt 5,503output 120total 5,623
“📷 Photo captured — a bright indoor lab: a desk with two monitors, a potted plant by a window, pale grey walls.”
drone_agent_claudeStandard · claude-fable-5
celebrate·get_state
prompt 6,898output 99total 6,997
“🌀 Full 360° spin complete — height holding at 80 cm, battery 75%, attitude level.”
drone_agent_cs_xaiCodeSearch · grok-4.3
get_toolrun_code
prompt 2,921output 4total 2,933
“Forward flip completed.” — grok in 4 output tokens. Terse and fast.
FULL MATRIX · 4 models × 4 modes × 1× runs

Every model flown on every tool mode, 1 pass(es) each (mean shown; range in small text). Tokens per flight — lower is leaner.

Tokens per flight — line per model, across tool modes 53.8k 107.5k 161.3k 215.0k Standard Search Code CodeSearch gpt-5.5 claude-fable-5 grok-4.3 Qwen (local)
Cost per flight — line per model, across tool modes $0.00 $0.57 $1.13 $1.70 $2.26 Standard Search Code CodeSearch gpt-5.5 claude-fable-5 grok-4.3 Qwen (local)
MEAN TOKENS · model × mode
ModelStandardSearchCodeCodeSearch
gpt-5.591.1k37.0k140.3k
claude-fable-5192.0k116.0k122.3k172.3k
grok-4.3103.8k60.7k87.9k106.8k
Qwen (local)60.7k77.4k96.8k130.3k
07 · TOOL CATALOG

28 tools, seven systems.

Every capability the drone MCP server exposes — 16 primitives that map straight to Tello SDK commands, plus 12 composite maneuvers that orchestrate them into higher-level moves. The agent calls these by name (Standard mode) or discovers them at runtime (Search / Code). Two canned prompts round it out — one-tap procedures. Flight maneuvers assume the drone is already airborne.

Telemetry 2

  • get_stateLive connected/stale flags + battery, height, attitude, ToF.
  • get_batteryActive battery? query — guaranteed-current %.

Flight 6

  • takeoffAuto lift-off. Refused below 15% battery.
  • landAuto land (retries through Wi-Fi blips).
  • emergencyCut all motors immediately.
  • moveup/down/left/right/forward/back · 20–500 cm.
  • rotatecw / ccw · 1–360°.
  • flipforward / back / left / right.

Camera 5

  • take_photoStill the agent can see and describe.
  • start_recordingBegin an mp4 capture.
  • stop_recordingSave the current recording.
  • list_mediaPhotos & videos on disk.
  • get_mediaFetch a captured photo by name.

LED matrix 2

  • set_led_textScroll text on the 8×8 — color, direction, speed.
  • clear_ledBlank the display.

Raw 1

  • send_commandAny Tello SDK / RMTT EXT command. Advanced.

Maneuvers — flight ✈ 9

  • orbitTrace a circle: N steps of rotate + forward.
  • patrol_squareFly a square — 4× forward + turn 90°.
  • figure_eightTwo opposing loops in a figure-8.
  • spiral_upAscending spiral — climb, turn, advance.
  • zigzagS-path alternating left/right diagonals.
  • waveGreeting — rock side to side in place.
  • celebrateScroll YAY → flip → heart on the LED.
  • panoramaSweep 360°, take N evenly-spaced photos.
  • selfieBack up, take a photo, return to position.

Maneuvers — ground ◎ 3

  • led_marqueeScroll any message across the 8×8 matrix.
  • countdownFlash 3 · 2 · 1 · GO on the LED.
  • status_reportBundle telemetry + live battery + Wi-Fi SNR.

Prompts canned

  • preflight_checkGuided readiness sweep → a clear GO / CAUTION / NO-GO verdict.
  • orbit_and_photographCircle an object at a set distance and shoot all four sides.
08 · THE SKILL & THE AGENT

What it knows before it flies.

An agent isn't just a model with tools — it carries a skill (an operating runbook) and a brief that shape how it flies. Both live in Git, so every agent behaves the same across restarts.

📖

Skill · drone-operations

A runbook the agent pulls from this repo (skills/drone) at runtime — not baked into the model. It carries the facts a pilot needs: the drone's IP and UDP ports, that takeoff is refused under 15% and <30% means "land soon", how to read stale telemetry, and to describe a photo rather than dump JSON. Edit the runbook, and every agent's behavior updates on the next pull.

🧩

Five ingredients

Each of the four agents is the same recipe with one dial changed — the tool mode. The model, skill, and safety rules stay constant; only how the tools are presented differs. That's what makes them a clean side-by-side comparison.

Model
gpt-5.5
Via agentgateway's OpenAI route — the agent never holds a real key.
Tools
RemoteMCPServer
Points at a /drone* endpoint — the tool mode lives here.
Skill
drone-operations
gitRef runbook, fetched at runtime from this repo.
Brief
systemMessage
Mode-specific: how to use get_tool / run_code, plus flight rules.
Examples
a2aConfig
The tappable prompts — "can you take off", "do a flip".
09 · FLIGHT SYSTEMS

Built for a flaky Wi-Fi world.

The drone drops SDK mode after ~15s of silence and its Wi-Fi is unreliable. Four systems keep the picture honest and the aircraft safe.

💓

Keepalive

A background thread re-sends command every 5 seconds, so telemetry streams non-stop — and a drone you just charged reconnects on its own within ~5s. No pod restart.

🩺

Freshness

get_state stamps every packet. connected means "heard from it in the last 5s" — otherwise stale:true, so the agent never quotes a frozen number.

🔋

Live battery

get_battery actively asks the drone (battery?) instead of trusting the cache — the reading you get is the reading right now.

⚠️

Selective retry

Idempotent commands (battery, land, emergency, keepalive) retry through Wi-Fi blips. Movement never does — a timed-out move may have already run, and a retry would double it.

battery? ↻land ↻move ✗flip ✗
10 · PRE-FLIGHT SETUP

The whole rig, in a few files.

Everything is GitOps — edit, push, ArgoCD syncs. Here's the shape: the server on the drone LAN, a gateway endpoint per mode, and an agent that speaks to it.

drone-mcp-server.yamlhostNetwork · drone-system
# owns the drone's UDP link directly
env:
  - name: TELLO_IP
    value: "172.16.10.168"  # DHCP-reserved
hostNetwork: true
nodeSelector:
  kubernetes.io/hostname: talos-9kw-b68
EnterpriseAgentgatewayBackendtool mode
spec:
  entMcp:
    toolMode: Code  # Standard|Search|Code|CodeSearch
    codeMode: { timeout: "15s" }
    targets:
      - static:
          host: drone-mcp-server.drone-system…
          port: 8090
          path: /mcp/
talk to it — MCP initialize over the gatewaycopy
curl -s http://172.16.10.155:31606/drone \
  -H 'Content-Type: application/json' \
  -H 'Accept: application/json, text/event-stream' \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize",
      "params":{"protocolVersion":"2025-06-18",
      "capabilities":{},"clientInfo":{"name":"cli","version":"0"}}}'
EndpointURLExposes
Standard172.16.10.155:31606/droneall 28 tools
Search…/drone-searchget_tool · invoke_tool
Code…/drone-coderun_code
CodeSearch…/drone-codesearchget_tool · run_code