An AI agent flies a real drone.

Say "orbit the tower and come back." The agent maps it to one whitelisted command and posts it to a safety bridge โ€” geofence, altitude ceiling, battery and take-off confirmation all enforced server-side. Try it below, no hardware needed.

agent โ†’ bridge โ†’ aircraft
๐Ÿš
POST /command
{ "action": "orbit",
  "radius_m": 40 }
โœ“ 200 accepted ยท in geofence
โœ— 422 refused ยท out of fence

From a sentence to a safe flight โ€” in four steps.

No raw stick input, ever. The agent can only pick from a fixed command whitelist, and the bridge is the last word on whether any of them is allowed to run.

๐Ÿ—ฃ๏ธ

1 ยท You ask

"Orbit the north tower at 40 m and film it, then come home."

๐Ÿง 

2 ยท Agent maps

The Bankr skill reads /state and turns your words into one whitelisted command.

๐Ÿ›ก๏ธ

3 ยท Bridge checks

Geofence, altitude, battery, GPS fix and take-off confirmation โ€” pass or it returns 422.

๐Ÿš

4 ยท Drone flies

Only approved commands reach the aircraft. Return-to-home is always the safe fallback.

Safety is enforced at the bridge

Not in the prompt, not in the agent โ€” in code, server-side. Six hard limits every flight command must clear.

๐Ÿ“

Geofence

Every target point must sit inside a radius around home (default 500 m). Out-of-fence โ†’ 422.

๐Ÿ“

Altitude ceiling

No command may exceed the configured max altitude (default 120 m).

๐Ÿ”‹

Battery floor

Below the safe threshold, only return-to-home is permitted.

โœ‹

Take-off confirm

Leaving the ground requires an explicit confirm:true. No accidental launches.

๐Ÿ“ก

State-before-flight

Every action first checks online status and GPS fix, or it stops.

๐Ÿ 

Safe fallback

Anything ambiguous or unsafe resolves to return-to-home and land on the Dock.

The command whitelist

The agent can only ever send one of these. There is no raw-control path โ€” it doesn't exist by construction.

ActionParametersWhat it doesGated by
get_stateโ€”Battery, GPS, altitude, geofence status.always safe
takeoffconfirm, alt_mAscend to a safe hover.confirm + battery + altitude
gotolat, lon, alt_mFly to a point.geofence + altitude
orbitradius_m, alt_mCircle the current point (filming).geofence + altitude
set_altitudealt_mClimb or descend.altitude ceiling
capture_photoโ€”Take a still.safe (no flight)
start_recordingโ€”Start video.safe (no flight)
return_to_homeโ€”Fly back and land on the Dock.the safe fallback

Try it โ€” no hardware

The exact same flight model and safety logic the bridge runs, ported to your browser. Fly the missions, then hit "fly 2 km" and watch the geofence refuse it.

๐Ÿš Live flight simulator
โ— simulator ยท no aircraft
Flight status
on dock
Battery
100%
Altitude
0 m
Dist from home
0 m
GPS
โ€” , โ€”
Geofence
OK
Fly a mission
Command log

Green = accepted by the bridge. Red = refused (HTTP 422) by a safety gate. Identical contract, identical refusals over real hardware.

Run the real bridge

The simulator above runs in-browser. To drive a real DJI Dock, run the bridge near it โ€” the HTTP contract and every safety gate stay identical.

git clone https://github.com/richard7463/bankr-dji-drone
cd bankr-dji-drone
pip install -r bridge/requirements.txt

# 1) Simulator mode โ€” zero hardware
export BRIDGE_TOKEN=$(openssl rand -hex 24)
export DRONE_MOCK=1
uvicorn bridge.server:app --host 0.0.0.0 --port 8080
# โ†’ open http://localhost:8080/

# 2) Real Dock โ€” drop the mock, add DJI Cloud API creds
export DRONE_MOCK=0
export DJI_CLOUD_APP_KEY=...  DJI_CLOUD_APP_SECRET=...
export GEOFENCE_RADIUS_M=500  MAX_ALT_M=120
uvicorn bridge.server:app --host 0.0.0.0 --port 8080