learning-it by example

Back to the video

Build a Minimal AI Agent Platform: Gateway, Registry, Audit

I built an agent platform in 100 lines, and switched an agent off by changing one flag in the registry.

Video #249 ยท Enterprise architecture and AI agents

Steps in the video

  1. 0:00 An agent platform in a hundred lines, and a switch that turns an agent off
  2. 0:31 The idea
  3. 1:10 Setup
  4. 1:31 The registry
  5. 1:54 The gateway
  6. 2:28 The audit log
  7. 2:49 Nine calls, then a switch
  8. 3:56 What this does not show
  9. 4:35 Mistakes to avoid
  10. 5:01 My take and next steps
  11. 5:35 Recap

Files

  • audit.py (21 lines)
  • compare.py (28 lines)
  • core.py (29 lines)
  • registry.py (25 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

A teaching platform in one process and in memory: no real caller identity, no database, a budget counter that never resets, a hash chain that cannot see changes to its last line, and nothing here stops an agent going round the gateway.

Sources

Learning IT by Example.