Skip to content

feat(patterns): add trust middleware guardrails recipe#711

Open
sriram7737 wants to merge 5 commits into
anthropics:mainfrom
sriram7737:sriram/trust-middleware-guardrails
Open

feat(patterns): add trust middleware guardrails recipe#711
sriram7737 wants to merge 5 commits into
anthropics:mainfrom
sriram7737:sriram/trust-middleware-guardrails

Conversation

@sriram7737

Copy link
Copy Markdown

What this adds

A recipe demonstrating a guardrails-as-code pattern for Claude agent loops: validating tool calls, enforcing policy deterministically, routing consequential actions to HITL, and emitting an inspectable trace before execution.

Why

Agent loops that call real tools need a deterministic safety layer distinct from the model. This notebook shows the pattern end-to-end, using the open-source Pramagent SDK as the implementation.

Validation

  • Added entry to registry.yaml.
  • Added sriram7737 to authors.yaml in alphabetical order.
  • Notebook JSON validates with python -m json.tool.
  • Ran .github/scripts/verify_registry.py with PYTHONIOENCODING=utf-8: the new author, registry author, and notebook path pass; the script then fails on an unrelated existing Billing category in the current registry.
  • No API keys or error output committed.

@sriram7737 sriram7737 marked this pull request as ready for review June 16, 2026 18:59
@sajjadfarooq768-ai

Copy link
Copy Markdown

I have not money

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants