learning-it by example

Back to the video

Delegated Authority: Let an AI Agent Act for a User, Safely

I tried eight ways to use an agent's token, and only the allowed one worked.

Video #233 ยท Enterprise architecture and AI agents

Steps in the video

  1. 0:00 Eight ways to use a token, one worked
  2. 0:27 The idea
  3. 1:04 Setup
  4. 1:31 A signed token
  5. 1:59 The authority
  6. 2:34 The service
  7. 3:45 What this does not show
  8. 4:25 Mistakes to avoid
  9. 4:55 My take and next steps
  10. 5:28 Recap

Files

  • authority.py (23 lines)
  • compare.py (35 lines)
  • resource.py (19 lines)
  • tokens.py (26 lines)

Download the code (zip)

Tested with

Python 3.12.15

What this does not show

One authority, one user and eight cases I chose, with a made-up key and hand-made signing. The exchange trusts the agent's name and grants any scope the user has, for any service. No revocation, no user consent step, no real logins. Use a reviewed library in production.

Sources

Learning IT by Example.