read-only demo

Videos HsxQICTLF84

Building an ACP-Compatible Agent Live — Bennet Fenner, Zed

index_state ready data_status ok

AI Engineer· published 2026-07-08· 0:18:19· en-US· indexed 2026-08-11 04:26

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:34, 1 of 1 keyframes kept
  5. Shot 4, 0:34 to 1:05, 1 of 1 keyframes kept
  6. Shot 5, 1:05 to 1:35, 0 of 1 keyframes kept
  7. Shot 6, 1:35 to 2:02, 1 of 1 keyframes kept
  8. Shot 7, 2:02 to 2:27, 1 of 1 keyframes kept
  9. Shot 8, 2:27 to 2:52, 1 of 1 keyframes kept
  10. Shot 9, 2:52 to 3:17, 0 of 1 keyframes kept
  11. Shot 10, 3:17 to 3:43, 0 of 1 keyframes kept
  12. Shot 11, 3:43 to 4:08, 1 of 1 keyframes kept
  13. Shot 12, 4:08 to 4:33, 0 of 1 keyframes kept
  14. Shot 13, 4:33 to 4:58, 0 of 1 keyframes kept
  15. Shot 14, 4:58 to 5:23, 0 of 1 keyframes kept
  16. Shot 15, 5:23 to 5:48, 0 of 1 keyframes kept
  17. Shot 16, 5:48 to 6:13, 0 of 1 keyframes kept
  18. Shot 17, 6:13 to 6:39, 0 of 1 keyframes kept
  19. Shot 18, 6:39 to 7:04, 0 of 1 keyframes kept
  20. Shot 19, 7:04 to 7:11, 0 of 1 keyframes kept
  21. Shot 20, 7:11 to 7:40, 1 of 1 keyframes kept
  22. Shot 21, 7:40 to 8:08, 1 of 1 keyframes kept
  23. Shot 22, 8:08 to 8:37, 0 of 1 keyframes kept
  24. Shot 23, 8:37 to 8:42, 1 of 1 keyframes kept
  25. Shot 24, 8:42 to 8:55, 0 of 1 keyframes kept
  26. Shot 25, 8:55 to 9:21, 0 of 1 keyframes kept
  27. Shot 26, 9:21 to 9:47, 0 of 1 keyframes kept
  28. Shot 27, 9:47 to 10:12, 0 of 1 keyframes kept
  29. Shot 28, 10:12 to 10:38, 1 of 1 keyframes kept
  30. Shot 29, 10:38 to 11:03, 0 of 1 keyframes kept
  31. Shot 30, 11:03 to 11:29, 1 of 1 keyframes kept
  32. Shot 31, 11:29 to 11:55, 0 of 1 keyframes kept
  33. Shot 32, 11:55 to 12:20, 0 of 1 keyframes kept
  34. Shot 33, 12:20 to 12:46, 0 of 1 keyframes kept
  35. Shot 34, 12:46 to 13:11, 1 of 1 keyframes kept
  36. Shot 35, 13:11 to 13:38, 1 of 1 keyframes kept
  37. Shot 36, 13:38 to 14:05, 0 of 1 keyframes kept
  38. Shot 37, 14:05 to 14:32, 0 of 1 keyframes kept
  39. Shot 38, 14:32 to 14:59, 1 of 1 keyframes kept
  40. Shot 39, 14:59 to 15:02, 1 of 1 keyframes kept
  41. Shot 40, 15:02 to 15:28, 1 of 1 keyframes kept
  42. Shot 41, 15:28 to 15:54, 1 of 1 keyframes kept
  43. Shot 42, 15:54 to 16:20, 0 of 1 keyframes kept
  44. Shot 43, 16:20 to 16:46, 0 of 1 keyframes kept
  45. Shot 44, 16:46 to 16:54, 1 of 1 keyframes kept
  46. Shot 45, 16:54 to 17:29, 1 of 1 keyframes kept
  47. Shot 46, 17:29 to 18:04, 1 of 1 keyframes kept
  48. Shot 47, 18:04 to 18:18, 1 of 1 keyframes kept

48 shot(s).

keyframes kept every frame deduplicated

What was stored

cues
225
whisperx 225
chunks
32
from 225 cues
keyframes
24
kept of 48 captured
frames with text
24
1,310 lines read
chapters
0
from the source metadata
keyframe bytes
6.2 MB
word timings on 225 cues

Provenance

Each pipeline stage, its state and the model that produced it
stage state model started took
fetch done 2026-08-11 04:22 1m 16s
stt done 2026-08-11 04:23 17s
chunk done 2026-08-11 04:24 0s
text_embed done 2026-08-11 04:24 1s
keyframe done 2026-08-11 04:24 1m 35s
ocr done 2026-08-11 04:25 19s
frame_embed done 2026-08-11 04:25 4s

Frames, and what the machine read

  • 0:01 #0 done2 line(s)

    shot 0·sharpness 667.2

    1. AlEngineer0.97
    2. EUROPE1.00
  • 0:08 #1 done2 line(s)

    shot 1·sharpness 823.9

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

    shot 2·sharpness 938.7

    1. PLATINUM SPONSORS0.98
    2. # Braintrust0.96
    3. WorkOS OpenAI0.96
  • 0:24 #3 done5 line(s)

    shot 3·sharpness 275.8

    1. Building an ACP1.00
    2. compatible agent1.00
    3. Bennet Fenner - April 10, 20260.97
    4. AlEngineer0.98
    5. EUROPE1.00
  • 1:01 #4 done6 line(s)

    shot 4·sharpness 1492.5

    1. CCS0.67
    2. Agent/Client1.00
    3. AIE1.00
    4. 1.00
    5. Protocol1.00
    6. Engineering the future of Al0.98
  • 1:08 #5 skipped

    shot 5·duplicate of #4

  • 1:56 #6 done22 line(s)

    shot 6·sharpness 1181.7

    1. 0.53
    2. JETBRAINS1.00
    3. SIDEQUERY1.00
    4. In Progcess0.96
    5. marimo1.00
    6. 1.00
    7. 1.00
    8. AIE1.00
    9. 1.00
    10. 1.00
    11. 1.00
    12. 1.00
    13. 1.00
    14. Nneovim1.00
    15. a0.76
    16. Obsidian1.00
    17. ALZEN0.79
    18. DEDPOHAT0.89
    19. MEB BRONSER0.81
    20. 40+ Clients1.00
    21. AlEngineer0.98
    22. EUROPE1.00
  • 2:05 #7 done69 line(s)

    shot 7·sharpness 2508.5

    1. acp-demo main0.96
    2. acp-demo-agent - Current Worktree (main)0.95
    3. ACP: acp-demo-agent0.99
    4. agent.ts0.96
    5. helpers.ts1.00
    6. coding-agent.ts1.00
    7. + .0.73
    8. src/agent.ts1.00
    9. QIS0.60
    10. 11.00
    11. import * as acp from "@agentclientprotocol/sdk";1.00
    12. 21.00
    13. import { Readable, Writable } from "node:stream";1.00
    14. 31.00
    15. import { CodingAgent, ToolResult } from "./coding-agent.js";0.99
    16. 'ToolResult' is declared0.98
    17. 41.00
    18. import { extractText } from "./helpers.js";0.99
    19. 'extractText' is declared but its value is0.99
    20. 51.00
    21. 61.00
    22. class AcpAgent implements acp.Agent {1.00
    23. 71.00
    24. connection: acp.AgentSideConnection;1.00
    25. 81.00
    26. sessions: Map<acp.SessionId, CodingAgent>;1.00
    27. 1.00
    28. 1.00
    29. AIE1.00
    30. 1.00
    31. 1.00
    32. 101.00
    33. 91.00
    34. constructor(connection: acp.AgentSideConnection) {1.00
    35. 1.00
    36. 1.00
    37. 111.00
    38. this.connection = connection;1.00
    39. 1.00
    40. 1.00
    41. 1.00
    42. 121.00
    43. this.sessions = new Map();1.00
    44. 131.00
    45. 141.00
    46. 151.00
    47. async initialize(1.00
    48. 161.00
    49. _params: acp.InitializeRequest,1.00
    50. 171.00
    51. ): Promise<acp.InitializeResponse> {1.00
    52. 181.00
    53. throw new Error(message: "Not implemented");0.99
    54. 191.00
    55. 201.00
    56. 211.00
    57. async authenticate(1.00
    58. 221.00
    59. _params: acp.AuthenticateRequest,0.99
    60. Failed to Launch0.96
    61. Intemal error:0.91
    62. 231.00
    63. ): Promise<acp.AuthenticateResponse | void> {0.99
    64. "details": "Not implemented"0.91
    65. 241.00
    66. throw new Error(message: "Not implemented");0.99
    67. 5:1 Typo5crot 2= E= 8 P0.75
    68. AlEngineer0.95
    69. EUROPE1.00
  • 2:49 #8 done64 line(s)

    shot 8·sharpness 2286.4

    1. acp-demo main0.95
    2. acp-demo-agent Current Worktree (main)0.97
    3. ACP: acp-demo-agent0.98
    4. agent.ts1.00
    5. helpers.ts1.00
    6. coding-agent.ts1.00
    7. src/coding-agent.ts, const TOOLS, input_schema, properties0.95
    8. 431.00
    9. 441.00
    10. export type StopReason = "end_turn" | "max_tokens" | "cancelled";0.98
    11. 451.00
    12. 461.00
    13. export class CodingAgent {1.00
    14. 470.97
    15. private anthropic = new Anthropic();1.00
    16. 481.00
    17. private messages: Anthropic.MessageParam[] = [];0.99
    18. 491.00
    19. private abort: AbortController | null = null;0.99
    20. 501.00
    21. 1.00
    22. 1.00
    23. 511.00
    24. constructor(p1.00
    25. 1.00
    26. AIE1.00
    27. 1.00
    28. 521.00
    29. (parameter) userText: string0.99
    30. 1.00
    31. 1.00
    32. 531.00
    33. async prompt(userText: string): Promise<StopReason> {1.00
    34. 1.00
    35. 1.00
    36. 1.00
    37. 541.00
    38. this.abort = new AbortController();0.99
    39. 551.00
    40. this.messages.push(...items: { role: "user", content: userText });0.99
    41. 561.00
    42. 571.00
    43. try {1.00
    44. 581.00
    45. return await this.agentLoop();0.98
    46. 591.00
    47. } catch (err) {0.97
    48. 601.00
    49. if (this.abort.signal.aborted) return "cancelled";1.00
    50. 611.00
    51. throw err;0.99
    52. 621.00
    53. }finally {0.99
    54. 631.00
    55. this.abort = null;0.97
    56. 641.00
    57. }0.80
    58. Failed to Launch0.98
    59. Internal error: {0.94
    60. 651.00
    61. "details": "Not implemented"0.92
    62. 661.00
    63. 28:11 Type5cript 2+ E 80.81
    64. Engineering the future of Al1.00
  • 3:10 #9 skipped

    shot 9·duplicate of #8

  • 3:30 #10 skipped

    shot 10·duplicate of #8

  • 4:02 #11 done79 line(s)

    shot 11·sharpness 3082.5

    1. acp-demo main0.94
    2. acp-demo-agent Current Worktree (main)0.96
    3. ACP: acp-demo-agent0.98
    4. agent.ts1.00
    5. helpers.ts1.00
    6. coding-agent.ts0.98
    7. +0.80
    8. src/coding-agent.ts, class CodingAgent, private async handleToolCcall()0.96
    9. 0 IS0.58
    10. 1341.00
    11. private async handleReadFile(1.00
    12. 1351.00
    13. toolCallId: string,1.00
    14. 'toolCallId' is declared but its value is never read.0.99
    15. 1361.00
    16. input: Record<string, unknown>,0.99
    17. 1371.00
    18. ): Promise<ToolResult> {0.98
    19. 1381.00
    20. const path = input.path as string;1.00
    21. 1391.00
    22. 1401.00
    23. let isError : boolean = false;0.98
    24. 1411.00
    25. let content;1.00
    26. AIE1.00
    27. 1.00
    28. 0.99
    29. 1421.00
    30. 1431.00
    31. try {1.00
    32. const fs : { default: typeof import("fs/promises"); access(path: PathLike, mode?:0.99
    33. 1.00
    34. 1441.00
    35. content = await fs.readFile(path: path, options: "utf-8");1.00
    36. 1.00
    37. 1.00
    38. 1.00
    39. 1451.00
    40. } catch (err: unknown0.98
    41. function readFile(path: PathLike | FileHandle,0.98
    42. 1461.00
    43. isError = true;0.99
    44. options: ({0.98
    45. 1471.00
    46. content = err insta1.00
    47. encoding: BufferEncoding;1.00
    48. 1481.00
    49. }0.68
    50. flag?: OpenMode | undefined;0.98
    51. 1491.00
    52. } & EventEmitter<T extends EventMap<T> =0.98
    53. 1501.00
    54. return { isError: isE1.00
    55. DefaultEventMap>.Abortable) | BufferEncoding):0.98
    56. 1511.00
    57. }0.50
    58. Promise<string> (+2 overloads)1.00
    59. 1521.00
    60. 1531.00
    61. private async handleEdi Asynchronously reads the entire contents of a file.0.99
    62. 1541.00
    63. toolCallId: string,0.98
    64. @param path0.98
    65. read.1.00
    66. 1551.00
    67. input: Record<string,0.99
    68. A path to a file. If a URL is provided, it must use the file:0.99
    69. Failed to Launch0.96
    70. Interal error: {0.94
    71. 1561.00
    72. ): Promise<ToolResult>1.00
    73. protocol. If a FileHandle is provided, the underlying file will1.00
    74. "details": "Not implemented"0.92
    75. 1571.00
    76. const path = input.path as string;1.00
    77. 117:36 Type5crpt 8+8P は0.75
    78. AlEngineer0.96
    79. EUROPE1.00
  • 4:13 #12 skipped

    shot 12·duplicate of #11

  • 4:48 #13 skipped

    shot 13·duplicate of #8

  • 5:06 #14 skipped

    shot 14·duplicate of #8

  • 5:31 #15 skipped

    shot 15·duplicate of #8

  • 5:54 #16 skipped

    shot 16·duplicate of #7

  • 6:36 #17 skipped

    shot 17·duplicate of #8

  • 6:42 #18 skipped

    shot 18·duplicate of #8

  • 7:05 #19 skipped

    shot 19·duplicate of #8

  • 7:17 #20 done106 line(s)

    shot 20·sharpness 3036.6

    1. acp-demo main0.95
    2. Settings0.97
    3. ACP: acp-demo-agent0.98
    4. agent.ts0.98
    5. types,gen.d.ts0.91
    6. helpers.ts0.97
    7. coding-agent.ts1.00
    8. External Agents1.00
    9. All agents conected through the Agent Clie0.96
    10. acp-demo-agent0.96
    11. Extemal Agents0.97
    12. Claudo Agent0.91
    13. × Zed Agent0.94
    14. acp-demo-nt0.96
    15. pent0.65
    16. src/agent.ts- class AcpAgent- async cancel()0.96
    17. 391.00
    18. async prompt(params: acp.PromptRequest): Promise<acp.PromptResponse> {0.99
    19. 0 IS0.58
    20. claude-dev0.98
    21. Claude Agent0.97
    22. Codex CLI0.99
    23. codex-dev0.95
    24. claude-dev0.97
    25. 00.63
    26. 411.00
    27. 401.00
    28. const agent : CodingAgent | undefined = this.sessions.get(key: params.sessionId);0.98
    29. if (!agent) {0.92
    30. @ Codex CLI0.93
    31. @ Factory Droid0.93
    32. Cursor1.00
    33. 420.82
    34. throw new Error(message: 'Session not found: ${params.sessionId}');0.99
    35. codex-dev0.92
    36. Kimi CLI0.95
    37. GitHub Copilot0.99
    38. 431.00
    39. AIE1.00
    40. 1.00
    41. 1.00
    42. 1.00
    43. Kimi CLI0.91
    44. M Mistral Vibe0.97
    45. Cursor1.00
    46. GitHub Copilot0.95
    47. @ Factory Droid0.95
    48. M Mistral Vibe0.98
    49. OpenCode0.99
    50. + Add More Agents0.97
    51. 00.96
    52. 00.96
    53. 00.95
    54. 441.00
    55. 451.00
    56. 461.00
    57. 471.00
    58. 481.00
    59. const stopReason : StopReason = await agent.prompt(userText: text);1.00
    60. return {0.99
    61. };0.80
    62. const text : string = extractText(prompt: params.prompt);0.99
    63. stopReason,1.00
    64. 1.00
    65. 1.00
    66. 1.00
    67. OpenCode0.95
    68. 00.99
    69. 491.00
    70. 501.00
    71. Model Context Protocol (MCP) Servers1.00
    72. + Add Server0.93
    73. 511.00
    74. async cancel(params: acp.CancelNotification): Promise<void> {1.00
    75. All MCP servers connected directly or via a Zed extension.0.99
    76. Postgres0.94
    77. 521.00
    78. const agent : CodingAgent | undefined = this.sessions.get(key: params.sessionId);0.99
    79. C. Context7 3 2 sools0.88
    80. 531.00
    81. if (!agent) {0.95
    82. 541.00
    83. throw new Error(message: 'Session not found: ${params.sessionId}');0.99
    84. LLM Providers1.00
    85. + Add Provider0.93
    86. 551.00
    87. Add at least one provider to use Al-powered features with Zed's native agent.1.00
    88. Zed Prs0.86
    89. 561.00
    90. 571.00
    91. agent.cancel();1.00
    92. Amazon Bedrock0.97
    93. 581.00
    94. A Anthropic0.91
    95. 591.00
    96. GitHub Copilot Chat0.96
    97. 601.00
    98. const input : WritableStream<any> = Writable.toWeb(streamWritable: process.stdout);0.99
    99. DeepSeek0.92
    100. 611.00
    101. const output = Readable.toWeb(streamReadable: process.stdin) as ReadableStream<Uint8Arra0.99
    102. 620.92
    103. conct etrosm : Strosm = scn nd lconStrosmloutnut: innut innut: outnut).0.92
    104. 00.60
    105. 56:20 Type5crot 2+ E 8 P0.75
    106. Engineering the future of Al1.00
  • 8:05 #21 done26 line(s)

    shot 21·sharpness 1775.8

    1. acp-demo main0.92
    2. Hello0.92
    3. ☐ ACP: acp-demo-agent0.96
    4. agent.ts1.00
    5. types.gen.d.ts0.97
    6. helpers.ts1.00
    7. coding-agent.ts0.99
    8. Hello0.96
    9. 1.00
    10. AIE1.00
    11. 1.00
    12. 1.00
    13. 1.00
    14. 1.00
    15. 1.00
    16. ↑ session/new0.97
    17. { "cwd": "/Users/bebo/workspace/acp-demo", "mcpServers": [{ "name": "mcp-server-context7", "command": "/usr/local/bin,0.99
    18. ↓session/ne0.96
    19. { "sessionId": "65bb6bf5-739e-4028-9fc3-7774b7b5f8f5"}0.98
    20. ↑ session/prompt0.97
    21. Message acp-deno-agent - φ to snctude context0.94
    22. { "sessionId": "65bb6bf5-739e-4028-9fc3-7774b7b5f8f5", "prompt": [{ "type": "text", "text": "Hello" }] }0.98
    23. ↓ session/prompt0.97
    24. { "stopReason": "end_turn"}0.98
    25. Braintrust1.00
    26. WorkOS OpenAl0.92
  • 8:25 #22 skipped

    shot 22·duplicate of #11

  • 8:38 #23 done77 line(s)

    shot 23·sharpness 2964.3

    1. acp-demo main0.96
    2. Hello0.91
    3. ACP: acp-demo-agent0.99
    4. agent.ts0.96
    5. Definitions for CodingAg...0.96
    6. types,gen.d.ts0.91
    7. helpers.ts0.98
    8. coding-agent.ts0.99
    9. + .0.71
    10. Hello0.99
    11. src/agent.ts- class AcpAgent- async newSession( ), const agent0.96
    12. 0 IS0.57
    13. 151.00
    14. async initialize(0.99
    15. 161.00
    16. _params: acp. Init: Cancels ongoing operations for a session.0.99
    17. 171.00
    18. 181.00
    19. ): Promise<acp.Init:1.00
    20. return {1.00
    21. This is a notification sent by the client to cancel an ongoing prompt turn.0.99
    22. 191.00
    23. protocolVersion1.00
    24. Upon receiving this notification, the Agent SHOULD:0.99
    25. 201.00
    26. }i0.64
    27. • Stop all language model requests as soon as possible0.99
    28. 211.00
    29. • Abort all tool call invocations in progress0.98
    30. 1.00
    31. 221.00
    32. • Send any pending session/update notifications0.98
    33. AIE1.00
    34. 1.00
    35. 231.00
    36. async authenticate(1.00
    37. • Respond to the original session/prompt request with0.99
    38. 1.00
    39. 1.00
    40. 1.00
    41. 1.00
    42. 241.00
    43. 251.00
    44. 261.00
    45. ): Promise<acp. Auth See protocol docs: Cancellation0.97
    46. _params: acp.Authe0.98
    47. cancel1.00
    48. StopReason::Cancelled1.00
    49. 271.00
    50. 281.00
    51. async newSession(1.00
    52. params: acp.NewSes0.99
    53. connection1.00
    54. authenticate1.00
    55. 291.00
    56. ): Promise<acp.NewSe-0.98
    57. 301.00
    58. const id : '${str: Z const agent = new CodingAgent(params.cwd, this.connection0.98
    59. 311.00
    60. const agent = new CodingAgent(cwd: params.cwd, connection: this.c;0.99
    61. Expected 3 arg0.97
    62. 321.00
    63. this.sessions.set(key: id, value: agent);1.00
    64. 331.00
    65. 341.00
    66. return {1.00
    67. 351.00
    68. sessionId: id,1.00
    69. Message acp-demo~agent - to inctude context0.96
    70. 361.00
    71. }i0.65
    72. 371.00
    73. 381.00
    74. 2 Property 'c' does not exist on type AcpAgont0.93
    75. 31:53 Typešcrpt 24P0.77
    76. AlEngineer0.97
    77. EUROPE1.00

Transcript

225 cues· 2,586 words· 13,218 chars

  1. 0:14 I'm Bennett.
  2. 0:15 I work at Zed, and we built an AI code editor, all written in Rust.
  3. 0:19 And last year was kind of, as you probably all know, the rise of the AI coding agent terminal user interfaces with every major model provider, like building Cloud Code, Codex, Gemini, CLI, and so on.
  4. 0:34 And so at Zed, we asked ourselves, how can we let users bring their agent of choice to our tool and enjoy a nice interface that is unified across all of them?
  5. 0:47 And so that's why we decided we need some type of protocol called
  6. 0:52 agent-client protocol, which is similar to MCP or LSP.
  7. 0:58 It's a JSON RPC-based protocol.
  8. 1:00 And the idea is basically that agents and clients can talk to each other through a unified interface.
  9. 1:06 And yeah, online, it's open source.
  10. 1:12 You can contribute if you want.
  11. 1:14 At this point, we have a wide variety of agents already supporting this, either by an adapter that translates the agent's native language to the ACP one.
  12. 1:27 And then we have, for example, OpenCode and Cursor having ACP mode built into their CLI agents.
  13. 1:36 And we also have a bunch of clients at this point, up to 40, that implement this, including Open Claw, for example.
  14. 1:43 Open Claw itself is a client and a server, actually, like a client and an agent.
  15. 1:49 And JetBrains and Obsidian and other people are supporting this.
  16. 1:54 Great.
  17. 1:54 So I'm going to do a live coding session.
  18. 1:59 Let's see how well that goes.
  19. 2:03 Right.
  20. 2:05 Basically, we have some pre-existing code.
  21. 2:07 So this is Zed.
  22. 2:09 Here I have some TypeScript.
  23. 2:10 Also, bear with me.
  24. 2:11 I'm a Rust developer.
  25. 2:12 I have basically zero clue about TypeScript.
  26. 2:15 So if you see anything that you don't do in TypeScript, tell me afterwards.
  27. 2:21 But yeah, here's a very minimal coding agent that just doesn't support ACP, but it's kind of the bare minimum you need to build a coding agent.
  28. 2:30 All it has is really like two tools, one to read a file and one to edit an existing file.
  29. 2:37 Yeah, this is like pretty basic.
  30. 2:38 It provides, the model has to provide a path and it has to provide an old text that is like then just replaced with new text and that's kind of everything.
  31. 2:47 And then we have, in this case like I'm using Anthropic, there's a way to prompt the agent
  32. 2:55 Yeah, the user can prompt the agent, which is the function that we were going to call here.
  33. 3:01 And then we enter the agent loop.
  34. 3:02 And this is kind of like the way all agents basically work is the model APIs are stateless.
  35. 3:09 So you just attach some conversation up to this point.
  36. 3:12 You call the endpoint.
  37. 3:13 In this case, it's like the anthropic API.
  38. 3:16 And then we get a message from the model.
  39. 3:20 And either it can be an end turn.
  40. 3:21 That means the model decided to just output some text and do nothing.
  41. 3:27 Or it can call a tool.
  42. 3:29 And in this case, it would be like a read or a write tool call.
  43. 3:33 And then in the case of a tool call, we run, for example, the edit file tool call locally, collect the result, and then send it up to the model again.
  44. 3:42 That's where there's this loop.
  45. 3:45 And then we call the API again with the conversation up to that point.
  46. 3:49 And that's kind of everything.
  47. 3:51 And then we have this handle tool call function here, which handles read and write tool calls, which does what you expect.
  48. 4:00 We get the path, we read it from the file system, and we return some result.
  49. 4:08 So now the question is, how do we make this thing ACP compatible?
  50. 4:11 And hopefully, we can do it in 10 minutes.

Open at this second