Back to browse
GitHub Repository

Production-grade action middleware for agentic AI. Policy engine, rollback, multi-agent trust, dashboard.

1 starsPython

Plyra-guard – intercepts AI agent tool calls before execution

by plyra·Feb 23, 2026·1 point·0 comments

AI Analysis

●●●BangerSolve My ProblemWizardry

Sub-2ms policy guard for agent tool calls—real safety layer where none existed.

Strengths
  • Framework-agnostic wrapping works across LangGraph, AutoGen, CrewAI, LangChain with minimal friction
  • Policy-as-code (YAML + Python) keeps guardrails reviewable and tested in CI
  • In-process evaluation with sub-2ms overhead eliminates network hop bottleneck
Weaknesses
  • AI agent safety is nascent—adoption depends heavily on whether agents actually ship to prod
  • LangGraph wrapping requires custom work around internal state tracking; not truly transparent
Category
Target Audience

AI engineers, LLM application developers deploying autonomous agents

Similar To

Guardrails.ai · Anthropic Managed Hook · Langsmith tool filtering

Post Description

AI agents are being deployed to take real-world actions — file operations, API calls, database writes. There's no standard safety layer between the LLM's decision and execution. plyra-guard is that layer. It intercepts every tool call before it runs, evaluates it against a policy, and blocks, logs, or escalates. @guard.wrap def delete_file(path: str) -> str: os.remove(path) delete_file("/tmp/report.txt") # ALLOW — 0.3ms delete_file("/etc/passwd") # BLOCK — "System config is off-limits" Key things:

Policy engine (YAML or Python rules: allow / block / escalate) Works with LangGraph, AutoGen, CrewAI, LangChain, plain Python Sub-2ms in-process evaluation, no network hop Every action logged, ships to OTEL or Datadog Built-in dashboard at localhost:8765

The LangGraph integration has a non-obvious wrinkle: ToolNode uses internal state tracking that breaks transparent tool wrapping. We ended up building a custom guarded_tool_node pattern — cleaner anyway. 217 tests. Python 3.11–3.13. Apache 2.0. Docs: https://plyraai.github.io/plyra-guard ───── HN TIPS:

Reply to every comment within 1 hour If someone critiques: "Good point — here's how we handle X" beats defending One genuine thread > ten upvotes for front page velocity

Similar Projects

AI/ML●●●Banger

DashClaw – Intercept AI agent actions before they execute

Control before execution beats observability after—HITL with 10-min replay window.

Solve My ProblemBig BrainSlick
ucsandman
112mo ago