frontpage.
newsnewestaskshowjobs

Open Source @Github

fp.

Open in hackernews

Show HN: AgentShield SDK – Runtime security for agentic AI applications

https://pypi.org/project/agentshield-sdk/
2•iamsanjayk•1y ago
Hi HN,

We built AgentShield, a Python SDK and CLI to add a security checkpoint for AI agents before they perform potentially risky actions like external API calls or executing generated code.

Problem: Agents calling arbitrary URLs or running unchecked code can lead to data leaks, SSRF, system damage, etc.

Solution: AgentShield intercepts these actions:

- guarded_get(url=...): Checks URL against policies (block internal IPs, HTTP, etc.) before making the request.

- safe_execute(code_snippet=...): Checks code for risky patterns (os import, eval, file access, etc.) before execution.

It works via a simple API call to evaluate the action against configurable security policies. It includes default policies for common risks.

Get Started:

Install: pip install agentshield-sdk

Get API Key (CLI): agentshield keys create

Use in Python: from agentshield_sdk import AgentShield # shield = AgentShield(api_key=...) # await shield.guarded_get(url=...) # await shield.safe_execute(code_snippet=...)

Full details, documentation, and the complete README are at <https://pypi.org/project/agentshield-sdk/>

We built this because securing agent interactions felt crucial as they become more capable. It's still early days, and we'd love to get your feedback on the approach, usability, and policies.

Comments

subhampramanik•1y ago
Looks interesting -- Does it work like a wrapper on top of OpenAI specs? Like, can we just replace the OpenAI package with this, and it's fully integrated?
iamsanjayk•1y ago
Hey, thanks for asking! Good question.

AgentShield isn't a wrapper around the OpenAI package, so you wouldn't replace openai with it. Think of AgentShield as a separate safety check you call just before your agent actually tries to run a specific risky action.

So, you'd still use the openai library as normal to get your response (like a URL to call or code to run). Then, before you actually use httpx/requests to call that URL, or exec() to run the code, you'd quickly check it with shield.guarded_get(the_url) or shield.safe_execute(the_code).

Currently, It focuses on securing the action itself (the URL, the code snippet) rather than wrapping the LLM call that generated it.

AI Bust Risks Ripple Effects from Growth to Credit, BIS Says

https://www.bloomberg.com/news/articles/2026-06-28/ai-bust-risks-ripple-effects-from-growth-to-cr...
1•thm•2m ago•0 comments

My Favorite Keyboards

https://fabiensanglard.net/keyboards/index.html
2•tmach32•5m ago•0 comments

Lore – give your coding agent the decisions your team made

https://github.com/itsthelore/rac-core
2•tcballard•6m ago•0 comments

Console.log Is Lying to You: debugging traps and tricks

https://blog.gaborkoos.com/posts/2026-06-28-Your-Console-Is-Lying-to_You/
2•theanonymousone•7m ago•0 comments

Teaching an LLM to Speak Vestaboard Note: Building Vestaboard AI

https://corti.com/teaching-an-llm-to-speak-vestaboard-note-building-vestaboard-ai/
1•TechPreacher•17m ago•0 comments

kivo: A lightweight desktop teleprompter

https://github.com/rajtilakjee/kivo
1•ilreb•17m ago•0 comments

Extracting sound effects from a Switch game

https://blog.alexbeals.com/posts/extracting-sound-effects-from-a-switch-game
1•dado3212•18m ago•0 comments

Herdr: Agent multiplexer that lives in your terminal

https://github.com/ogulcancelik/herdr
2•mzehrer•18m ago•0 comments

Thai family mourns teen girl found dead in suitcase as Australian arrested

https://www.reuters.com/world/asia-pacific/thai-family-mourns-teen-girl-found-dead-suitcase-austr...
1•petethomas•19m ago•0 comments

Optimizing LLVM's Bump Allocator

https://maskray.me/blog/2026-06-28-optimizing-llvm-bump-allocator
1•jandeboevrie•21m ago•0 comments

Basecoat 1.0

https://github.com/hunvreus/basecoat/releases/tag/1.0.0
3•dabinat•21m ago•0 comments

Trillion-Dollar Borrowing Binge Lifting the Stock Market to Risky Heights

https://www.wsj.com/finance/stocks/the-trillion-dollar-borrowing-binge-lifting-the-stock-market-t...
1•petethomas•26m ago•0 comments

Australia investigating five social media giants for not enforcing ban on kids

https://www.theregister.com/public-sector/2026/06/29/australia-investigating-five-social-media-gi...
3•defrost•30m ago•0 comments

Amazon seller reveals shadow bribery market within Amazon

https://www.mercurynews.com/2026/06/24/amazon-seller-reveals-rare-glimpse-of-shadow-bribery-market/
1•Gaishan•30m ago•0 comments

'Superallowed' alpha decay seen for the first time

https://physicsworld.com/a/superallowed-alpha-decay-seen-for-the-first-time/
2•visha1v•32m ago•0 comments

New model of ocean waves sheds light on the spread of microplastic pollution

https://physicsworld.com/a/new-model-of-ocean-waves-sheds-fresh-light-on-the-spread-of-microplast...
2•visha1v•33m ago•0 comments

PCB-QA: Evaluating LLMs over the First PCB Design Question-Answer Dataset

https://arxiv.org/abs/2606.23704
2•teleforce•41m ago•0 comments

The 1000-mile handshake from Aden to Mangalore

https://drbhaskardasgupta1.substack.com/p/the-1000-mile-handshake
2•trojanalert•41m ago•0 comments

From Prompts to Loops: Building Autonomous Coding Agents

https://animeshgaitonde.medium.com/from-prompts-to-loops-building-autonomous-coding-agents-6135bf...
2•animesh371g•46m ago•0 comments

"Warming Hole" Heat Content Variations Are Caused by Ocean Heat Transport

https://agupubs.onlinelibrary.wiley.com/doi/full/10.1029/2025GL118383
5•baxtr•53m ago•0 comments

392-Year-Old Bonsai Tree That Survived the Hiroshima Atomic Blast (2024)

https://www.openculture.com/2024/05/this-392-year-old-bonsai-tree-survived-the-hiroshima-atomic-b...
4•vednig•57m ago•0 comments

'Down from Londoners' Are Transforming England's Seaside Towns

https://www.bloomberg.com/news/articles/2026-06-26/londoners-escape-to-england-s-seaside-raises-h...
2•petethomas•1h ago•0 comments

We Built Osmium for Scale

https://osmium.chat/blog/how-we-built-osmium-for-scale/
3•ateesdalejr•1h ago•0 comments

Remember SCANTRON? How did that work? [video]

https://www.youtube.com/watch?v=x2RvPFvR-CI
4•fortran77•1h ago•0 comments

My New Life with the Palantir Chore Coat

https://www.theatlantic.com/technology/2026/06/palantir-chore-coat/687686/
3•colinprince•1h ago•0 comments

PCB-Bench: Benchmarking LLMs for PCB Placement and Routing (ICLR 2026)

https://github.com/digailab/PCB-Bench
3•teleforce•1h ago•0 comments

Age verification is just a precursor to automated attribution of speech

https://nonogra.ph/age-verification-is-just-a-precursor-to-attribution-of-speech-06-29-2026
128•arkhiver•1h ago•28 comments

MFM: PINN based Motion Foundation Model

https://huggingface.co/JuSeongvin/pinn
2•urgentINC•1h ago•0 comments

Breaking the Tokenizer Barrier: On-Policy Distillation Across Model Families

https://arxiv.org/abs/2606.09456
2•Jimmc414•1h ago•0 comments

What Should We Optimize Away?

https://www.autodidacts.io/holistic-optimization/
3•Tomte•1h ago•0 comments