Kilo Docs

Docs / Build with AI/ Auto-assign agent

Auto-assign agent

Updated Aug 17, 2026

Paste into your coding AI

Webhook in. Your rules pick the rider.

For ops agents: when a delivery is created, list riders (distance ranking), assign even if they already have jobs — same as the dashboard.

  • delivery.created → GET /riders → POST assign
  • pickup_lat/lng ranks by distance (does not hide anyone)
  • Busy riders are still assignable (stacking)
  • No default radius; keep Auto-dispatch off

Paste into your coding agent with the backend repo open.

Best when: you want your backend (or coding agent) to choose a rider — nearest, idle-only, vehicle type, max active jobs — instead of (or in addition to) Kilo Auto-dispatch.

Pattern: webhook delivery.created → GET /riders with pickup coords (distance ranking, busy riders still listed) → POST /deliveries/{id}/assign. Same stacking rules as the dashboard.

Use the Copy prompt for AI card below. Keep Auto-dispatch off unless you want Kilo to race your agent.