YouTube2Text

AI Agent Architecture: Where Does Your Agent Actually Run? — Transcript

by IBM Technology · 887 words · 66 segments · language en · Watch on YouTube

Full transcript

  1. 0:00The question where does your AI agent actually run encompasses four different questions
  2. 0:05because your agent is not one workload, it's four.
  3. 0:10We have the reasoning workload, which is inference.
  4. 0:17Then we have the agent itself, which is lightweight code that loops.
  5. 0:26And then we have the action plane, which is where all of our tool calls are occurring.
  6. 0:31And then finally we have state,
  7. 0:36so that we can actually keep track of the actions that the agent has taken.
  8. 0:40So all of these have radically different resource, security and failure profiles,
  9. 0:45which means on a cluster there are four different workloads, with four different scaling signals.
  10. 0:51Now this one is for the production engineers.
  11. 0:53And by the end of this when someone says that they've deployed an agent, hopefully you can ask about these four different aspects,
  12. 0:59and know what a good answer looks like. The reasoning plane is model inference.
  13. 1:10These are the forward passes through the transformer that produce output tokens.
  14. 1:15It's compute heavy, and its GPU, memory, and compute bound.
  15. 1:34You can check out our video on kV cache if you'd like to learn more about this.
  16. 1:38But our reasoning plane runs wherever model weights are loaded.
  17. 1:43This could be an API provider's data center, available in pod on your cluster, an LLaMA process on your laptop.
  18. 1:50And on the cluster, this is a vLLM or llm-d deployment,
  19. 1:53pinned to GPU nodes. Next, let's talk about the agent loop itself.
  20. 1:58This is the code that assembles a prompt, calls a model, parses the response,
  21. 2:05decides whether a tool was requested, dispatches it, and appends the results.
  22. 2:12Loop loop loop.
  23. 2:13And this is our actual agent. Now the overall shape of this code, is the same regardless of framework.
  24. 2:22t's a wall loop, it calls the model with the message history, and if the response asks for a tool, run it and append the result.
  25. 2:30If not, you're done.
  26. 2:32Now different frameworks will add better state management, persistence, human in the loop gates,
  27. 2:39structured handoffs between multiple loops. But the skeleton here is going to very much remain the same.
  28. 2:45Now it's lightweight code,
  29. 2:53whose latency actually comes from waiting on network responses.
  30. 2:57So on the cluster, a stateless deployment on cheap CPU nodes scaled horizontally with HPA costing almost nothing.
  31. 3:07Never co-schedule it on your GPU nodes, that's paying GPU prices for a while loop that's asleep 99% of the time.
  32. 3:15Okay, now let's talk about the part of this architecture that allows the system to take actions. This is where we are going to make tool calls.
  33. 3:28Now this is going to be the code that actually touches the world. So HTTP calls,
  34. 3:34database queries, shell commands, file rights, browser automation.
  35. 3:40And it is the security crucial portion of this architecture.
  36. 3:46Because this is where a model's output has side effects and our where question that we started this series with,
  37. 3:53is really a trust question. It's what can reach, what can this code reach, and with whose credentials?
  38. 4:01Now this is what we sandbox.
  39. 4:04Ephemeral, short lived pods, or jobs, or quarter containers, and a default deny network policy, with explicit egress allow list,
  40. 4:16and a service account scoped to exactly the tools task needs.
  41. 4:20The tool gets its own identity, never the loop's credentials.
  42. 4:24An agent that can't remember anything is not useful.
  43. 4:27Our system here needs to be able to remember conversations, task status, checkpoints,
  44. 4:33and locally this lives in a Python list in process memory.
  45. 4:38Now the loop is going to hold the entire state in messages.
  46. 4:43And in production, whether that state lives inside this agent process or is externalized here,
  47. 4:51is the single biggest architectural fork.
  48. 4:55Now, on Kubernetes, this is the difference between an agent, that's a stateful set clinging to a PVC,
  49. 5:02and an agent thats a stateless deployment, checkpointing to Postgres or Redis.
  50. 5:06Now externalize the state, and your pods can crash, get rescheduled mid-task,
  51. 5:12scale down to zero overnight and resume from the last checkpoint, like nothing happened.
  52. 5:18But if you keep the state in the process, and every pod restart, equals amnesia.
  53. 5:25So an agent whose memory is fickle is not really tenable in production.
  54. 5:30Okay, a couple deployment tips before I leave, y'all. Scale each of these planes on their own signal.
  55. 5:38KV cache pressure, request concurrency, job queue depth, and storage. One autoscaler for all four is going to be wrong for at least three of them.
  56. 5:48Next, consider a checkpoint before every tool call,
  57. 5:53not just after, and make tool calls impotent because a resumed loop may retry the one it died on.
  58. 6:02Next, and this one's very important, give the action plane its own credentials, with the shortest lifetime you can tolerate.
  59. 6:09The model's output should never inherit the agent's keys.
  60. 6:14Now, finally, keep this loop boring. The more logic you push into that loop container, the harder it is to make it stateless and disposable.
  61. 6:21Next time someone says we've deployed an agent, you've now got your four lines of questioning. Where do the weights live?
  62. 6:32Where does the loop run?
  63. 6:34What can the tools touch and as whom?
  64. 6:37And where does state survive after restart?
  65. 6:40Four planes, four workloads, four answers. And now you know what good ones look like.
  66. 6:46Thanks so much for watching.

About this transcript

This page contains the full transcript of AI Agent Architecture: Where Does Your Agent Actually Run? by IBM Technology, generated from the public captions YouTube serves with the video. The transcript has 887 words across 66 segments, with the original timestamps preserved so you can click any line to jump to that moment in the embedded player.

What you can do with it

Use the transcript to take notes, quote the speaker, build a study guide, generate a summary with ChatGPT or Claude via the YouTube Summary tool, or export it as a timed subtitle file with YouTube to SRT. You can also re-open it in the transcriber to choose a caption track available on the video.

Free YouTube transcript tool

YouTube2Text is a free YouTube transcript generator — no signup, no daily limit. Paste any YouTube link and get the full transcript instantly, with timestamps, click-to-jump, caption language selection, AI prompts for ChatGPT, Claude, and Gemini, and exports to TXT, SRT, VTT, or Markdown.