read-only demo

Videos 8txf05vVVl4

Code Mode: Let the Code do the Talking - Sunil Pai, Cloudflare

index_state ready data_status ok

AI Engineer· published 2026-04-19· 0:19:40· en-US· indexed 2026-08-10 23:42

Open on YouTube

Scene timeline

  1. Shot 0, 0:00 to 0:05, 1 of 1 keyframes kept
  2. Shot 1, 0:05 to 0:09, 1 of 1 keyframes kept
  3. Shot 2, 0:09 to 0:14, 1 of 1 keyframes kept
  4. Shot 3, 0:14 to 0:33, 1 of 1 keyframes kept
  5. Shot 4, 0:33 to 0:42, 1 of 1 keyframes kept
  6. Shot 5, 0:42 to 0:43, 1 of 1 keyframes kept
  7. Shot 6, 0:43 to 1:01, 1 of 1 keyframes kept
  8. Shot 7, 1:01 to 1:38, 1 of 1 keyframes kept
  9. Shot 8, 1:38 to 2:16, 1 of 1 keyframes kept
  10. Shot 9, 2:16 to 2:29, 1 of 1 keyframes kept
  11. Shot 10, 2:29 to 2:44, 0 of 1 keyframes kept
  12. Shot 11, 2:44 to 3:00, 1 of 1 keyframes kept
  13. Shot 12, 3:00 to 3:26, 1 of 1 keyframes kept
  14. Shot 13, 3:26 to 3:53, 1 of 1 keyframes kept
  15. Shot 14, 3:53 to 4:20, 0 of 1 keyframes kept
  16. Shot 15, 4:20 to 4:32, 1 of 1 keyframes kept
  17. Shot 16, 4:32 to 5:09, 1 of 1 keyframes kept
  18. Shot 17, 5:09 to 5:18, 1 of 1 keyframes kept
  19. Shot 18, 5:18 to 5:27, 0 of 1 keyframes kept
  20. Shot 19, 5:27 to 5:44, 1 of 1 keyframes kept
  21. Shot 20, 5:44 to 5:48, 1 of 1 keyframes kept
  22. Shot 21, 5:48 to 5:54, 1 of 1 keyframes kept
  23. Shot 22, 5:54 to 5:55, 1 of 1 keyframes kept
  24. Shot 23, 5:55 to 6:01, 1 of 1 keyframes kept
  25. Shot 24, 6:01 to 6:06, 1 of 1 keyframes kept
  26. Shot 25, 6:06 to 6:14, 1 of 1 keyframes kept
  27. Shot 26, 6:14 to 6:24, 1 of 1 keyframes kept
  28. Shot 27, 6:24 to 6:33, 1 of 1 keyframes kept
  29. Shot 28, 6:33 to 6:36, 1 of 1 keyframes kept
  30. Shot 29, 6:36 to 6:57, 1 of 1 keyframes kept
  31. Shot 30, 6:57 to 7:05, 1 of 1 keyframes kept
  32. Shot 31, 7:05 to 7:10, 1 of 1 keyframes kept
  33. Shot 32, 7:10 to 7:39, 1 of 1 keyframes kept
  34. Shot 33, 7:39 to 7:54, 1 of 1 keyframes kept
  35. Shot 34, 7:54 to 8:38, 1 of 1 keyframes kept
  36. Shot 35, 8:38 to 9:05, 0 of 1 keyframes kept
  37. Shot 36, 9:05 to 9:08, 1 of 1 keyframes kept
  38. Shot 37, 9:08 to 9:52, 1 of 1 keyframes kept
  39. Shot 38, 9:52 to 10:05, 1 of 1 keyframes kept
  40. Shot 39, 10:05 to 10:25, 1 of 1 keyframes kept
  41. Shot 40, 10:25 to 10:57, 1 of 1 keyframes kept
  42. Shot 41, 10:57 to 10:59, 1 of 1 keyframes kept
  43. Shot 42, 10:59 to 11:13, 0 of 1 keyframes kept
  44. Shot 43, 11:13 to 11:45, 0 of 1 keyframes kept
  45. Shot 44, 11:45 to 12:29, 1 of 1 keyframes kept
  46. Shot 45, 12:29 to 12:55, 1 of 1 keyframes kept
  47. Shot 46, 12:55 to 13:21, 0 of 1 keyframes kept
  48. Shot 47, 13:21 to 13:47, 0 of 1 keyframes kept
  49. Shot 48, 13:47 to 14:13, 0 of 1 keyframes kept
  50. Shot 49, 14:13 to 14:39, 1 of 1 keyframes kept
  51. Shot 50, 14:39 to 15:05, 0 of 1 keyframes kept
  52. Shot 51, 15:05 to 15:30, 1 of 1 keyframes kept
  53. Shot 52, 15:30 to 15:56, 0 of 1 keyframes kept
  54. Shot 53, 15:56 to 16:08, 1 of 1 keyframes kept
  55. Shot 54, 16:08 to 16:39, 1 of 1 keyframes kept
  56. Shot 55, 16:39 to 17:04, 1 of 1 keyframes kept
  57. Shot 56, 17:04 to 17:29, 1 of 1 keyframes kept
  58. Shot 57, 17:29 to 17:47, 1 of 1 keyframes kept
  59. Shot 58, 17:47 to 17:54, 1 of 1 keyframes kept
  60. Shot 59, 17:54 to 17:59, 1 of 1 keyframes kept
  61. Shot 60, 17:59 to 18:21, 1 of 1 keyframes kept
  62. Shot 61, 18:21 to 18:48, 0 of 1 keyframes kept
  63. Shot 62, 18:48 to 19:15, 1 of 1 keyframes kept
  64. Shot 63, 19:15 to 19:18, 1 of 1 keyframes kept
  65. Shot 64, 19:18 to 19:21, 1 of 1 keyframes kept
  66. Shot 65, 19:21 to 19:24, 1 of 1 keyframes kept
  67. Shot 66, 19:24 to 19:39, 1 of 1 keyframes kept

67 shot(s).

keyframes kept every frame deduplicated

What was stored

cues
253
whisperx 253
chunks
34
from 253 cues
keyframes
55
kept of 67 captured
frames with text
55
1,141 lines read
chapters
15
from the source metadata
keyframe bytes
5.3 MB
word timings on 253 cues

Provenance

Each pipeline stage, its state and the model that produced it
stage state model started took
fetch done 2026-08-10 23:38 1m 06s
stt done 2026-08-10 23:39 21s
chunk done 2026-08-10 23:39 0s
text_embed done 2026-08-10 23:39 0s
keyframe done 2026-08-10 23:39 2m 00s
ocr done 2026-08-10 23:41 27s
frame_embed done 2026-08-10 23:42 9s

Frames, and what the machine read

  • 0:02 #0 done2 line(s)

    shot 0·sharpness 667.3

    1. Al Engineer0.94
    2. EUROPE1.00
  • 0:06 #1 done2 line(s)

    shot 1·sharpness 825.0

    1. PRESENTINGSPONSOR1.00
    2. Google DeepMind1.00
  • 0:11 #2 done3 line(s)

    shot 2·sharpness 938.7

    1. PLATINUM SPONSORS0.98
    2. # Braintrust0.95
    3. WorkOS OpenAI0.95
  • 0:22 #3 done6 line(s)

    shot 3·sharpness 436.2

    1. AlEngineer0.98
    2. AlEngineer1.00
    3. EUROPE1.00
    4. CLOÚDFLARE0.97
    5. EUROPE0.99
    6. AIE1.00
  • 0:35 #4 done5 line(s)

    shot 4·sharpness 727.8

    1. SUNIL1.00
    2. PAI1.00
    3. AE0.88
    4. FOUNDER I PRINCIPAL SYSTEMS ENGINEER0.97
    5. AIE0.99
  • 0:43 #5 done19 line(s)

    shot 5·sharpness 807.9

    1. tageeercai0.65
    2. AMEEgijieeer0.86
    3. ELRUROPE0.92
    4. AA0.97
    5. #田Beairttrusst0.88
    6. AAEEngineer0.95
    7. LEUROPE0.92
    8. AAFEngineer0.96
    9. MMicrosoft0.94
    10. EUROPE1.00
    11. AlEngineer0.98
    12. EUROPE1.00
    13. Trigger.dew1.00
    14. AlEngineerr0.99
    15. Google DeepMind1.00
    16. EUROPE0.98
    17. AMEngijieeer0.97
    18. tailsalee0.90
    19. EURORPE0.99
  • 0:59 #6 done24 line(s)

    shot 6·sharpness 860.8

    1. AIEngineer0.98
    2. together.ai1.00
    3. AlEngineer0.96
    4. EUROPE1.00
    5. EUROPE1.00
    6. SAF0.96
    7. AlEngineer0.99
    8. Braintrust1.00
    9. INTELLIM0.95
    10. EUROPE1.00
    11. arize0.92
    12. AlEngineer0.98
    13. EUROPE1.00
    14. AlEngineer0.97
    15. EUROPE1.00
    16. PRESENTED BY1.00
    17. AlEngineer0.97
    18. △Trigger.dev0.95
    19. Google DeepMind1.00
    20. EUROPE1.00
    21. 1/28→0.95
    22. Modal1.00
    23. AlEngineer0.95
    24. EUROPE1.00
  • 1:34 #7 done34 line(s)

    shot 7·sharpness 1561.9

    1. AIEngineer0.95
    2. Worl0.89
    3. EUROPE1.00
    4. SAF1.00
    5. AlEngine0.98
    6. INTELLIG1.00
    7. EUROPE1.00
    8. ari:0.89
    9. Tool calling gets weird at scale1.00
    10. AlEngineer0.98
    11. EUROPE1.00
    12. model0.99
    13. tool0.97
    14. model0.99
    15. tool0.97
    16. PRESENTED BY0.99
    17. AIEngine0.94
    18. Google DeepMind1.00
    19. Giving models bash helped - one tool instead of many. But it's still text0.98
    20. EUROPE1.00
    21. in, text out, with no types, no permissions model, no composition.0.99
    22. context bloat0.98
    23. intermediate results1.00
    24. Mc0.95
    25. awkward composition1.00
    26. giant tool surfaces1.00
    27. 2/28 40.84
    28. AlEngineer0.98
    29. KEYNOTE1.00
    30. EUROPE1.00
    31. PRESENTED BY1.00
    32. Google DeepMind1.00
    33. SUNIL PAI / Founder, Principal Systems Engineer0.99
    34. CLOUDFLARE1.00
  • 2:11 #8 done32 line(s)

    shot 8·sharpness 1566.2

    1. AIEngineer0.98
    2. Wor1.00
    3. EUROPE1.00
    4. SAFE1.00
    5. AlEngin0.95
    6. INTELLIGEN1.00
    7. EUROPE1.00
    8. \ari0.98
    9. Let the model write code instead0.98
    10. AlEngineer0.99
    11. EUROPE1.00
    12. 40.85
    13. Google DeepMind1.00
    14. PRESENTED BY1.00
    15. AlEngin0.96
    16. Tool calling1.00
    17. Code mode0.97
    18. EUROPE1.00
    19. × thousands of tool definitions0.97
    20. ✓ typed API0.96
    21. ×repeated back-and-forth0.98
    22. ✓ generated code0.95
    23. ✓ one execution0.96
    24. M1.00
    25. 3/28 +0.87
    26. AlEngineer0.98
    27. KEYNOTE1.00
    28. EUROPE1.00
    29. PRESENTED BY1.00
    30. Google DeepMind1.00
    31. SUNIL PAI / Founder, Principal Systems Engineer1.00
    32. CLOUDFLARE1.00
  • 2:22 #9 done10 line(s)

    shot 9·sharpness 513.1

    1. Let the model write code instead0.99
    2. 40.98
    3. Tool calling1.00
    4. Code mode0.98
    5. × thousands of tool definitions0.98
    6. ✓ typed API0.95
    7. × repeated back-and-forth0.98
    8. ✓generated code0.98
    9. ✓ one execution0.96
    10. ← 3/280.91
  • 2:36 #10 skipped

    shot 10·duplicate of #8

  • 2:58 #11 done18 line(s)

    shot 11·sharpness 1252.4

    1. JeDeepN0.93
    2. Code is the only tool that composes0.98
    3. Every other tool is atomic. You call it, get a result, feed it back. Code0.99
    4. composes - and once written, it executes deterministically.0.97
    5. of0.85
    6. hold state1.00
    7. branch1.00
    8. 10op0.95
    9. sequence1.00
    10. parallelize1.00
    11. ← 4/28 +0.84
    12. AlEngineer0.98
    13. KEYNOTE1.00
    14. EUROPE1.00
    15. PRESENTED BY1.00
    16. Google DeepMind1.00
    17. SUNIL PAI / Founder, Principal Systems Engineer0.98
    18. CLOUDFLARE1.00
  • 3:23 #12 done19 line(s)

    shot 12·sharpness 1259.8

    1. EorkOS0.89
    2. From 2,594 endpoints to two tools0.99
    3. 2,5941.00
    4. 400.50
    5. Cloudflare API endpolnts0.99
    6. search()1.00
    7. execute()1.00
    8. ~1,000 tokens0.96
    9. 99.9% reduction1.00
    10. with code mode1.00
    11. vs nave MCP0.99
    12. 5/28 +0.90
    13. AlEngineer0.98
    14. KEYNOTE1.00
    15. EUROPE1.00
    16. PRESENTED BY1.00
    17. Google DeepMind1.00
    18. SUNIL PAI / Founder, Principal Systems Engineer0.99
    19. CLOUDFLARE1.00
  • 3:50 #13 done19 line(s)

    shot 13·sharpness 1273.6

    1. orkOS0.99
    2. From 2,594 endpoints to two tools0.99
    3. 2,5941.00
    4. 40.78
    5. Cloudflare API endpolnts0.98
    6. search()1.00
    7. execute()1.00
    8. ~1,000 tokens0.97
    9. 99.9% reduction0.97
    10. with code mode0.93
    11. vs nave MCP0.97
    12. 5/28 +0.88
    13. AlEngineer0.98
    14. KEYNOTE1.00
    15. EUROPE1.00
    16. PRESENTED BY1.00
    17. Google DeepMind1.00
    18. SUNIL PAI / Founder, Principal Systems Engineer0.98
    19. CLOUDFLARE1.00
  • 3:56 #14 skipped

    shot 14·duplicate of #12

  • 4:31 #15 done35 line(s)

    shot 15·sharpness 1112.9

    1. WorkOS1.00
    2. Same task. One round trip.1.00
    3. "We're getting DDoSed - find the attacking IPs and blook them"0.95
    4. tool calling 8 round tripe0.97
    5. code node 1 execution0.98
    6. ↓ model + getZones()0.87
    7. model + getZoneAnalytics(zone)0.96
    8. const zone = await codemode.getZones()0.96
    9. then(zs => zs. find(z => z.nane =s= target)):0.90
    10. ainee0.97
    11. 8 model + getZoneAnalytics(zone)0.98
    12. model + identifyAttackPattern(analytics)0.99
    13. model + listFirwwallRules(zone)0.97
    14. model + createFirewallRule(zone, rule)0.95
    15. model + enableRateltmit(zone, config)0.97
    16. model verifyRule(zone, ruleId)0.97
    17. const attackIPs = analytics.requests0.94
    18. const analytics = await codemode0.96
    19. getZoneAnalytics(zone.1d);0.95
    20. filter(x => s.rate > threshold):0.89
    21. each call twtuzns to the model, te-serialized into context0.95
    22. avait Promise.all(attackIPs.map(ip a>0.95
    23. codemode.createfirewallRule(zone.id, {0.91
    24. filter: 'ip.src eq $(ip.address)'0.94
    25. action: "block*,0.95
    26. return (blocked: attackIPs.length ):0.96
    27. 6/28 +0.89
    28. AlEngineer0.98
    29. KEYNOTE1.00
    30. EUROPE1.00
    31. PRESENTED BY1.00
    32. Google DeepMind1.00
    33. # Braintrust0.96
    34. WorkOS1.00
    35. OpenAl0.95
  • 4:36 #16 done28 line(s)

    shot 16·sharpness 473.9

    1. Same task. One round trip.1.00
    2. "We're getting DDoSed - find the attacking IPs and block them*0.97
    3. tool calling 8 round trips1.00
    4. code mode 1 execution0.98
    5. 1 model + getZones()0.95
    6. const zone = await codemode.getZones()0.98
    7. 40.89
    8. 2 model + getZoneAnalytics(zone)0.98
    9. .then(zs => zs.find(z => z.name === target));0.97
    10. 3 model + identifyAttackPattern(analytics)1.00
    11. 4 model + listFirewallRules(zone)0.97
    12. 5 model → createFirewallRule(zone, rule)0.97
    13. const analytics = await codemode1.00
    14. .getZoneAnalytics(zone.id);0.99
    15. 6 model + enableRateLimit(zone, config)0.99
    16. const attackIPs = analytics.requests1.00
    17. 7 model + verifyRule(zone, ruleId)0.97
    18. .filter(r => r.rate > threshold);0.99
    19. 8 model + getZoneAnalytics(zone)0.96
    20. await Promise.all(attackIPs.map(1p =>0.99
    21. each call returns to the model, re-serialized into context1.00
    22. codemode.createFirewallRule(zone.id, (0.98
    23. action: "block*,0.97
    24. filter: 'ip.src eq $(ip.address)'0.98
    25. ));0.88
    26. return ( blocked: attackIPs.length );0.96
    27. OOOO0.83
    28. ← 6/28 ÷0.82
  • 5:14 #17 done41 line(s)

    shot 17·sharpness 1075.2

    1. AIEngineer0.95
    2. Brain1.00
    3. EUROPE1.00
    4. Tessl0.97
    5. AlEngin0.95
    6. EUROPE1.00
    7. Same task. One round trip.1.00
    8. Sno1.00
    9. "We 're getting DDoSed - find the attacking (Ps and block them"0.95
    10. AlEngineer0.99
    11. tool calling 8 round tripe0.96
    12. code mode 1 execution0.97
    13. EUROPE1.00
    14. I model + getZanes()0.88
    15. model * getZoneAnalytics(zone)0.96
    16. const zone = await codemode.getZones()0.98
    17. then(zs => zs. find(z => z.name =a= target)):0.90
    18. Google DeepMind1.00
    19. PRESENTED BY0.97
    20. AlEngin0.98
    21. EUROPE1.00
    22. 8 model + getZoneAnalytics(zone)0.97
    23. model + identifyAttackPattern(analytics)0.98
    24. model + listFirewallRules(zone)0.97
    25. model + createFirewallRule(zone, rule)0.98
    26. model enableRateltmit(zone, config)0.97
    27. model verify@ule(zone, ruleId)0.97
    28. const attackIPs - analytics.requests0.96
    29. const analytics = await codemode0.95
    30. getZoneAnalytics(zone.1d);0.97
    31. filter(x => r.rate > threshold):0.91
    32. await Promise.all(attackIPs.rap(ip =>0.94
    33. So0.89
    34. each call retuzns to the model, te-serialized into context0.95
    35. codemode.createfirewallRule(zone.id. {0.84
    36. filter: ip.src eq $(ip.address)'0.96
    37. action: "block*,0.96
    38. return (blocked: attackIPs.length ):0.97
    39. 6/28 +0.93
    40. Engineering the future of Al1.00
    41. AlEngineer0.98
  • 5:26 #18 skipped

    shot 18·duplicate of #17

  • 5:32 #19 done26 line(s)

    shot 19·sharpness 905.8

    1. AIEngineer0.99
    2. Brair1.00
    3. EUROPE1.00
    4. Cloudflare MCP1.00
    5. Tessl1.00
    6. AlEngii0.89
    7. Real Cloudflare API via remote MCP server0.94
    8. EUROP1.00
    9. cloudflare0.94
    10. MCP cllent rosot0.88
    11. Sno0.81
    12. AlEngineer1.00
    13. EUROPE1.00
    14. PRESENTED BY1.00
    15. AlEngir0.88
    16. Google DeepMind1.00
    17. EUROP1.00
    18. What's the traffio today?0.98
    19. Sc0.73
    20. Ask Cloudflare anything0.97
    21. mop.oloudflare.com/mop0.92
    22. OAuth -MOP cllent0.90
    23. 2.500+ endpoints0.99
    24. 7/28 +0.88
    25. Engineering the future of Al0.99
    26. AlEngineer0.98
  • 5:45 #20 done13 line(s)

    shot 20·sharpness 189.1

    1. Cloudflare MCP1.00
    2. Real Cloudflare API via remote MCP server0.97
    3. cloudflare1.00
    4. MCP client reset1.00
    5. Try the Cloudflare MCP server0.99
    6. What's the taffic today?0.92
    7. List mykers0.92
    8. Create a hello world Worker1.00
    9. List my Workers0.97
    10. Send1.00
    11. mcp.cloudflare.com/mcp1.00
    12. OAuth - MCP cllent 2,500+ endpoints0.96
    13. ← 7/280.90
  • 5:49 #21 done20 line(s)

    shot 21·sharpness 904.8

    1. C0.69
    2. mcp.cloudflare.com/authorize?response_type=code&client_0.99
    3. 0.99
    4. 0.67
    5. Work0.98
    6. Authorize Application1.00
    7. Grant access to Cloudflare API0.99
    8. a68fe653-218b-4fc0-9f3e-7108289dbc761.00
    9. ACCESS LEVEL1.00
    10. Read Only (Recommended) View resources without0.99
    11. making changes. Safest option for exploration.0.99
    12. Workers Full Access Full access to Workers, KV, D1,0.99
    13. R2, and related services with observability.1.00
    14. DNS Full Access Full access to DNS records and zone0.98
    15. settings.1.00
    16. Advanced: Select individual permissions0.98
    17. You'll be redirected to Cloudflare to sign in and confirm access.0.99
    18. Cancel1.00
    19. Continue0.98
    20. Privacy · Terms · Docs0.93
  • 5:55 #22 done11 line(s)

    shot 22·sharpness 85.6

    1. Support1.00
    2. 20.54
    3. 40.59
    4. Support1.00
    5. System Status0.99
    6. Careers1.00
    7. Terms of Use1.00
    8. Report Security Issues1.00
    9. Privacy Policy1.00
    10. Cookie Preferences1.00
    11. © 2026 Cloudflare, Inc.0.96
  • 5:56 #23 done16 line(s)

    shot 23·sharpness 1012.0

    1. Allow Cloudflare MCP Server access to1.00
    2. your Cloudflare account?0.99
    3. Signed in as [email protected]1.00
    4. You are a member of [email protected]'s Account0.98
    5. Allowing will authorize Cloudflare MCP Server to:0.98
    6. Read:1.00
    7. Cloudflare Access, Cloudflare Account, Cloudflare0.99
    8. Workers Al, Cloudflare DNS Analytics, Cloudflare DNS0.99
    9. records, Cloudflare DNS Settings, Cloudflare for0.99
    10. Logpush, Cloudflare Pages, User, Cloudflare Workers,1.00
    11. Cloudflare Workers Builds, Cloudflare Workers1.00
    12. Deployments, Cloudflare Workers Observability, and0.99
    13. Cloudflare Account Zone0.99
    14. See details0.99
    15. Deny1.00
    16. Allow1.00

Transcript

253 cues· 3,148 words· 16,626 chars

  1. 0:15 Our next presenter created PartyKit, the open-source tool for real-time multiplayer apps.
  2. 0:22 For his day job, he builds AI agents at Cloudflare.
  3. 0:27 Please join me in welcoming to the stage Sunil Pai.
  4. 0:58 20 minutes to the pub.
  5. 1:01 Hi, my name is Sunil Pai.
  6. 1:03 I work at CloudFlare.
  7. 1:05 I build agents over there for the agents SDK.
  8. 1:08 I'm trying very hard for this not to be a CloudFlare talk, but I think we are on the sponsor board, so that's nice.
  9. 1:16 This is a talk about something we call code mode.
  10. 1:19 I've been wearing the hat, and there's some prior art to it.
  11. 1:23 We don't claim to have invented it, but this is a talk about the implications of something new that we're discovering.
  12. 1:31 So you guys have built AI applications.
  13. 1:35 And tool calling gets weird at scale.
  14. 1:37 When it's just a couple of tools and very short runs, it's fine.
  15. 1:41 But the moment you start stuffing in your Google services, your JIRA, your Wiki, et cetera, and you're like hundreds of tools filling up the context, it starts breaking.
  16. 1:53 And the composition is weird, and there's this back and forth that you have to do with the model that's really slow.
  17. 2:04 We decided to take a different tact.
  18. 2:06 Instead of doing this JSON back and forth thing, we asked the model to generate code, usually JavaScript, that we could run against an environment.
  19. 2:19 And some of the benefits seem a little obvious to us.
  20. 2:23 With code you get a typed API, you can do type checking, there are syntax errors, models are trained on gigabytes if not terabytes of data already in the training set.
  21. 2:35 And instead of doing this back and forth, you could write code that executes it all in one run, just one execution.
  22. 2:43 So this is what I mean.
  23. 2:45 There are fundamental capabilities of code.
  24. 2:48 You're able to do looping.
  25. 2:50 You're able to hold state.
  26. 2:52 You're doing sequencing, parallelization, things that you would normally do with code anyway as an engineer.
  27. 3:01 So the first place we applied this, my colleague Matt Carey, who's actually going to be speaking about this a little more tomorrow, you should watch his talk.
  28. 3:09 The Cloudflare API surface is about 2,600 API endpoints.
  29. 3:14 If we exposed a tool for every single one of them, it's about 1.2 million tokens in your first call.
  30. 3:21 It just blows.
  31. 3:22 There's no way to create an MCP server for the entire Cloudflare API surface.
  32. 3:27 And he had a very clever idea where he exposes just two tool calls, search and execute.
  33. 3:35 Both of these endpoints accept code as an input, literally a string of code.
  34. 3:41 For search, the input to the function that you pass to it is the entire open API JSON spec.
  35. 3:48 And once it does that, execute
  36. 3:51 gives you a whole bunch of functions that you can call against the things that you call.
  37. 3:55 And it reduced that 1.2, 1.5 million token thing down to 1,000 tokens, kind of unheard of.
  38. 4:01 I think it's like 99.9% reduction.
  39. 4:05 This is going to be scary.
  40. 4:06 I actually have a live demo of this.
  41. 4:09 And demos don't usually do me well on stage.
  42. 4:13 But the point being that we were able to take a wide, super wide API surface and make it incredibly fast.
  43. 4:22 The prompt itself can be fairly generic.
  44. 4:27 So I should have kicked up the font size on this one.
  45. 4:29 The prompt here is, as a customer, you come in and say, we are getting DDoSed.
  46. 4:34 I want you to find every offending IP that's attacking us and block them.
  47. 4:41 In a moment of panic when your website is going down,
  48. 4:44 You don't have the time to do menu diving.
  49. 4:48 The Cloudflare dashboard is famously a little cumbersome to handle.
  50. 4:53 And you just want the thing done.

Chapters

  1. 0:00 Introduction and speaker background
  2. 1:16 What is "Code Mode"?
  3. 1:31 Limitations of traditional tool calling at scale
  4. 2:03 The shift to generating executable code
  5. 3:01 Scaling API usage at Cloudflare
  6. 4:05 Why code generation is more efficient
  7. 5:28 Live demonstration of the Mythical server
  8. 7:20 A new way of interacting with systems
  9. 9:09 Example: The Kenton canvas and tic-tac-toe anecdote
  10. 11:46 New software architecture: The "Harness"
  11. 13:28 Observability and security in sandboxed environments
  12. 14:15 Long-running workflows and generative UI
  13. 16:41 Future outlook: Building for the next generation of users
  14. 17:50 The resurgence of capability-based security
  15. 18:33 Conclusion and final thoughts

Open at this second