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.

Amazon Data Centers Hit in Iran Strikes, Satellite Images Show

https://www.bloomberg.com/news/articles/2026-07-28/amazon-data-centers-hit-in-iran-strikes-satell...
1•nickthegreek•1m ago•0 comments

Startup's security policies are concerning

https://www.svix.com/blog/security-at-svix/
1•tasn•1m ago•0 comments

Pacing the Frontier

https://www.pacingthefrontier.com/
1•reducesuffering•1m ago•0 comments

Show HN: Orb – Self-hosted AI assistant that messages you first

https://github.com/getorb/Orb-Backend
1•ninjahawk1•2m ago•0 comments

AI-found bugs aren't proving any easier to exploit despite the hype

https://www.theregister.com/security/2026/07/28/ai-found-bugs-arent-proving-any-easier-to-exploit...
1•sbulaev•3m ago•0 comments

New airliner sets record flying 24 hrs nonstop from Australia to France

https://arstechnica.com/gadgets/2026/07/new-airliner-sets-record-flying-24-hrs-nonstop-from-austr...
1•Liriel•3m ago•0 comments

Things I Won't Work With: Azidoazide Azides, More or Less (2013)

https://www.science.org/content/blog-post/things-i-won-t-work-azidoazide-azides-more-or-less
1•downbad_•4m ago•0 comments

ICE Arrests Surge at Airports, Opening New Front in Deportation Drive

https://www.nytimes.com/2026/07/28/us/ice-arrests-airports-visa-overstay.html
2•mizzao•4m ago•1 comments

Online identity is owned by your email provider (2019)

https://www.ctrl.blog/entry/email-identity-provider.html
1•downbad_•5m ago•0 comments

War machines can run amok with AI in control

https://www.theregister.com/ai-and-ml/2026/07/28/war-machines-can-run-amok-with-ai-in-control/527...
3•Bender•5m ago•0 comments

DEF CON bans Meta-style 'pervert glasses'

https://www.theregister.com/security/2026/07/28/def-con-bans-meta-style-pervert-glasses/5279763
3•Bender•6m ago•0 comments

`bun init` automatically creates a Claude.md file by default

https://bun.com/docs/runtime/templating/init
1•achristmascarl•8m ago•0 comments

Golden hour is almost never an hour

https://lkforge.com/blog/how-long-is-golden-hour/
1•lucianBKR•9m ago•0 comments

Shopify CEO appears to endorse giving more votes to wealthy Canadians

https://www.cbc.ca/news/canada/shopify-ceo-appears-to-endorse-giving-more-votes-to-wealthy-canadi...
1•Pxtl•10m ago•0 comments

Damn This landing page is fire EvilCharts

https://evilcharts.com
1•gurbinder•10m ago•0 comments

The Worst Way to Regulate AI

https://www.theatlantic.com/ideas/2026/07/white-house-ai-regulation/688088/
1•acmnrs•11m ago•0 comments

Several US schools to install pepper-spraying drones as school shooting response

https://www.theguardian.com/education/2026/jul/28/school-shootings-pepper-spray-drones
2•bookofjoe•13m ago•0 comments

An Interview with the Man Charged for Allegedly Wiping His GrapheneOS Phone

https://www.404media.co/the-government-hopes-to-set-a-precedent-an-interview-with-the-man-charged...
2•tomatopepper•15m ago•0 comments

Antirez - streaming the Kimi K3 official hugging face weights on M5 max 128gb

https://twitter.com/antirez/status/2082136334160818528
3•mihau•15m ago•1 comments

Anime.js: Simple, Powerful, and Performant Animation Library

https://animejs.com/
1•chabad360•15m ago•0 comments

Finding a 1 click account takeover (and webcam access) in Granola

https://www.strix.ai/blog/granola
3•bearsyankees•16m ago•1 comments

Hulios: An eBPF-powered, transparent Tor gateway for Linux

https://github.com/ghaziwali/Hulios
3•ghaziwali•16m ago•0 comments

Interact With Real Robots

https://robots.online/
1•CGMthrowaway•17m ago•1 comments

The Varangian Guard

https://en.wikipedia.org/wiki/Varangian_Guard
1•CGMthrowaway•17m ago•0 comments

BMW showing video ads in car for Spider-Man – new Day

https://old.reddit.com/r/BMW/comments/1v802of/got_this_commercial_in_my_car_today_as_part_of/
3•robotnikman•17m ago•0 comments

Granola for Apple Watch

https://www.granola.ai/blog/granola-for-apple-watch
2•swyx•18m ago•0 comments

Let It Crash: How to Steer What Comes After

https://twitter.com/vijaypande/status/2071943432709558343
2•rmason•19m ago•1 comments

A 5-minute timer app to stop food cravings

https://cravecut.app/
1•mike_jp•19m ago•0 comments

What Is SMS Pumping Fraud?

https://www.twilio.com/docs/glossary/what-is-sms-pumping-fraud
2•mooreds•22m ago•0 comments

Show HN: Beakdown – a game inspired by Joust/Skirmish

https://beakdown.fun/
1•novlrdotcom•22m ago•0 comments