Skip to content

Instantly share code, notes, and snippets.

View Kryscekk's full-sized avatar

Driss Amiroune Kryscekk

  • Fès, Maroc
View GitHub Profile
@Kryscekk
Kryscekk / 01_tool_registry.py
Created May 15, 2026 13:45
Triple defense in depth for production AI agents — companion snippets to the Dev.to article
"""
Snippet 1 — Bot tool registry (read-only by construction)
==========================================================
This is the entire surface area of what the Telegram bot's Claude
can do. Anything not in this list does not exist for that agent.
Notice what is NOT here:
- No `create_*` or `update_*` or `delete_*` tools on business data
- No `run_sql` or `execute_query`
@Kryscekk
Kryscekk / 01_tool_registry.py
Created May 15, 2026 13:40
Triple defense in depth for AI agents — tool registry, blocking state machine, provenance trail (anonymised, ~17k LOC origin)
"""
Snippet 1 — Bot tool registry (read-only by construction)
==========================================================
This is the entire surface area of what the Telegram bot's Claude
can do. Anything not in this list does not exist for that agent.
Notice what is NOT here:
- No `create_*` or `update_*` or `delete_*` tools on business data
- No `run_sql` or `execute_query`